Link to home
Start Free TrialLog in
Avatar of NTnewbee
NTnewbee

asked on

How to get a PC with DUAL NIC (connected to 2 different networks on 2 different subnets with 2 different gateways) working properly

Hi experts,

I have a pretty unique problem and have looked all over the web to find a solution for my problem.
I have tried most of the solutions out there including the ones that I found here at the EEforum but to no avail.
Just to provide give a disclaimer, as my alias suggests, I am new bee with regards to intricate details of networking.
The test setup that I have is something that was given to me to use for the end-user application.

Let me describe my basic test setup 1st. I have 2 PCs (1 client & 1 host), 1 L3 switch (NETGEAR FSM7328S) & my WAN.
My L3 switch has 3 VLANs, the 1st VLAN has the client PC, 2nd VLAN has the host PC with NIC#1 and the mangement
VLAN  has the WAN connection & the host PC with NIC#2. The manegment VLAN is untouched & I access the switch's
web interface through the IP that the DHCP of the WAN assigns (which also assigns the IP for NIC#2)

The 1st VLAN is configured with an IP of 10.0.0.254/24 + the switch's DHCP server to provide a single IP of 10.0.0.1 to the client PC.

So, ipconfig on the client PC shows:
IP Address: 10.0.0.1
Subnet Mask: 255.255.255.0
Default Gateway: 10.0.0.254

The 2nd VLAN is configured with an IP of 10.0.1.254/24 + the switch's DHCP server to provide a single IP of 10.0.1.1 to the host PC on NIC#1.

So, ipconfig on the host PC shows:
IP Address: 10.0.1.1
Subnet Mask: 255.255.255.0
Default Gateway: 10.0.1.254

Everything works fine with NIC#2 disabled, inter-pinging works ok, communication is all good.

The problem starts when I enable NIC#2 & things seem to work o initially but the default gateway gets dropped on  NIC#1 and communication is lost between client PC & host PC. I am sure other people have experience this issue when trying to setup a multi-homed PC. I forget to mention that my OS on the host PC is WinXP Pro with SP3.

By the way ipconfig on host PC with NIC#2 enabled shows:

Ethernet adapter LAN:
IP Address: 10.0.1.1
Subnet Mask: 255.255.255.0
Default Gateway: 10.0.1.254

Ethernet adapter WAN:
IP Address: 65.22.55.10
Subnet Mask: 255.255.0.0
Default Gateway: 65.22.1.1

Route Print when client PC & host PC are able to communicate shows:

Network Destination        Netmask                     Gateway           Interface           Metric
          0.0.0.0                   0.0.0.0                        10.0.1.254        10.0.1.1            10
          0.0.0.0                   0.0.0.0                        65.22.1.1          65.22.55.10      10
         10.0.1.0                  255.255.255.0            10.0.1.1            10.0.1.1            10
         10.0.1.1                  255.255.255.255        127.0.0.1          127.0.0.1          10
   10.255.255.255            255.255.255.255        10.0.1.1            10.0.1.1            10
        127.0.0.0                 255.0.0.0                    127.0.0.1          127.0.0.1          1
      169.254.0.0               255.255.0.0                65.22.55.10      65.22.55.10      30
        65.22.0.0                 255.255.0.0                65.22.55.10      65.22.55.10      10
      65.22.55.10               255.255.255.255        127.0.0.1          127.0.0.1          10
    65.22.255.255             255.255.255.255        65.22.55.10      65.22.55.10      10
        224.0.0.0                 240.0.0.0                    10.0.1.1            10.0.1.1            10
        224.0.0.0                 240.0.0.0                    65.22.55.10      65.22.55.10      10
  255.255.255.255           255.255.255.255        10.0.1.1            10.0.1.1            1
  255.255.255.255           255.255.255.255        65.22.55.10      65.22.55.10      1
Default Gateway:        10.0.1.254

These are the things that I have tried:
1. Tried adding a persistent route for 0.0.0.0  (ND & M) with 10.0.1.254 (NIC#1)
2. Tried manually adding the DG to TCP/IP properties for the NIC#1
3. Tried reducing the Metric for NIC#1 (10.0.1.254) which solves client/PC problem, but that kills my WAN access
4. Tried to statically set the IP for my WAN connection on NIC#2 without specifying the DG and then adding route for it

All in all, I can't seem to get this working and it seems the METRIC issue is the defining criteria as far I as I can understand but the level my understanding is not at the level I would like it to be.

I hope I have provided as much detail as possible to hopefully get some assistance on this matter.

Thanks in advance.
Avatar of FarWest
FarWest

I will talk consiptual from what I understand so far about gateways

when the IP request is initiated from the PC, if it belongs to any card subnets it will go to that card, if the IP is not belonging to any card the it will use by default any card and then the card will use it's gateway IP for none of it's subnet address,
if the request fails, some systems will try the other card, other systems will not,
but if you have predifined destination assignment (i.e. route table) this will be used to select the card, all the above explained what you have seen in the routing table

maybe the best way is to remove the gateway for one of the cards,

good luck

 
You can only have 1 default gateway.  The default gateway is were all traffice is routed by default. In order to have traffic go to the 'other' nic you would have to manually program the traffic using the route command to manually build your routing table.  You will have to make it a script as everytime the pc is rebooted the routing table will have to be recreated.  You can google the route command for information on how to use it.
Avatar of NTnewbee

ASKER

First, I would like to say thanks for the prompt responses.

I do understand that you can only have 1 DG, as I mentioned earlier I did try adding a persistent route (by using route command route -p add 0.0.0.0 MASK 0.0.0.0 10.0.1.254 METRIC 10) already. I am not sure what other routing commands I should do besides that.
What are you trying to route?
I don't understand the question tmoore1962. Kindly clarify
ignore my last comment, I believe your question triggered the solution in my head.
Essentially, this is what I did:
route add 10.0.1.0 MASK 255.255.255.0 IF 0x????
and now I can communicate with my client PC.
Is this what I should be doing?
Yes, that will route 10.0.1.0 traffice to IF 0x???? if that is correct interface, now you can make the commands that you are entering via the command line into a batch file to run at startup, just put a shortcut for the batch file in the windows startup folder.  Use notepad to create the batch file.
what about if I use the "-p" option for the route command? Will that work instead of using a batcch file at startup since the interface #s change.
ASKER CERTIFIED SOLUTION
Avatar of tmoore1962
tmoore1962

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes I verified it in the registry and so far so good.
Once again, thank you for your help.