Weird routing problem

myxiplx

Junior Member
May 6, 2009
5
0
0
I'm having all kinds of problems here adding a route out to our new load balancer. Can anybody shed some light on why I'm getting this error:

> route add 192.168.3.0 mask 255.255.255.0 192.168.2.1
The route addition failed: The parameter is incorrect.

The basic summary of the network is this:
192.168.2.2 is this machine
192.168.2.1 is a hardware firewall
192.168.3.2 is the hardware firewall's external address
192.168.3.1 is the load balancer

All I want is to configure a route so that I can get to the config pages of the load balancer from this machine in order to test the new settings.

Now, to complicate it a little, this machine does have two network cards:
192.168.2.2 - New NIC
194.73.225.51 - Live internet connection

And on the Live connection we have a default gateway of 194.73.225.49.

If I remove that default gateway, and add a default gateway on the new NIC of 192.168.2.1, everything works fine and I can access the 192.168.3.x subnet.

However, I don't really want to do that yet. I'd like to just get a route established so I can test things before swapping the default gateway over.

As far as I can see, nothing in the routing table is clashing, and the syntax looks fine. Can anybody spot what I've missed?
 

myxiplx

Junior Member
May 6, 2009
5
0
0
Didn't want to add too much to my original post, but here are my IP and routing details:

Windows 2000 IP Configuration

Ethernet adapter Load Balanced Internet:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.2.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter LAN:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.6.27
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.8.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.11.27
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.1.27
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter Backup Internet Route:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 194.73.225.51
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . : 194.73.225.49


Routing table:

===========================================================================

Interface List

0x1 ........................... MS TCP Loopback interface
0x1000003 ...00 02 b3 b0 ac e1 ...... Intel(R) PRO/100 Network Connection
0x1000004 ...00 02 b3 b0 af 17 ...... Intel(R) PRO/100 Network Connection
0x1000005 ...00 03 47 e1 7e 0d ...... Intel(R) PRO/1000 T Server Adapter
===========================================================================

===========================================================================

Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 194.73.225.49 194.73.225.51 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.0.0 255.255.255.0 192.168.0.1 192.168.1.27 1
192.168.0.1 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.0.255 255.255.255.255 192.168.0.1 192.168.1.27 1
192.168.1.0 255.255.255.0 192.168.1.27 192.168.1.27 1
192.168.1.27 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.1.255 255.255.255.255 192.168.1.27 192.168.1.27 1
192.168.2.0 255.255.255.0 192.168.2.2 192.168.2.2 1
192.168.2.2 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.2.255 255.255.255.255 192.168.2.2 192.168.2.2 1
192.168.6.0 255.255.255.0 192.168.6.27 192.168.1.27 1
192.168.6.27 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.6.255 255.255.255.255 192.168.6.27 192.168.1.27 1
192.168.8.0 255.255.255.0 192.168.8.1 192.168.1.27 1
192.168.8.1 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.8.255 255.255.255.255 192.168.8.1 192.168.1.27 1
192.168.11.0 255.255.255.0 192.168.11.27 192.168.1.27 1
192.168.11.27 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.11.255 255.255.255.255 192.168.11.27 192.168.1.27 1
194.73.225.48 255.255.255.240 194.73.225.51 194.73.225.51 1
194.73.225.51 255.255.255.255 127.0.0.1 127.0.0.1 1
194.73.225.255 255.255.255.255 194.73.225.51 194.73.225.51 1
224.0.0.0 224.0.0.0 192.168.1.27 192.168.1.27 1
224.0.0.0 224.0.0.0 192.168.2.2 192.168.2.2 1
224.0.0.0 224.0.0.0 194.73.225.51 194.73.225.51 1
255.255.255.255 255.255.255.255 194.73.225.51 194.73.225.51 1

Default Gateway: 194.73.225.49

===========================================================================
Persistent Routes:
None
 

dphantom

Diamond Member
Jan 14, 2005
4,763
327
126
.3.x and .2.x are on different networks. That I believe is why you are getting the error. Your subnet mask is a /24.
 

