CentOS Bug Tracker - CentOS-6
View Issue Details
0005391CentOS-6initscriptspublic2012-01-04 22:412012-01-04 22:41
Reportercjaeger 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Platformx86_64OSCentOSOS Version6.2
Product Version6.2 
Target VersionFixed in Version 
Summary0005391: network init script requires NETMASK instead of or in addition to PREFIX in some situations
DescriptionAn extra bogus direct-attached route can be added under specific conditions if NETMASK value is not specified in /etc/sysconfig/network-scripts/ifcfg-eth0 even though PREFIX value is specified. The bogus route is for the full IP class despite a PREFIX indicating subnets are in use.
Steps To ReproduceConfigure a primary (eth0) and a virtual (eth0:0) interface with IPs in the same subnet. Instead of NETMASK and BROADCAST use the PREFIX option to define netmask length (as is done by the installer.) Define both interfaces in a subnet of a full IP class.

When initialized by /etc/init.d/networks script, the correct default route, direct-attached subnet route and (if used) zeroconf routes will exist and so will a bogus route defined as directly attached. In a subnetted environment this extra route will prevent communication between subnets.

This behavior is not seen if NETMASK variable is defined in ifcfg-eth0, nor is it seen if secondary
Additional InformationExample:
eth0 = 10.1.0.1/16
eth0:0 = 10.1.0.2/16
GATEWAY = 10.1.0.1

Ignoring the zeroconf route, your routing table will look like:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.1.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
0.0.0.0 10.32.254.254 0.0.0.0 UG 0 0 0 eth0

Cutting off communication to any other 10.x.0.0/16 subnet.
TagsNo tags attached.
Attached Files

There are no notes attached to this issue.

Issue History
2012-01-04 22:41cjaegerNew Issue