Bug 77688

Summary: iproute 2 is having problems when 2 links come from the same network
Product: [Retired] Red Hat Linux Reporter: Need Real Name <leni>
Component: iprouteAssignee: Phil Knirsch <pknirsch>
Status: CLOSED WONTFIX QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 7.3CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-21 14:24:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Need Real Name 2002-11-12 03:43:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Description of problem:
I'm using iproute2 features to enable multi adsl links on my redhat servers. 
When I set 2 adsls coming from diferent logical networks, everything runs fine 
(eg.: & both with netmask When 
I set 2 adsl coming from the same logical network I have problems (eg. & both with subnet In this 
case the same gateway ip is used for bith nics and it doesn't work. I attached 
the script I made for doing such load-balancing and iproute 2 documentation is 
not good. If there is something to be changed within the script, please let me 
know but be clear in what to change.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. configure ifcfg-eth files having the gateway info within these files and 
not on the /etc/sysconfig/network file
2. start the network
3. start the attached script to enable load-balancing.

Actual Results:  If setting 2 ips from different subnets everything runs fine.
If setting 2 ips from the same subnet it doens't work and I cannot reach the 

Expected Results:  I expect to have iproute 2 working as it does when I use 
ips from different subnets.

Additional info:

Here goes the script I use for having iproute 2 works for me:
(note NET0, GW0 and IP0 means network, gateway and ip number for eth0, and the 
same for NET1, GW1, IP1 and so on)

# chkconfig: 2345 85 15
# description: Leni's script for multiple ADSL load-balancing.
# processname loadbalance

start() {
	echo -n $"Starting load-balancing services: "
	ip route del default
        ip route add NET0 dev eth0 src IP0 table adsl?
        ip route add default via GW0 table adsl?  
        ip route add NET1 dev eth1 src IP1 table adsl??
        ip route add default via GW1 table adsl??  

        ip route add NET0 dev eth0 src IP0
        ip route add NET1 dev eth1 src IP1

        ip route add default via GW0

        ip rule add from IP0 table adsl?
        ip rule add from IP1 table adsl??

	ip route del default

        ip route add default scope global nexthop via GW0 dev eth0 weight 1 
nexthop via GW1 dev eth1 weight 1


status () {
	ip route show

case "$1" in
	echo $"Usage: $0 {start|restart|status}"
	exit 1


Comment 1 Phil Knirsch 2004-04-21 14:24:07 UTC
I might be that this actually can't properly work. If you generally
try to use 2 gateways in the same subnet it won't work either, so my
guess is that this causes your problem.

Simply stick to 2 separate networks and all should work fine. You can
always subnet your networks internally, too so that your gateways will
end up in different networks again. This should have no effect on the
other side.

Read ya, Phil