One, different network card different gateway
- Wlan:192.168.100.1/24
- Wifi:192.168.8.1/24
1. If you want a specific IP to access your WiFi network
can be used
Route add 1.2.3.4 Mask 255.255.255.255 192.168.8.1 metric 1
Set the 1.2.3.4 IP address egress nic to WiFi
2. If you want all IP addresses to access WiFi, you can use the
Route Delete 0.0.0.0
Route add 0.0.0.0 mask 0.0.0.0 192.168.8.1 metric
This completes all IP addresses that are not specified the egress IP is placed on the WiFi NIC out
Second, the same gateway with different NIC
- WLAN:192.168.100.1/24 ip:192.168.100.6
- WIFI:192.168.100.1/24 ip:192.168.100.15
1. Want a specific IP address to access the WiFi network card
Route add 1.2.3.4 Mask 255.255.255.255 192.168.100.1 metric 1 if 17
If there is a 17 on the back, it represents the interface of the NIC on this computer.
The interface number of the WiFi NIC can be found by using route print to view the MAC address in the Interface list.
This will allow 1.2.3.4 to access the WiFi network
2. To specify all IP access to the WiFi network card, step the same (2)
Third, want to permanently retain, directly after the route add-P can be.