Trouble using "nexthop"
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=yCONFIG_NETLINK=yCONFIG_RTNETLINK=y
# CONFIG_NETLINK_DEV is not setCONFIG_FIREWALL=y
# CONFIG_FILTER is not setCONFIG_UNIX=yCONFIG_INET=y
# CONFIG_IP_MULTICAST is not setCONFIG_IP_ADVANCED_ROUTER=yCONFIG_RTNETLINK=yCONFIG_NETLINK=yCONFIG_IP_MULTIPLE_TABLES=yCONFIG_IP_ROUTE_MULTIPATH=yCONFIG_IP_ROUTE_TOS=yCONFIG_IP_ROUTE_VERBOSE=y
# CONFIG_IP_ROUTE_LARGE_TABLES is not setCONFIG_IP_ROUTE_NAT=y
# CONFIG_IP_PNP is not setCONFIG_IP_FIREWALL=y
# CONFIG_IP_FIREWALL_NETLINK is not setCONFIG_IP_ROUTE_FWMARK=y
# CONFIG_IP_TRANSPARENT_PROXY is not setCONFIG_IP_MASQUERADE=y
Thanks,
Whit
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 5 lines · Whit Blauvelt
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
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 4 lines · Whit Blauvelt
# Networking options
#
CONFIG_NETLINK_DEVis not set
For the record, turning that one on is not the fix for the problem either.
Damn, this is driving me up the wall.
Whit
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Hello,
Quoted 8 lines · Whit Blauvelt
Quoted 5 lines · Whit Blauvelt
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.
Quoted 1 line
Whit
Regards
--
Julian Anastasov <[email protected]>
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
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
Quoted 23 lines · Julian Anastasov
Hello,
Quoted 8 lines · Whit Blauvelt
Quoted 5 lines · Whit Blauvelt
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 aresome 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.
Quoted 1 line
Whit
Regards
Quoted 7 lines
--
Julian Anastasov <[email protected]>_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
_______________________________________________
LARTC mailing list / [email protected]
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
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Hello,
Quoted 2 lines · Whit Blauvelt
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
Quoted 5 lines
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
Quoted 2 lines
Thanks,
Whit
Regards
--
Julian Anastasov <[email protected]>
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
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" <[email protected]>
To: "Julian Anastasov" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, December 05, 2001 4:59 PM
Subject: Re: [LARTC] Trouble using "nexthop"
Quoted 23 lines
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 equalizeThen 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
Quoted 3 lines
So then I try:
# ip ro add default nexthop via 65.yy.xx.97 dev eth2 nexthop via
66.xx.yy.209 dev eth1
Quoted 6 lines
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).
Quoted 14 lines
Thanks,
WhitQuoted 9 lines · Julian Anastasov
Hello,
Quoted 4 lines · Whit Blauvelt
Quoted 3 lines · Whit Blauvelt
Hi,
With a 2.2.20 kernel (and 2.2.19) and iproute2-ss991023, I'm having
trouble
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
with nexthop syntax - or, I think the syntax is right according to
examples,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
but it's not working for me....
Just FYI, upgrading to iproute2-ss001007 doesn't fix this at all for
me.
Quoted 10 lines
Quoted 10 lines
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.
Quoted 1 line
Whit
Regards
Quoted 7 lines
Quoted 7 lines
--
Julian Anastasov <[email protected]>_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
Quoted 4 lines
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
Quoted 1 line
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
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
Quoted 9 lines · On Wed, Dec 05, 2001 at 06:15:28PM +0100, [email protected] 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 eth1If you want to equalize traffic you must add the "equalize" word after "default" :
Quoted 6 lines
# ip ro add default equalize scope global \ nexthop via 65.yy.xx.97 dev eth2 \ nexthop via 66.xx.yy.209 dev eth1Regards,
Jorge
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
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
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 10 lines · Whit Blauvelt
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
Signature · 8 lines
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 _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 1 line · bert hubert
Do you have
CONFIG_IP_ROUTE_MULTIPATH=yin 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
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 11 lines · On Thu, 6 Dec 2001 10:44:44 -0500 Whit Blauvelt <[email protected]> wrote:
Quoted 1 line · bert hubert
Do you have
CONFIG_IP_ROUTE_MULTIPATH=yin your .config?Yup,
CONFIG_IP_ROUTE_MULTIPATH=ySo 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
[email protected]
---
^X^C
q
quit
:q
^C
end
x
exit
ZZ
^D
?
help
.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 1 line
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
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Hello,
Quoted 8 lines · Whit Blauvelt
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
Can you try to fix iproute2/ip/iproute.c:parse_nexthops()
with change like this:
ip/iproute.c renamed from ip/iproute.c.orig +2 -0
@@ -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 <[email protected]>
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/