Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Routing Table configuration of centos7 Windows dual Network Card and double Gateway

Shulou Source: shulou.com Published: 2022-06-01 09:33:43 10月02日 Update

Routing table configuration of dual network cards and dual gateways.

Anyone who has engaged in network communication knows that a computer cannot have two gateways. If two network cards in a computer are configured with different gateways at the same time, only one network card can be used in the computer.

The network structure is shown below:

There are two main problems solved by the routing table:

When dual network cards and two gateways are used at the same time, one computer can use two network cards to access two different gateways. The computer can access the gateway 20.41.1.1 through the network card bound to 20.41.200.203, and can also access the gateway 20.42.1.1 through the network card bound by 20.42.200.203.

Route add-net20.42.0.0 netmask 255.255.0.0 gw 20.42.1.1 dev ens1f1

Route add-net 20.41.0.0 netmask 255.255.0.0 gw 20.41.1.1dev ens2f1

two。 Dual network cards and double gateways are accessed simultaneously across network segments, and one network card is used to access another network segment computer. The computer can access the gateway 20.50.1.1 across network segments through the network card bound by 20.41.200.203

Route add-net20.150.0.0 netmask 255.255.0.0 gw 20.42.1.1 dev ens1f1

Route add-net 20.50.0.0 netmask 255.255.0.0 gw 20.41.1.1dev ens2f1

The 3.windows command is as follows:

Route print

Route delete 0.0.0.0

Route delete 0.0.0.0

Route delete 10.18.0.0

Route add 0.0.0.0 mask 0.0.0.0 10.18.60.1

Route add 10.18.0.0 mask 255.255.0.0 10.18.203.1

Route print

Tags: Network card gateway two at the same time network segment computer routing configuration different can pass through network network structure only command structure network communication problem communication Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Tech Info Apple NVidia Redmi