Routing with multiple ip on same card

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi all,
I want to configure a laptop (winxp) in a way that it can use two
different lan configurations.
first lan:
IP 192.168.1.38
gateway 192.168.1.140

second lan:
IP 192.168.3.98
gateway 192.168.3.175

I configured the lan connection with the first set of parameters, then
I clicked on advanced and added the second IP adn the second gateway
address.

I typed "route -p add 0.0.0.0 mask 0.0.0.0 192.168.3.175" to add the
second gateway, but when I type "route print" I have:

network address 0.0.0.0 mask 0.0.0.0 gateway 192.168.3.175 interface
192.168.1.38 metric 20

the 3.175 gateway is assigned to the first IP, and I cannot access
internet.
The interface "sees" only the first IP address (192.168.1.38), how can
I modify the routing table in a way that it shows:

network address 0.0.0.0 mask 0.0.0.0 gateway 192.168.3.175 interface
192.168.3.98 metric 20 ????

Thank you! ;)
 
here is how this should be configured. For the interface that will be
accessing the internet add a gateway. In my example I have the first
lan has your route to the internet. If this is not correct just switch
my example around

First Lan:
IP: 192.168.1.38
Mask: 255.255.255.0
Gateway: 192.168.1.140

Second Lan:
IP: 192.168.3.98
Mask: 255.255.255.0
Gateway: None

Add the following route
route add 192.168.3.0 mask 255.255.255.0 192.168.3.175 -p

This should work just fine. Your issue is that you have 2 default
gateways that is how the 0.0.0.0 route is defined.

Good Luck
 
I had no luck. I followed your instruction (added 2 ip and 1 gateway
to the network card, then typed the route command you told me).
This is my route print:

===========================================================================
Elenco interfacce
0x1 ........................... MS TCP Loopback interface
0x2 ...00 11 2f f6 95 29 ...... Marvell Yukon 88E8053 PCI-E Gigabit
Ethernet Con
troller - Miniport dell'Utilità di pianificazione pacchetti
===========================================================================
===========================================================================
Active routes:
Network destination Mask Gateway Interface
Metric
0.0.0.0 0.0.0.0 192.168.1.140 192.168.1.38
20
0.0.0.0 0.0.0.0 192.168.3.175 192.168.1.38
20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1
1
192.168.1.0 255.255.255.0 192.168.1.38 192.168.1.38
20
192.168.1.38 255.255.255.255 127.0.0.1 127.0.0.1
20
192.168.1.255 255.255.255.255 192.168.1.38 192.168.1.38
20
192.168.3.0 255.255.255.0 192.168.3.98 192.168.1.38
20
192.168.3.0 255.255.255.0 192.168.3.175 192.168.1.38
1
192.168.3.98 255.255.255.255 127.0.0.1 127.0.0.1
20
192.168.3.255 255.255.255.255 192.168.3.98 192.168.1.38
20
224.0.0.0 240.0.0.0 192.168.1.38 192.168.1.38
20
255.255.255.255 255.255.255.255 192.168.1.38 192.168.1.38
1
Default gateway: 192.168.1.140
===========================================================================
Permanent routes:
Network destination Mask Gateway Metric
192.168.3.0 255.255.255.0 192.168.3.175 1

sigh...

What else can I try?
 
bryce said:
you have 2 network cards correct?

No, I have only one network adapter.

The only solution I found so far is using the netsh command to switch
between the two configurations. But it sounds strange to me that MS
didn't offer a simple solution to this common problem.... :(
 
Ok. I was going down the wrong path. Have you tried using the
Alternate configuration tab. Here you can configure and Alternate if
the primary doesn't work. I've have mixed results. There is a
product called netswitcher that provide better and more reliable
functionality
 
Back
Top