Hi, With a 2.2.20 kernel (and 2.2.19) and iproute2-ss991023, I''m having trouble with nexthop syntax - or, I think the syntax is right according to examples, but it''s not working for me. For instance: ~# ip ro add default nexthop via 65.xx.yy.97 dev eth2 nexthop via 66.zz.ww.207 dev eth1 RTNETLINK answers: Invalid argument Since at first I was following an example from Matthew Marsh''s book Policy Routing Using Linux (which is generally helpful), I e-mailed him on this, and he wrote back that while it worked for him on a 2.2.13 system, on 2.4.x it failed for him too. Have I left something necessary out of the kernel? I have: # Networking options # CONFIG_PACKET=y CONFIG_NETLINK=y CONFIG_RTNETLINK=y # CONFIG_NETLINK_DEV is not set CONFIG_FIREWALL=y # CONFIG_FILTER is not set CONFIG_UNIX=y CONFIG_INET=y # CONFIG_IP_MULTICAST is not set CONFIG_IP_ADVANCED_ROUTER=y CONFIG_RTNETLINK=y CONFIG_NETLINK=y CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_MULTIPATH=y CONFIG_IP_ROUTE_TOS=y CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_ROUTE_LARGE_TABLES is not set CONFIG_IP_ROUTE_NAT=y # CONFIG_IP_PNP is not set CONFIG_IP_FIREWALL=y # CONFIG_IP_FIREWALL_NETLINK is not set CONFIG_IP_ROUTE_FWMARK=y # CONFIG_IP_TRANSPARENT_PROXY is not set CONFIG_IP_MASQUERADE=y Thanks, Whit
On Tue, Dec 04, 2001 at 02:10:58PM -0500, Whit Blauvelt wrote:> Hi, > > With a 2.2.20 kernel (and 2.2.19) and iproute2-ss991023, I''m having trouble > with nexthop syntax - or, I think the syntax is right according to examples, > but it''s not working for me....Just FYI, upgrading to iproute2-ss001007 doesn''t fix this at all for me. A Google search shows a handful of other people seeing this same problem, and no one giving an answer. So what the heck is this depending on? (Sure would be nice if the code quoted the parameters it''s unhappy with in a case like this, but I understand Alexey considers his whole effort "proof of concept" rather than production code.) Whit
On Tue, Dec 04, 2001 at 02:10:58PM -0500, Whit Blauvelt wrote:> > # Networking options> # CONFIG_NETLINK_DEV is not setFor the record, turning that one on is not the fix for the problem either. Damn, this is driving me up the wall. Whit
Hello, On Tue, 4 Dec 2001, Whit Blauvelt wrote:> On Tue, Dec 04, 2001 at 02:10:58PM -0500, Whit Blauvelt wrote: > > Hi, > > > > With a 2.2.20 kernel (and 2.2.19) and iproute2-ss991023, I''m having trouble > > with nexthop syntax - or, I think the syntax is right according to examples, > > but it''s not working for me.... > > Just FYI, upgrading to iproute2-ss001007 doesn''t fix this at all for me.What about iproute2-2.4.7-now-ss010824.tar.gz? There are some fixes related to multipath (may be not for your case). If that does not help then you have to show your routes in table main before using the command.> WhitRegards -- Julian Anastasov <ja@ssi.bg>
Hi Julian and all, Thanks for advice. Where does ss010824 live? The "current" version from Alexey''s ftp server is ss001007. My main table before the command fails looks like: # ip ro ls tab main 66.xx.yy.208/28 dev eth1 proto kernel scope link src 66.xx.yy.210 65.yy.xx.96/27 dev eth2 proto kernel scope link src 65.yy.xx.104 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.245 default via 65.yy.xx.97 dev eth2 default via 66.xx.yy.209 dev eth1 equalize Then after: # ip ro del default # ip ro del default # ip ro ls 66.xx.yy.208/28 dev eth1 proto kernel scope link src 66.xx.yy.210 65.yy.xx.96/27 dev eth2 proto kernel scope link src 65.yy.xx.104 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.245 So then I try: # ip ro add default nexthop via 65.yy.xx.97 dev eth2 nexthop via 66.xx.yy.209 dev eth1 RTNETLINK answers: Invalid argument Where can the problem be? The initial setup with the defaults entered separately isn''t what I need, since the lines are unequal (need weights to work right). Thanks, Whit On Wed, Dec 05, 2001 at 01:08:13AM +0000, Julian Anastasov wrote:> > Hello, > > On Tue, 4 Dec 2001, Whit Blauvelt wrote: > > > On Tue, Dec 04, 2001 at 02:10:58PM -0500, Whit Blauvelt wrote: > > > Hi, > > > > > > With a 2.2.20 kernel (and 2.2.19) and iproute2-ss991023, I''m having trouble > > > with nexthop syntax - or, I think the syntax is right according to examples, > > > but it''s not working for me.... > > > > Just FYI, upgrading to iproute2-ss001007 doesn''t fix this at all for me. > > What about iproute2-2.4.7-now-ss010824.tar.gz? There are > some fixes related to multipath (may be not for your case). If that > does not help then you have to show your routes in table main before > using the command. > > > Whit > > Regards > > -- > Julian Anastasov <ja@ssi.bg> > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Just another note for the record: Booting a kernel without the FreeS/WAN IPSec patches does not fix this either. The only other patches on this kernel (aside from Julian''s - and the problem was there for a 2.2.19 kernel without those) are for ReiserFS - and I can''t quite imagine file system code affecting routing code. Yet other people are using "nexthop" with 2.2.20 kernels just fine. If I really garble the syntax I can get an error message like "expecting nexthop or line end" - so the kernel as compiled is _aware_ of nexthop, it just won''t accept the standard syntax for it. Yeesh! Whit
Hello, On Wed, 5 Dec 2001, Whit Blauvelt wrote:> Thanks for advice. Where does ss010824 live? The "current" version from > Alexey''s ftp server is ss001007.ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.4.7-now-ss010824.tar.gz> RTNETLINK answers: Invalid argument > > Where can the problem be? The initial setup with the defaults entered > separately isn''t what I need, since the lines are unequal (need weights to > work right).I''m not sure, sorry> Thanks, > WhitRegards -- Julian Anastasov <ja@ssi.bg>
I think you must include "scope global" words, line must be like this: # ip ro add default scope global \ nexthop via 65.yy.xx.97 dev eth2 \ nexthop via 66.xx.yy.209 dev eth1 If you want to equalize traffic you must add the "equalize" word after "default" : # ip ro add default equalize scope global \ nexthop via 65.yy.xx.97 dev eth2 \ nexthop via 66.xx.yy.209 dev eth1 Regards, Jorge ----- Original Message ----- From: "Whit Blauvelt" <whit@transpect.com> To: "Julian Anastasov" <ja@ssi.bg> Cc: <lartc@mailman.ds9a.nl> Sent: Wednesday, December 05, 2001 4:59 PM Subject: Re: [LARTC] Trouble using "nexthop"> Hi Julian and all, > > Thanks for advice. Where does ss010824 live? The "current" version from > Alexey''s ftp server is ss001007. > > My main table before the command fails looks like: > > # ip ro ls tab main > 66.xx.yy.208/28 dev eth1 proto kernel scope link src 66.xx.yy.210 > 65.yy.xx.96/27 dev eth2 proto kernel scope link src 65.yy.xx.104 > 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.245 > default via 65.yy.xx.97 dev eth2 > default via 66.xx.yy.209 dev eth1 equalize > > Then after: > > # ip ro del default > # ip ro del default > # ip ro ls > 66.xx.yy.208/28 dev eth1 proto kernel scope link src 66.xx.yy.210 > 65.yy.xx.96/27 dev eth2 proto kernel scope link src 65.yy.xx.104 > 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.245 > > So then I try: > > # ip ro add default nexthop via 65.yy.xx.97 dev eth2 nexthop via66.xx.yy.209 dev eth1> RTNETLINK answers: Invalid argument > > Where can the problem be? The initial setup with the defaults entered > separately isn''t what I need, since the lines are unequal (need weights to > work right). > > Thanks, > Whit > > > On Wed, Dec 05, 2001 at 01:08:13AM +0000, Julian Anastasov wrote: > > > > Hello, > > > > On Tue, 4 Dec 2001, Whit Blauvelt wrote: > > > > > On Tue, Dec 04, 2001 at 02:10:58PM -0500, Whit Blauvelt wrote: > > > > Hi, > > > > > > > > With a 2.2.20 kernel (and 2.2.19) and iproute2-ss991023, I''m havingtrouble> > > > with nexthop syntax - or, I think the syntax is right according toexamples,> > > > but it''s not working for me.... > > > > > > Just FYI, upgrading to iproute2-ss001007 doesn''t fix this at all forme.> > > > What about iproute2-2.4.7-now-ss010824.tar.gz? There are > > some fixes related to multipath (may be not for your case). If that > > does not help then you have to show your routes in table main before > > using the command. > > > > > Whit > > > > Regards > > > > -- > > Julian Anastasov <ja@ssi.bg> > > > > > > _______________________________________________ > > LARTC mailing list / LARTC@mailman.ds9a.nl > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:http://ds9a.nl/2.4Routing/> > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:http://ds9a.nl/2.4Routing/>
On Wed, Dec 05, 2001 at 06:25:33PM +0200, Julian Anastasov wrote:> > Thanks for advice. Where does ss010824 live? The "current" version from > > Alexey''s ftp server is ss001007. > > ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.4.7-now-ss010824.tar.gzAh, maybe he doesn''t have that linked as "current" because (on Debian with gcc version 2.95.2 20000220) it won''t compile? There was no problem compiling previous versions. Is there an obvious fix for the result below? Thanks again, Whit # make make[1]: Entering directory `/usr/src/iproute2/lib'' gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -Werror -g -I../include-glibc -include ../include-glibc/glibc-bugs.h -I/usr/src/linux/include -I../include -DRESOLVE_HOSTNAMES -c -o ll_types.o ll_types.c ll_types.c: In function `ll_type_n2a'': ll_types.c:48: `ARPHRD_ATM'' undeclared (first use in this function) ll_types.c:48: (Each undeclared identifier is reported only once ll_types.c:48: for each function it appears in.) ll_types.c:48: initializer element is not constant ll_types.c:48: (near initialization for `arphrd_names[10].type'') ll_types.c:50: `ARPHRD_IEEE1394'' undeclared (first use in this function) ll_types.c:50: initializer element is not constant ll_types.c:50: (near initialization for `arphrd_names[12].type'') ll_types.c:60: `ARPHRD_HWX25'' undeclared (first use in this function) ll_types.c:60: initializer element is not constant ll_types.c:60: (near initialization for `arphrd_names[21].type'') ll_types.c:64: `ARPHRD_DDCMP'' undeclared (first use in this function) ll_types.c:64: initializer element is not constant ll_types.c:64: (near initialization for `arphrd_names[25].type'') ll_types.c:65: `ARPHRD_RAWHDLC'' undeclared (first use in this function) ll_types.c:65: initializer element is not constant ll_types.c:65: (near initialization for `arphrd_names[26].type'') ll_types.c:102: `ARPHRD_IEEE80211'' undeclared (first use in this function) ll_types.c:102: initializer element is not constant ll_types.c:102: (near initialization for `arphrd_names[59].type'') make[1]: *** [ll_types.o] Error 1 make[1]: Leaving directory `/usr/src/iproute2/lib'' make: *** [all] Error 2
Hi Jorge, Thanks. Unfortunately not the fix: # ip ro add default scope global nexthop via 66.xx.yy.209 dev eth1 nexthop via 65.yy.xx.97 dev eth2 RTNETLINK answers: Invalid argument # ip ro add default equalize scope global nexthop via 66.xx.yy.209 dev eth1 nexthop via 65.yy.xx.97 dev eth2 RTNETLINK answers: Invalid argument Sigh, Whit On Wed, Dec 05, 2001 at 06:15:28PM +0100, jcastellet@infalsys.es wrote:> I think you must include "scope global" words, line must be like this: > > # ip ro add default scope global \ > nexthop via 65.yy.xx.97 dev eth2 \ > nexthop via 66.xx.yy.209 dev eth1 > > If you want to equalize traffic you must add the "equalize" word after > "default" : > > # ip ro add default equalize scope global \ > nexthop via 65.yy.xx.97 dev eth2 \ > nexthop via 66.xx.yy.209 dev eth1 > > Regards, > Jorge
Here''s another strange error message. I know this syntax is wrong: # ip ro ap default nexthop 66.95.83.209 dev eth1 nexthop 65.84.205.97 dev eth2 Error: "nexthop" or end of line is expected instead of "66.95.83.209" - what I''ve done is leave out the "via"s - but it should _not_ be expecting either "nexthop" or an EOL directly after a "nexthop" statement, right?! Does this give a clue to what''s broken when the syntax is entered ''correctly''? Whit
On Wed, Dec 05, 2001 at 07:12:54PM -0500, Whit Blauvelt wrote:> Here''s another strange error message. I know this syntax is wrong: > > # ip ro ap default nexthop 66.95.83.209 dev eth1 nexthop 65.84.205.97 dev eth2 > Error: "nexthop" or end of line is expected instead of "66.95.83.209" > > - what I''ve done is leave out the "via"s - > > but it should _not_ be expecting either "nexthop" or an EOL directly after a > "nexthop" statement, right?! Does this give a clue to what''s broken when the > syntax is entered ''correctly''?Do you have CONFIG_IP_ROUTE_MULTIPATH=y in your .config? Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services Trilab The Technology People Netherlabs BV / Rent-a-Nerd.nl - Nerd Available - ''SYN! .. SYN|ACK! .. ACK!'' - the mating call of the internet
On Thu, Dec 06, 2001 at 01:30:41PM +0100, bert hubert wrote:> Do you have CONFIG_IP_ROUTE_MULTIPATH=y in your .config?Yup, CONFIG_IP_ROUTE_MULTIPATH=y So I guess it has to be something really obscure, like multipath not working with a particular netmask (one here is a /27, one a /28)?? That is, it looks like there''s really a bug in the code, not my configuration? One of the few things I haven''t tried is setting CONFIG_IP_ROUTER, since the system in question isn''t only a router and what that claims to do is not add anything but instead turn off kernel code that usefully optimizes host functions. But I suppose many of those using the routing functions have this set, so maybe I''ll try it next. Whit
On Thu, 6 Dec 2001 10:44:44 -0500 Whit Blauvelt <whit@transpect.com> wrote:> On Thu, Dec 06, 2001 at 01:30:41PM +0100, bert hubert wrote: > > > Do you have CONFIG_IP_ROUTE_MULTIPATH=y in your .config? > > Yup, > > CONFIG_IP_ROUTE_MULTIPATH=y > > So I guess it has to be something really obscure, like multipath not working > with a particular netmask (one here is a /27, one a /28)?? That is, it looks > like there''s really a bug in the code, not my configuration?Here it''s working with one /24 and one /26. -- Christoph Simon ciccio@kiosknet.com.br --- ^X^C q quit :q ^C end x exit ZZ ^D ? help .
> One of the few things I haven''t tried is setting CONFIG_IP_ROUTER.Just for the record again: tried that with fresh source and a fresh compile - still doesn''t work. Whit
Hello, On Tue, 4 Dec 2001, Whit Blauvelt wrote:> Hi, > > With a 2.2.20 kernel (and 2.2.19) and iproute2-ss991023, I''m having trouble > with nexthop syntax - or, I think the syntax is right according to examples, > but it''s not working for me. For instance: > > ~# ip ro add default nexthop via 65.xx.yy.97 dev eth2 nexthop via 66.zz.ww.207 dev eth1 > RTNETLINK answers: Invalid argumentCan you try to fix iproute2/ip/iproute.c:parse_nexthops() with change like this: --- iproute2/ip/iproute.c.orig Mon Aug 6 03:31:52 2001 +++ iproute2/ip/iproute.c Thu Dec 20 13:14:06 2001 @@ -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); This is for iproute2-2.4.7-now-ss010824.tar.gz. If you are using different version then make sure the fix resets all fields: rtnh_ifindex, rtnh_flags and rtnh_hops. Your problem is probably unexpected bits set in the rtnh_flags and refused from the kernel (probably fib_semantics.c:fib_check_nh or another place) Regards -- Julian Anastasov <ja@ssi.bg>