2 NICs, 2 networks, need to seperate the traffic

M

Mike D.

Hi -

I have an XP Pro PC with 2 NICs and each NIC is attached to a different
network. Each network needs to be seperate from the other network.

Is there a way I can direct all IP traffic that is bound for 192.168.x.x
addresses to one NIC, and all other traffic to another NIC? I looked at the
'net route' command but it looks a bit cryptic to me.

TIA

-Mike
 
R

Ron Lowe

Mike D. said:
Hi -

I have an XP Pro PC with 2 NICs and each NIC is attached to a different
network. Each network needs to be seperate from the other network.

Is there a way I can direct all IP traffic that is bound for 192.168.x.x
addresses to one NIC, and all other traffic to another NIC? I looked at
the
'net route' command but it looks a bit cryptic to me.

TIA

-Mike


You should not need to mess with adding routes to achieve this.
The routes you need should already be there.

On NIC1, assign a 192.168.x.x address and subnet mask appropriate for
network 1.
( If you need to route only 192.168.0.x , use a mask of 255.255.255.0;
if you want to route 192.168.x.x, use a mask of 255.255.0.0 )
Do *not* set a Default Gateway on this interface.

( You can either configure these parameters manually,
or have them assigned by a DHCP server. )

This will create a route to the 192.168.x.x subnet only;
all trafic for 192.168.x.x will be sent down this interface.

On NIC2, assign an IP address / mask appropriate to network 2.
Again, all traffic to that subnet will be sent down that interface.

For traffic that is destined for any *other* subnet, you need to configure a
Default Gateway on NIC2 to point to the router on network 2 which connects
to other subnets or the Internet.

Now, traffic to 192.168.x.x goes out NIC1;
traffic to Network 2 goes out NIC2;
traffic to anywhere else is sent out NIC2 to the router on network 2.
 
M

Mike D.

Hi Ron -

Thanks for the response.. Very informative. Another question, based on how
you suggested to configure the NICs, what if I wanted to route 192.168.x.x
AND 10.1.x.x traffic on 1 NIC and all other traffic to NIC 2? It looks like
I may now have a requirement to route the additional 10.1.x.x traffic on NIC
1. If I configure this the way you suggested, either the 192.168.x.x or
10.1.x.x network won't be accessible on NIC 1.

-Mike
 
R

Ron Lowe

Mike D. said:
Hi Ron -

Thanks for the response.. Very informative. Another question, based on
how you suggested to configure the NICs, what if I wanted to route
192.168.x.x AND 10.1.x.x traffic on 1 NIC and all other traffic to NIC 2?
It looks like I may now have a requirement to route the additional
10.1.x.x traffic on NIC 1. If I configure this the way you suggested,
either the 192.168.x.x or 10.1.x.x network won't be accessible on NIC 1.

-Mike



That depends how the 10.1.x.x network is connected to the 192.168.x.x
network. I will assume that there is a router someplace that joins the
10.1.x.x network to the 192.168.x.x network. For the purpose of this
discussion, I will assume that this router has an IP address of
192.168.0.254 on the interface that connects to the 192.168.x.x network.

You then add a static route which says 'all 10.1.x.x addresses are to be
found via the router at 192.168.0.254.' Since it already knows a route to
192.168.0.254 ( it's on a locally attached subnet, so a route automatically
exists as described previously ).

Here's the syntax for such a command:

route add -p 10.1.0.0 mask 255.255.0.0 192.168.0.254

The -p flag makes this route persistent ( stays after a re-boot. )

'route print' will then show this static route.

Traffic to the subnet which NIC2 is in will continue to be routed down NIC2.
Trafic to all other destinations will be routed to the Default Gateway
router, which you could specify on either of the locally attached subnets.
This traffic will be routed down the appropriate NIC to reach the Gefault
Gateway's IP address.
 

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