To configure your PC to use the appropriate network adapter for each network (wired for 192.168.1.0 and wireless for 192.168.8.0), you can adjust the routing table to ensure traffic for each subnet goes through the correct interface.
Steps to Configure the Routing Table in Windows
1. Identify the Network Interfaces
- Open Command Prompt with Administrator privileges:
- Press
Win + S, typecmd, right-click “Command Prompt,” and select “Run as Administrator.”
- Press
- Type the following to display the list of network interfaces:
ipconfigNote the IPv4 address, Subnet Mask, and Default Gateway for both the Ethernet and Wireless adapters.
2. Check the Current Routing Table
- Use the
route printcommand to view your PC’s routing table:route printThis shows all routes and their priorities.
3. Add Specific Routes
You need to define routes for each subnet to ensure traffic is sent through the correct interface.
- Route for 192.168.1.0 via Ethernet: Assuming the Ethernet adapter’s IP is
192.168.1.100and its gateway is192.168.1.1:route add 192.168.1.0 mask 255.255.255.0 192.168.1.1 metric 1 if <Ethernet_Interface_Index>Replace<Ethernet_Interface_Index>with the interface number for your Ethernet adapter. You can find it in the output ofroute print. - Route for 192.168.8.0 via Wireless: Assuming the Wireless adapter’s IP is
192.168.8.100and its gateway is192.168.8.1:route add 192.168.8.0 mask 255.255.255.0 192.168.8.1 metric 1 if <Wireless_Interface_Index>Replace<Wireless_Interface_Index>with the interface number for your Wireless adapter.
4. Make Routes Persistent
By default, the above commands are temporary and will reset after a reboot. To make them permanent, add the -p flag:
route -p add <destination> mask <subnet_mask> <gateway> metric 1 if <interface_index>
Example for Your Setup
- Assume:
- Ethernet: IP =
192.168.1.100, Gateway =192.168.1.1, Interface Index =3 - Wireless: IP =
192.168.8.100, Gateway =192.168.8.1, Interface Index =11
- Ethernet: IP =
- Run these commands:
route -p add 192.168.1.0 mask 255.255.255.0 192.168.1.1 metric 1 if 3 route -p add 192.168.8.0 mask 255.255.255.0 192.168.8.1 metric 1 if 11
5. Verify Configuration
- Run
route printagain to confirm the new routes are added. - Test connectivity to resources on both networks to ensure traffic is routing correctly.
This setup will now prioritize the Ethernet adapter for the 192.168.1.0 network and the Wireless adapter for the 192.168.8.0 network.