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 2 nics setup (eth0, eth1), each in a different subnet. IP's are eth0 - 172.18.164.33/25 and eth1 - 172.18.164.161/25. Eth0 is vlan150 on the router and eth1 is vlan151 on the router. The Problem is that I cannot ping eth1 without first pinging eth0 or eth0's gateway first. This would cause a problem if the server was ever rebooted.

Here is my config:

eth0      Link encap:Ethernet  HWaddr 00:15:B2:A4:4D:C8
          inet addr:172.18.164.33  Bcast:172.18.164.127  Mask:255.255.255.128
          inet6 addr: fe80::215:b2ff:fea4:4dc8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:55238 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3601 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:24769789 (23.6 MiB)  TX bytes:245680 (239.9 KiB)
          Memory:fafc0000-fafe0000

[root@IXXXHME ~]# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:15:B2:A4:4D:C6
          inet addr:172.18.164.161  Bcast:172.18.164.255  Mask:255.255.255.128
          inet6 addr: fe80::215:b2ff:fea4:4dc6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5307 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1919 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:570166 (556.8 KiB)  TX bytes:147968 (144.5 KiB)
          Memory:fbd80000-fbda0000

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=IXXXHME
GATEWAY=172.18.164.1

[root@IXXXHME sysconfig]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.18.164.0    *               255.255.255.128 U     0      0        0 eth0
172.18.164.128  *               255.255.255.128 U     0      0        0 eth1
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
default         172.18.164.1    0.0.0.0         UG    0      0        0 eth0
share|improve this question
    
Where are you pinging from? If you're trying to ping from outside of the local subnet on eth1 (172.18.164.161/25), there is no route back to the source for eth1. –  yoonix Feb 16 '13 at 0:02
    
@yoonix I am trying to ping from outside eth1's subnet. How do I add the route for this? –  Tim Feb 18 '13 at 13:58
    
To be honest, I'm not sure. I specifically avoid making this kind of design because of the inherent complexity. Try googling for 'linux multiple default routes' to get you started if you absolutely must have this design. –  yoonix Feb 19 '13 at 22:32
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.