I'm having a hard time creating a network interface without a static route being generated to use the default gw. More specifically, I'm trying to create a VLAN interface using the following ifcfg script file in centos 6


when I bring up the interface though, I end up with the following routes in my routing table

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 eth0   U     0      0        0 eth0     U     1003   0        0 eth0.123     U     1113   0        0 eth0     U     0      0        0 eth0.123

For my particular needs, I don't want the route for the network to be generated because I am adding another route to go through vpn tunnel server. Everything works if I remove the network route manually. However it's not persistent and I would like it to be.

Any help would be appreciated.


  • 3
    That route is a local route, and is there because you added an interface with an IP in that network, and it's telling you that eth0.123 is the interface you use to get to that network. Remove the IP address from the VLAN interface, and you won't have that route, or change IP schemes on that VLAN interface to not overlap with your other route. – Tim Kennedy Mar 15 '17 at 1:22

add following to ifcfg config file


It will not create default route for this interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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