Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been asked to look at an interesting Linux routing issue and thought it worth sharing for comments. Both machines are running SuSE 11.2.

Machine A:

  • IP Address 172.16.200.1 eth0
  • Manual route added to specify that the route to network 192.168.192.0 is via eth0

Machine B:

  • IP Address 192.168.192.100 eth0
  • Manual route added to specify that the route to network 172.16.200.0 is via eth0

That's it; no more network configuration on the machines, no aliases on the NICs etc. Both machines are on an unmanaged switch.

The user has pointed out that the machines can only see each other intermittently and if PING stops working it can be 'fixed' by rebooting.

Now I am off to do some digging, but in my book this isn't the way to setup routing, but the customer insists they have done it this way many times before and it has always worked reliably. Sitting in front of these machines I can see them happily PINGing each other.

I am not after a tutorial on setting up routing (I know how I would have done it, and how it can be done with one NIC if you really really want) - my question is:

Has anyone else seen this type of setup used for routing before (ie: just a route add) as my understanding is that there is nothing in the above setup that should actually make routing work between the two networks!!?

My first thought is that luck is playing a big part in making the above configuration work.

share|improve this question
    
What is the result from route -n on each machine? And ifconfig eth0? Are the two machines connected to the same switch? –  ring0 Jan 20 '11 at 12:43
    
The machines are elsewhere and I can't get to them at the moment but I'll see if I can grab the info and add it to the question but from what I saw the info is as expected - one IP address on each eth0 and the standard routes as expected + the manually added one. There's no default gateway defined. Yes, the machines are on the same switch. No fancy VLANs or anything either. –  Linker3000 Jan 20 '11 at 13:01

1 Answer 1

The switch doesn't understand the IP protocol, the dialog has to happen between two different networks, without a gateway to perform any routing, and via the switch since both machines are on the same switch.

When A wants to "discuss" with B, since the route has been added directly via the eth0 interface and not a gateway, it first sends an ARP broadcast request via its eth0 interface

What is the MAC address of 192.168.192.100?

(if a gateway would have been mentioned, the gateway MAC address would be searched instead)

The switch naturally broadcasts the ARP request to all its ports, and B should get it.

B replies with its MAC address, and then A and B can communicate directly through the switch via their respective MAC addresses. The switch is able to "link" ports and MAC addresses, and no more broadcast has to take place to allow a communication between the machines (until they stop the dialog for some time).

It should work.

share|improve this answer
    
Thanks for the comment - I can see how ARP plays a part in this. Can you elaborate on "...until they stop the dialog for some time". Are you implying that any extended break in commuication is likely to stop the boxes from resuming dialogue later (perhaps due to ARP cache timeout)? In general, is the configuration considered a valid way to setup 'proper', stable routing? –  Linker3000 Jan 20 '11 at 16:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.