Home > other >  Unit double nic on the question of inner and outer net at the same time
Unit double nic on the question of inner and outer net at the same time

Time:09-16

Unit even desktop computer cable, IP 192.168.4.21 255.255.255.0 gateway 192.168.4.1
Outside the network into a wireless network card, connect mobile hotspot, automatic acquisition, ipconfig saw a gateway is 192.168.43.1
So my approach is to delete the Intranet gateway and then CMD route delete 0.0.0.0, write the route add 0.0.0.0 mask 255.0.0.0 192.168.43.1 -p
And write 192.0.0.0 mask 255.255.255.0 192.168.4.1 -p
But found that only a network can be used, not outside the network, the network cable can be pulled out the network, before such a success, hand owing to delete, to figure how also get bad, ask everybody to help me see, where is the problem, thank you!

CodePudding user response:

Routing network segment to write wrong, and the two routing also do not need, put you to add delete,
1. The cable network card IP configuration need not move, delete the gateway, blank, so as not to conflict and the network;
2. Mobile hotspot automatically obtain IP configuration remains the same, don't change it.
3. So far, your computer can access the network, as well as the computer's network segment, and then to add the routing within each segments, can achieve access to the network of all other segment (if only one 192.168.4.0/255.255.255.0 segment, that there is no need to do in this step)
In addition, the default route of the correct term is supposed to be the route add 0.0.0.0 mask 0.0.0.0 192.168.43.1
Another route should be the correct term of 192.168.1.0 mask 255.255.255.0 (on behalf of 192.168.1.0-192.168.1.255, namely 192.168.1.0/24), or 192.0.0.0 mask 255.0.0.0 (representing 192.0.0.0-192.255.255.255, namely 192.0.0.0/8)

CodePudding user response:

Brothers! How to give to you!

CodePudding user response:

Junction post directly to go,
  • Related