Red Hat Bugzilla – Bug 60396
ifup replaces routes incorrectly for similar subnets
Last modified: 2014-03-16 22:25:48 EDT
Description of Problem:
I use a network setup where eth0 and eth1 use the same subnet
(10.0.0.0/24). On eth1 (10.0.0.254), the only host supposed to be reached is 10.0.0.1. All others
should go to eth0 (10.0.0.2). In command line configuration it looks like this:
route add -host
10.0.0.1 gw 10.0.0.254 dev eth1
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.2 dev
At approximately line 227 of /sbin/ifup (search for comment "Replace any existing route"),
there are some lines which intend to add a route for the device being configured. However since
eth1 is configured after eth0, the lines replace the route through eth0 (described in second route
command), forcing all traffic to go through eth1.
Problem fix: For me I can just comment the lines
out and there are no side effects. However this may not be true for all systems.
number of selected component (if applicable):
Steps to Reproduce:
1. Configure ifcfg-eth0 to 10.0.0.2/24 and ifcfg-eth1 to
2. Put these lines in static-routes:
eth0 net 10.0.0.0 netmask 255.255.255.0 gw
eth1 net 10.0.0.1 netmask 255.255.255.255
3. Reboot system.
route with gateway through 10.0.0.2/eth0 gets replaced with a route through eth1.
The route through 10.0.0.2 should stay, of course.
Closing bugs on older, no longer supported releases. Apologies for any lack of
response. Please open a new bug if this persists on a current release, such as
Fedora Core 3.