Bug 74961 - can't assign mulitpath in ip command
Summary: can't assign mulitpath in ip command
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: iproute
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-03 06:39 UTC by Need Real Name
Modified: 2015-03-05 01:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-21 14:55:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2002-10-03 06:39:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.0.1) Gecko/20020830

Description of problem:
can't assign mulitpath for Linux command : 
ip route replace default nexthop via $GATE1 dev $DEV1 weight 1 \ 
  nexthop via $GATE2 dev $DEV2 weight 1 


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


How reproducible:
Always

Steps to Reproduce:
1.add route table name for $GATE1 and $GATE2 in  /etc/iproute/rt_tables 
2.add default route in each TABLE for $GATE1 , $GATE2
3.add multipath default route command :ip route replace default nexthop via
$GATE1 dev $DEV1 nexthop via $GATE2 dev $DEV2
	

Actual Results:  default
        nexthop via 61.221.235.254  dev eth2 weight 256 dead onlink pervasive
        nexthop via 210.66.111.254  dev eth1 weight 1


Additional info:

Comment 1 Phil Knirsch 2002-10-04 15:48:07 UTC
Erh, and what is the expected result? :-)

I've never used iproute to do something like that.

And how can i test wether it works correctly or not?

Thanks,

Read ya, Phil

Comment 2 Need Real Name 2002-10-05 08:23:20 UTC
1. install more than 2 network card
   set eth0 for local net
   set eth1 for default gateway 1 for isp1 
   set eth2 for default gateway 2 for isp2

2. add /etc/iproute/rt_tables 
    200 gate1
    210 gate2

3. add default gateway for each  network card 
   # ip route replace default via $GATE1 dev eth1 table gate1
   # ip route replace default via $GATE2 dev eth2 table gate2 

  and then you can use any network 

4. add for multi-path for system 

   # ip route replace default nexthop via $GATE1 dev eth1 \
        nexthop via $GATE2 dev eth2 

5. and setup nat 

   # iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
   # iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE

6. and then your local net can use any isp goto internet 

this status in rh 7.x is ok 
but rh 8.0 can't work


Comment 3 Chris Yeo 2002-10-18 04:34:36 UTC
I have verified this bug as well.

The package of iproute for RedHat 8.0 doesn't create the same multipath 
statement as iproute-2.4.7-1 for RedHat 7.3.

I have removed iproute for 8.0 and installed 7.3 and it works just fine.

Comment 4 Phil Knirsch 2002-10-18 06:44:52 UTC
The strange thing is, i haven't done any changes to iproute between 7.3 and 8.0
that should expose this kind of behaviour.

But it can't be a kernel problem either as the 7.3 packages, as you describe,
works fine.

I'll try to get hold of one more network card next week and look into it.

Read ya, Phil

Comment 5 Allen K. Smith 2002-12-22 11:27:41 UTC
This was fixed some time ago in the iproute2 upstream. It is a bug in the ip
command. Here is the relevant bit that should bring this to life: 

--- iproute-20010824.orig/ip/iproute.c
+++ iproute-20010824/ip/iproute.c
@@ -620,6 +620,8 @@
                }
                rtnh->rtnh_len = sizeof(*rtnh);
                rtnh->rtnh_ifindex = 0;
+               rtnh->rtnh_flags = 0;
+               rtnh->rtnh_hops = 0;
                rta->rta_len += rtnh->rtnh_len;
                parse_one_nh(rta, rtnh, &argc, &argv);
                rtnh = RTNH_NEXT(rtnh);



Comment 6 Giuseppe Raimondi 2003-03-11 12:07:09 UTC
One of my customer found the same behaviour on 8.0
I had him downgrade the iproute rpm to the one from 7.3 and the problem is fixed.
it would be perhaps a nice thing to release an update for 8.0 fixing this
problem, especially from a support point of view
thanks
Giuseppe

Comment 7 Phil Knirsch 2004-04-21 14:55:27 UTC
I just checked the code and the latest upstream version of iproute we
are using in FC2 doesn't initialize the variables.

But looking at the code suggests that they really should be
initialized, so added the updated fix to latest rawhide version.

Read ya, Phil


Note You need to log in before you can comment on or make changes to this bug.