Routing Traffic Through Different Network Cards

C

Cam

I am connected to both a wired and wireless networks configured for
DHCP. <ipconfig> produces the following:

Wireless
IP: 10.15.200.25
subnet: 255.255.255.0
gateway: 10.15.200.1

Wired
IP: 192.168.20.159
subnet: 255.255.255.0
gateway: 192.168.20.1

I want to route Internet traffic through my wireless network card and
all other traffic through my wired/ethernet card - on a Windows XP
machine.

Thanks in advance for your help!
Cam
 
J

John Wunderlich

I am connected to both a wired and wireless networks configured for
DHCP. <ipconfig> produces the following:

Wireless
IP: 10.15.200.25
subnet: 255.255.255.0
gateway: 10.15.200.1

Wired
IP: 192.168.20.159
subnet: 255.255.255.0
gateway: 192.168.20.1

I want to route Internet traffic through my wireless network card and
all other traffic through my wired/ethernet card - on a Windows XP
machine.

Use the "route print" command to show how your packets are currently
being routed. Change the "metric" to a larger number for the route you
do not want taken. Type: route /? for syntax.

HTH,
john
 
K

Kurt

Account for the networks you want to access via the wired interface and add
the routes manually (use route print to see the current state of routing).
If your wired interface is on the 192.168.20 network, that traffic is
already going there. For example, if you want to access traffic on the
10.15.100 network via the wired interface, you'd need to add the route as
such:

first, remove the wired interface's default gateway (from TCP/IP
properties). You should only have one anyway unless you need one for
redundancy.

then enter the following at the command line:
route add 10.15.100.0 mask 255.255.255.0 192.168.20.1
that'll force traffic to the 10.15.100 network thru your wired-side router

add any additional routes to local subnets in the same way. You can test
with:

tracert 10.15.100.x

Since your default gateway is on the 10.15.200 network, Internet bound
traffic (any traffic you don't explicitly account for with your menually
entered routes) will head out the wireless interface for the gateway on that
network.

If you want to route traffic to the same subnet as your gateway, you'll need
to break up the subnet into multiple routes so you can leave your default
gateway as the only IP address on the 10.15.200 network that is not
explicitly routed via the 192.168.20.1 router.

route add 10.15.200.2 mask 255.255.255.255 192.168.20.1
route add 10.15.200.3 mask 255.255.255.255 192.168.20.1
route add 10.15.200.4 mask 255.255.255.252 192.168.20.1
route add 10.15.200.8 mask 255.255.255.248 192.168.20.1
route add 10.15.200.16 mask 255.255.255.240 192.168.20.1
route add 10.15.200.32 mask 255.255.255.224 192.168.20.1
route add 10.15.200.64 mask 255.255.255.192 192.168.20.1
route add 10.15.200.128 mask 255.255.255.128 192.168.0.1

That should force all traffic bound for the 10.15.200 network to go via the
192.168.20.1 router EXCEPT traffic headed for 10.15.200.1

....kurt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top