I am having an issue with a CentOS 6.3 box. We have two NICs (eth0 and eth1) in the server which each have an ip from a different subnet assigned, let's say eth0: (gateway and eth1: (gateway The real ips are world routable though.

Each NIC is connected to a different switch but ends up on one router in the end. On the router these two subnets are in different VLANs, the ports to the NICs are untagged so no vlan id is passed onto the server.

Now on FreeBSD I just assign the ips to each NIC and it just works, both IPs are reachable. On CentOS I can only reach the IP of which the gateway is active as the default route. I can ping the IP anything within the same VLAN/subnet but outside that it is unreachable.

When I do a traceroute to each of the gateways i see they go over the appropriate NIC, makes sense as the gatewaty is inside the scope. However outside the subnet I can only ping currently.

IPtables is not active at the moment either.

What would be the required action to get this to work?

I googled around for hours, tried different approaches but it won't work. I have the feeling I am missing something important, hopefully an easy fix :-)

Any help is appreciated Thanks ! Scott


# route -n  
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 eth0   U     0      0        0 eth1     U     1002   0        0 eth0     U     1003   0        0 eth1         UG    0      0        0 eth0


# ip addr list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether b8:ac:6f:16:70:c7 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
    inet6 fe80::baac:6fff:fe16:70c7/64 scope link 
       valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether b8:ac:6f:16:70:c9 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth1
    inet6 fe80::baac:6fff:fe16:70c9/64 scope link 
       valid_lft forever preferred_lft forever
  • Good first question!
    – slm
    Dec 23, 2012 at 4:28

1 Answer 1


You need to create a multipath route or active a dynamic routing protocol (ospf, isis).

Mulitpath example:

ip route del default via dev eth0
ip route add default scope global nexthop via dev eth0 weight 1 \
        nexthop via dev eth1 weight 1
  • If someone ends up here googling; adding it to /etc/rc.d/rc.local makes it permanent
    – Scott
    Dec 23, 2012 at 5:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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