I have a server with 2 VLANs on a NIC, configured as follows:
eth0 Link encap:Ethernet inet addr:192.168.10.20 Bcast:192.168.10.255 Mask:255.255.255.0 eth0.10 Link encap:Ethernet inet addr:10.9.0.20 Bcast:10.9.0.255 Mask:255.255.255.0 eth0.20 Link encap:Ethernet inet addr:10.9.1.20 Bcast:10.9.1.255 Mask:255.255.255.0
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 10.9.1.20. I believe I found the answer to this question here:
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 192.168.10.0 * 255.255.255.0 U 0 0 0 eth0 10.9.0.0 * 255.255.255.0 U 0 0 0 eth0.10 10.9.1.0 * 255.255.255.0 U 0 0 0 eth0.20 link-local * 255.255.0.0 U 1006 0 0 eth0.10 link-local * 255.255.0.0 U 1007 0 0 eth0.20 default 192.168.10.10 0.0.0.0 UG 0 0 0 eth0
This is the command I tried:
ip route add default scope global nexthop via 192.168.10.10 dev eth0 weight 1 nexthop via 10.9.0.10 dev eth0.10 weight 1 nexthop via 10.9.1.10 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?