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:
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
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
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.
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
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);
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
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