Sometimes when you have a subnet accessible from an interface that is not along the default gateway (such as a group of private routed subnets in 10.x.y.z), you need to add a manual route.

Say for example vlan 2 is on and has a router on that also serves  You cant put a GATEWAY= in the ifcfg-eth0.2 file, since that will (potentially) override the GATEWAY setting in ifcfg-eth0 that reaches the Internet (i.e. you’d be able to reach 10.2.x.x but not  The solution is to specify manually a route that directs only the subnet to the gateway like this:


route-eth0.2 via

It couldn’t be easier than that.  Do a service network restart to reload the new route specified in the file.