Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:

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
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?

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 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 at 9:29
    
What makes you think the problem is with the host? –  Michael Hampton Mar 4 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 at 15:17

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.