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
DEVICE=eth0.123 VLAN=yes BOOTPROTO=static IPADDR=172.16.0.1 NETMASK=255.240.0.0 ONBOOT=yes IPV6INIT=no TYPE=Ethernet
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 0.0.0.0 10.64.20.1 0.0.0.0 UG 0 0 0 eth0 10.64.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth0.123 169.254.0.0 0.0.0.0 255.255.0.0 U 1113 0 0 eth0 172.16.0.0 0.0.0.0 255.240.0.0 U 0 0 0 eth0.123
For my particular needs, I don't want the route for the 172.16.0.0 network to be generated because I am adding another route to go through vpn tunnel server. Everything works if I remove the 172.16.0.0 network route manually. However it's not persistent and I would like it to be.
Any help would be appreciated.