Bug 74961 - can't assign mulitpath in ip command
can't assign mulitpath in ip command
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: iproute (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-03 02:39 EDT by Need Real Name
Modified: 2015-03-04 20:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-21 10:55:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-10-03 02:39:02 EDT
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 11:48:07 EDT
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 04:23:20 EDT
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 00:34:36 EDT
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 02:44:52 EDT
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 06:27:41 EST
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 07:07:09 EST
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 10:55:27 EDT
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.