Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server with 2 VLANs on a NIC, configured as follows:

eth0      Link encap:Ethernet  inet addr:  Bcast:  Mask:

eth0.10   Link encap:Ethernet  inet addr:  Bcast:  Mask:

eth0.20   Link encap:Ethernet  inet addr:  Bcast:  Mask:

This is a controller for various other things on the network, and different controlled devices sit on each VLAN. I am unable to reach these addresses from the other networks, though; from 192.168.10.x, I can't reach I believe I found the answer to this question here:

CentOS, two nics eth0 eth1 with different subnets aren't reachable outside VLAN/subnet

but after following the steps outlined, I do not see a difference in routing tables. Below is the table prior to and after applying the change:

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface    *        U     0      0        0 eth0        *        U     0      0        0 eth0.10        *        U     0      0        0 eth0.20
link-local      *          U     1006   0        0 eth0.10
link-local      *          U     1007   0        0 eth0.20
default         UG    0      0        0 eth0

This is the command I tried:

ip route add default scope global nexthop via dev eth0 weight 1 nexthop via dev eth0.10 weight 1 nexthop via dev eth0.20 weight 1

I do plenty of networking/routing, but am not sure where I'm going wrong here. Running CentOS 6.5. Any ideas?

share|improve this question
After looking into it, I do not think enabling forwarding is the right option; I am specifically trying to avoid that, I think. Since there is an IP for each network on separate interfaces, I would like to be able to handle the forwarding at my router, rather than at the server these interfaces are on. Hopefully that makes sense, please feel free to correct me if I'm completely off. – lorsungcu Mar 4 '14 at 6:15
Either your CentOS box is forwarding, and it will act like a router and route other traffic, or it is not forwarding, and it will only route its OWN traffic. – NickW Mar 4 '14 at 9:29
What makes you think the problem is with the host? – Michael Hampton Mar 4 '14 at 10:21
Because I have other, dissimilar devices configured similarly that do not have this trouble. It may be my router, but I am very familiar with it, and do not think that's the issue. I would be happy to post those configs, if you'd like. – lorsungcu Mar 4 '14 at 15:17

Your Answer


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

Browse other questions tagged or ask your own question.