Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The \ is only to show segmentation of a long sentance.. but just for giggles I tried it.
and as expected it didn't work
[root@dns ~]# ip route add default scope global nexthop via 192.168.1.254 dev wlan0 weight 1 \
nexthop via 192.168.25.2 dev eth0 weight 1
Error: "nexthop" or end of line is expected instead of " nexthop"
This one has really got me. i just cannot find a solution to this, and your help is appreciated.
I just finished trying a new configuration using fwmark with iptables with the EXACTLY the same result.
Strange, because as you have mentioned before, if you change order of "nexthop" everything works but different way.
So looks like balancing doesn't work, or kernel chooses only first route always.
You may try to disconnect one interface, to check this, or you can change "weight".
you maybe correct on this. I was also thinking because the wireless card in the server is a linksys WMP54GS using ndiswrpper that this may be affecting it.. I initially disregarded this as it was working when you pinged or tracepathed to the respective gateways.
it still doesn't really explain why the route cache is using the wrong source ip address..
I may just start from scratch recompile the kernel, reconfigure the interface, and see if i can get away from using ndiswrapper for this wireless nic..
I just know that this problem is hinging on something small and seemingly insignificant.
usually when I get stuck this seems to allways be the case.
Well Interesting... this is working as a Fall-over.. as soon as I unplugged eth0 (192.168.25.1), the other gateway started to work.. i pluged it back in and it goes back to the way it was before.
the changing of the weight only add's preference to a paticular gateway, witch is what i am finding.. weight 2 on 192.168.25.2 makes 3 of my 5 test tracepath's go out the working gateway. the other 2 hit the one that isnt working correctly.
This will take down the multi-path route as well..
Just tested it.. and as expected the multi-path route is gone.
leaving no default route
[root@dns jason]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.25.0 * 255.255.255.0 U 10 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.1.254 0.0.0.0 UG 0 0 0 wlan0
[root@dns jason]# route del default gw 192.168.1.254
[root@dns jason]# ip route
192.168.1.0/24 dev wlan0 scope link
192.168.25.0/24 dev eth0 proto kernel scope link src 192.168.25.1 metric 10
127.0.0.0/8 dev lo scope link
[root@dns jason]#
I also just tried Appending the default route with
route add default gw 192.168.1.254
ip route append default scope global nexthop via 192.168.1.254 dev wlan0 weight 1 nexthop via 192.168.25.2 dev eth0 weight 1
resulting in
[root@dns jason]# ip route
192.168.1.0/24 dev wlan0 scope link
192.168.25.0/24 dev eth0 proto kernel scope link src 192.168.25.1 metric 10
127.0.0.0/8 dev lo scope link
default via 192.168.25.2 dev eth0
default
nexthop via 192.168.1.254 dev wlan0 weight 1
nexthop via 192.168.25.2 dev eth0 weight 1
[root@dns jason]#
and still the same results... one gateway will respond the other will not.
Last edited by jschofield; 01-20-2010 at 10:17 PM.
Look, right now you have in your output:
192.168.1.0/24 dev wlan0 scope link
192.168.25.0/24 dev eth0 proto kernel scope link src 192.168.25.1 metric 10
127.0.0.0/8 dev lo scope link
default via 192.168.25.2 dev eth0
default
nexthop via 192.168.1.254 dev wlan0 weight 1
nexthop via 192.168.25.2 dev eth0 weight 1
In your previous post there was not it, and really sure that it work through eth0.
Sorry, I have a nasty habit of transposing number and such...
but also i have been flipping around so many numbers and routes that I probably put the wrong one in the post.
I am also sitting at my work station at work here and when I bring the ip route add default scope global nexthop via 192.168.1.254 dev wlan0 weight 1 nexthop via 192.168.25.2 dev eth0 weight 1
its 50/50 shot if my reply posts will make it. so i take it down and manually add my single default route in
route add default gw 192.168.25.2
sorry for the confusion. fatuige is setting in..
Currently yes the eth0 gateway is working. 192.168.25.2 is working in the multi-path route wile 192.168.1.254 is not.
I meant that outputs of "ip route" are different:
the first one from previous page looks like:
[root@dns jason]# ip route
192.168.1.0/24 dev wlan0 scope link
192.168.25.0/24 dev eth0 proto kernel scope link src 192.168.25.1 metric 10
127.0.0.0/8 dev lo scope link
default equalize
nexthop via 192.168.1.254 dev wlan0 weight 1
nexthop via 192.168.25.2 dev eth0 weight 1
Now it looks like:
[root@dns jason]# ip route
192.168.1.0/24 dev wlan0 scope link
192.168.25.0/24 dev eth0 proto kernel scope link src 192.168.25.1 metric 10
127.0.0.0/8 dev lo scope link
default via 192.168.25.2 dev eth0
default
nexthop via 192.168.1.254 dev wlan0 weight 1
nexthop via 192.168.25.2 dev eth0 weight 1
I had added my single default route in and THEN the multi-path route. that is why the output was different.
it was just something i was trying. just to see if it would make the difference.. i also did this with the single default route of 192.168.1.254 then the multi-path route, witch i didnt include in the post as the result was the same
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.