myxiplx

Junior Member
May 6, 2009
5
0
0
Err, that's kind of the whole point of routing. If they were on the same network I wouldn't need to be doing this would I?

The whole idea of doing route add is to say "I'm on 192.168.2.x, if I want to get to 192.168.3.x I have to go through 192.168.2.1".
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Welcome to the forums. I looked over the routing quickly and didn't really see anything wrong. At first I thought you were likely getting the error because your next hop was on a network the host didn't have a route to, but it looks like that is a directly connected network so that's not the case.

However this is pretty weird. All those networks and it's only got two network cards? For giggles try adding the route but setting the next hop to another 192.168 network listed other than 192.168.2.0. I think your stack is getting confused because of all the different networks on a single card which doesn't make any sense.
Ethernet adapter Load Balanced Internet:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.2.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter LAN:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.6.27
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.8.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.11.27
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.1.27
Subnet Mask . . . . . . . . . . . : 255.255.255.0
 

myxiplx

Junior Member
May 6, 2009
5
0
0
Heh, yup. This is our main firewall, and we have quite a few subnets internally for various uses. It just makes admin a lot easier if we have this machine on all the subnets.

There's not a lot of traffic flowing between these networks, it's just that since this is the default gateway on our network, I can use any client to check the settings of anything on the network, regardless of subnet.

I've been doing some thinking today though, and I have a feeling windows may have gotten confused and allowed me to add two cards for the same subnet. We added a 3rd NIC to the server recently to act as a dedicated backup route, and I think it's using an IP address that was already assigned as a secondary IP to another card.

I have a feeling I've come across that before, and that Windows allows it to happen without any warnings, but that it then causes havoc with the network stack.

That's my best guess anyway, failing that I'll be swapping the NIC in case it's a driver issue.

In the meantime, further suggestions are very much welcome!
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
yeah, that's a no-no but windows will let you do it. Stack does indeed get confused and very unusual behavior happens.
 

dphantom

Diamond Member
Jan 14, 2005
4,763
327
126
Originally posted by: myxiplx
Err, that's kind of the whole point of routing. If they were on the same network I wouldn't need to be doing this would I?

The whole idea of doing route add is to say "I'm on 192.168.2.x, if I want to get to 192.168.3.x I have to go through 192.168.2.1".

DOH! :eek:

Of course that is correct.
 

myxiplx

Junior Member
May 6, 2009
5
0
0
Hehe, np mate, we all do it from time to time :)

Happily, the problems are solved although I have no idea what was going on. After several hours of working fine, all of a sudden our firewall stopped working yesterday and we had to unplug the network cable from this card to get it going again.

Then this morning, I decided to clear the IP's set on the new card and see if the 192.168.2.2 address showed up anywhere else. As I set the card to DHCP, Windows told me it needed to reboot to apply the settings o_0.

So I rebooted, and since everything appeared to be working ok (and I couldn't see any clashes with the 192.168.2.x subnet), I plugged the cable in again and set the IP back to 192.168.2.2. But when I ran ipconfig, the address showed up as 0.0.0.0. It hadn't taken the address at all, and I remember now that it did this before - it took two attempts to set the IP last time.

At this point I decided to use the advice of trying another subnet. I configured it to 192.168.47.2 (which it took fine), and I could add (and delete) that route with no problems at all.

So I put the card back to 192.168.2.2, ran the route command, and this time everything is working perfectly.

So ultimately god knows what was wrong with it, but thanks for the advice, and for confirming that I hadn't done anything stupid.

I'm thinking that maybe windows hadn't quite loaded the drivers properly and needed a reboot, or maybe this card is a little dodgy (it is an old one, but it's an Intel gigabit card from a working server). Either way, I'm going to be keeping a suspicious eye on this server for a while.
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Sounds like your stack was confused. Sometimes happens when trying to make windows do "funny stuff". A reboot normally helps because it re-enumerates the NICs/interfaces and rebinds everything. It's one of the main reasons I don't like windows to have more than one IP interface and one gateway.