Computer dual network card configuration, simultaneously connected to the internal and external network

The first step is to connect the wired network and the wireless network at the same time. Note that if the wired network is configured with IP, the gateway is empty. The wireless network can obtain the IP automatically.

Step 2: Check the routing table for routing table configuration. Note: Run cmd in administrator mode

route print -4

Insert picture description here
The third step: delete the related information of the wired network card, which may be one or more, delete according to your actual situation, the parameter -p refers to delete the information in the permanent routing table
Insert picture description here

route delete 0.0.0.0 mask 0.0.0.0 10.166.x.x -P
route delete 10.0.0.0 mask 255.0.0.0 10.166.x.x -P
route delete 10.0.0.0 mask 255.0.0.0  -P
route delete 255.255.255.255 mask 255.255.255.255  -P
route delete 224.0.0.0 mask 240.0.0.0  -P

Step 4: Add wired routing information

#IF 7不是必须的,根据实际情况加,我这外接了一个小交换机,所以加了IF参数
route add 10.0.0.0 mask 255.0.0.0 10.166.x.x IF 7

Step 5: Test, open intranet and extranet websites at the same time.

Reference material (source Baidu users share):
The main function of the route add command is to add a static route, the usual format is:
route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2
Parameter meaning: ^ destination ^ mask ^ gateway metric ^ ^ interface
destination [network segment address]
mask [subnet mask]
gateway [gateway address]
metric [route hops]
if [port number] In
general, the local address is not involved unless you want to do a test.
Among them:
[Route Hops] parameter can be omitted;
when the path to the gateway address is unique, [Port Number] parameter can be omitted. (Because on a multi-port routing and switching device, there may be multiple backup paths to the same IP address.)
Mask is a keyword and cannot be omitted.
route add 134.105.0.0 mask 255.255.0.0 134.105.64.1
means: all IP packets that need to be sent to the 134.105.0.0/16 address segment are all forwarded by the 134.105.64.1 path.
This command is often used when building large IP networks. The command format may be different on devices of different manufacturers, but the principle is the same.
If there are multiple routes, according to the provisions of different routing protocols (such as rip, ospf, etc.), the route with a small network segment address is generally preferred. For example, when the following two routes are added at the same time:
route add 134.105.0.0 mask 255.255.0.0 134.105.64.1
route add 134.105.128.0 mask 255.255.128.0 134.105.0.1
IP packets whose destination address is 134.105.128.1 will prefer the second route.

Published 21 original articles · liked 0 · visits 580

Guess you like

Origin blog.csdn.net/u014270566/article/details/105258070