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 a Red Had Linux machine with two NICs:

  • eth0 - 10.0.1.253 | 255.0.0.0
  • eth1 - 10.0.1.1 | 255.255.255.0

So the first one is on a class A subnet, the second is on a class C subnet.

This is what my routing table looks like:

Destination  Gateway   Genmask        Flags Metric Ref Use Iface
10.0.1.0     *         255.255.255.0  U     0      0     0 eth1
link-local   *         255.255.0.0    U     1002   0     0 eth0
10.0.0.0     *         255.0.0.0      U     0      0     0 eth0
default      10.0.0.1  0.0.0.0        UG    0      0     0 eth0

The two NICs are connected to separate physical (actually virtual) LAN segments and I have a host connected to the same LAN segment eth0 is with IP 10.0.1.3 | 255.0.0.0 but I can't ping it from this machine because it appears its getting confused and sending out eth1. When I disable eth1 to force the packet to go out eth0 it connects but I need both enabled.

I'm thinking the solution is to add a manual route to my host 10.0.1.3 to force it to go through eth0. I'm not sure given the information above what the command would be to manually the route. Basically I need to send any traffic to 10.0.1.3 out eth0. Any help would be great!!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

# route add -host 10.0.1.3 dev eth0

share|improve this answer
    
Wonderful, thank you! –  Andy Arismendi Jan 11 '13 at 12:30

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.