Re: [opensuse-factory] default routeS post-13.1
Andrei Borzenkov composed on 2015-04-07 06:53 (UTC+0300):
Mon, 06 Apr 2015 23:45:04 -0400 Felix Miata composed:
Andrei Borzenkov composed on 2015-04-07 06:22 (UTC+0300):
Felix Miata composed:
Can more than one default route per interface be configured?
I think I partially answered this by experiment. I booted TW to find default route 192.168.1.1 while using router with 192.168.0.1. I ran
route add default gw 192.168.0.1 eth0
That produced:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
which is working, but I have no idea if this holds any potential problem.
Your system is using single router 192.168.0.1.
How is it supposed to work?
I don't know.
How should system select which route to use?
Round robin?
So half of the packets get lost?
You tell me.
Pick fastest?
Define fastest ...
s/fastest/most responsive/
First in list?
That is what it currently does. It will always use the first one. So having more than one effectively does nothing.
Then with mc I could comment one line or the other according to which used, assuming it gets picked up right away as when a change to /etc/hosts gets made to deny access to another adserver.
I configure my own installations with fixed IP. I want to be able to take any of them elsewhere, discover the IP of the relevant gateway/router, and using mcedit, change, or add, whatever is necessary, without starting any GUI, YaST, or any kind of "manager". Is this asking too much?
Show fix IP you configured and IP of (default) router you want to use.
location 1 (router 1): 192.168.0.1
location 2 (router 2): 192.168.1.1
I assume default netmask ...
host: 192.168.0.121
Second one won't work. Gateway must be on locally attached network. It had always been this way. Even if you manage to fool your system in sending packets to this address, gateway won't know how to reply.
I'm not necessarily trying to have both configured at once. I only want it simple to change if I bring a PC to some network that uses a different router IP. I now have this particular host configured with fixed IP on 13.1 and TW, and DHCP on 13.2 and the other 13.1. All seems good here except with TW. In TW, actions affecting network, like mounting a NFS share, or pinging, exhibit huge delays. Network throughput, as when running zypper dup, seems normal. This is some data from 13.3 as of last having yast2 do network configuration, then disabling Wicked's DHCP and nanny, which I hoped would eliminate the delays, but did not: # ll /boot/initrd-3.19.3* -rw------- 1 root root 5859740 Apr 7 01:38 /boot/initrd-3.19.3-1-desktop /etc/sysconfig/network # ls -l -rw-r--r-- 1 root root 11617 Feb 23 20:35 config -rw-r--r-- 1 root root 139 Apr 7 05:21 dhcp -rw------- 1 root root 143 Feb 23 20:30 ifcfg-eth0 -rw------- 1 root root 173 Mar 18 08:25 ifcfg-lo -rw-r--r-- 1 root root 21738 Feb 20 06:45 ifcfg.template -rw-r--r-- 1 root root 29 Apr 7 05:21 ifroute-eth0 -rw-r--r-- 1 root root 0 Apr 7 05:21 routes # cat ifcfg-eth0 BOOTPROTO='static' IPADDR='192.168.0.121/24' BROADCAST='192.168.0.255' STARTMODE='onboot' NAME='NetXtreme BCM5751 Gigabit Ethernet PCI Express' # cat ifroute-eth0 default 192.168.0.1 - eth0 # systemctl list-units | grep wick wicked.service loaded active exited wicked managed network interfaces wickedd-auto4.service loaded active running wicked AutoIPv4 supplicant service wickedd.service loaded active running wicked network management service daemon # systemctl list-unit-files | grep wick wicked.service enabled wickedd-auto4.service enabled wickedd-dhcp4.service disabled wickedd-dhcp6.service disabled wickedd-nanny.service disabled wickedd.service enabled # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:... inet addr:192.168.0.121 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:464 errors:0 dropped:0 overruns:0 frame:0 TX packets:506 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:50224 (49.0 Kb) TX bytes:44907 (43.8 Kb) Interrupt:16 # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 # ping www.google.com PING www.google.com (216.58.219.164) 56(84) bytes of data. 64 bytes from mia07s27-in-f4.1e100.net (216.58.219.164): icmp_seq=1 ttl=47 time=26.5 ms 64 bytes from mia07s27-in-f4.1e100.net (216.58.219.164): icmp_seq=2 ttl=47 time=27.1 ms 64 bytes from mia07s27-in-f4.1e100.net (216.58.219.164): icmp_seq=3 ttl=47 time=26.8 ms 64 bytes from mia07s27-in-f4.1e100.net (216.58.219.164): icmp_seq=4 ttl=47 time=25.8 ms ^C64 bytes from 216.58.219.164: icmp_seq=5 ttl=47 time=31.3 ms --- www.google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 20347ms rtt min/avg/max/mdev = 25.825/27.548/31.371/1.973 ms The above ping looks almost normal, omitting the length of time elapsed before output shows on screen. Rather than nearly instant start of response, 10-12 seconds elapse before first line prints, and rather than subsequent following 1 or 2 seconds later each, the delay is approximately 5 seconds each. The telling number is that 20347. Doing the same on this host, that number is 4004, 80% less. So, apparently, one of the observed "failures" earlier in the day was lack of patience in that 10-12 interval, hitting ctrl-C instead of waiting for the delayed output. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Felix Miata wrote:
host: 192.168.0.121
Second one won't work. Gateway must be on locally attached network. It had always been this way. Even if you manage to fool your system in sending packets to this address, gateway won't know how to reply.
I'm not necessarily trying to have both configured at once. I only want it simple to change if I bring a PC to some network that uses a different router IP.
That is most easily done with 'ip'. ip addr del, ip addr add, ip route del default, ip route add default via and os on.
I now have this particular host configured with fixed IP on 13.1 and TW, and DHCP on 13.2 and the other 13.1. All seems good here except with TW. In TW, actions affecting network, like mounting a NFS share, or pinging, exhibit huge delays. Network throughput, as when running zypper dup, seems normal.
So throughput is good, but latency is high - sounds like a DNS issue. -- Per Jessen, Zürich (7.8°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
В Tue, 07 Apr 2015 06:01:00 -0400 Felix Miata <mrmazda@earthlink.net> пишет:
Then with mc I could comment one line or the other according to which used, assuming it gets picked up right away as when a change to /etc/hosts gets made to deny access to another adserver.
It is in /etc/sysconfig/network/routes, same as before. At least, this is were YaST puts it. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tuesday 07 of April 2015 06:01:00 Felix Miata wrote:
Pick fastest?
Define fastest ...
s/fastest/most responsive/
How do you define it? Who would be responsible for measuring the responsiveness and switching the routes?
First in list?
That is what it currently does. It will always use the first one. So having more than one effectively does nothing.
And it never worked any other way. You can't be even sure which one is actually the "first". There is also so-called multipath route but it's not working the way you want either.
# ping www.google.com PING www.google.com (216.58.219.164) 56(84) bytes of data. 64 bytes from mia07s27-in-f4.1e100.net (216.58.219.164): icmp_seq=1 ttl=47 time=26.5 ms 64 bytes from mia07s27-in-f4.1e100.net (216.58.219.164): icmp_seq=2 ttl=47 time=27.1 ms 64 bytes from mia07s27-in-f4.1e100.net (216.58.219.164): icmp_seq=3 ttl=47 time=26.8 ms 64 bytes from mia07s27-in-f4.1e100.net (216.58.219.164): icmp_seq=4 ttl=47 time=25.8 ms ^C64 bytes from 216.58.219.164: icmp_seq=5 ttl=47 time=31.3 ms
--- www.google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 20347ms rtt min/avg/max/mdev = 25.825/27.548/31.371/1.973 ms
The above ping looks almost normal, omitting the length of time elapsed before output shows on screen. Rather than nearly instant start of response, 10-12 seconds elapse before first line prints, and rather than subsequent following 1 or 2 seconds later each, the delay is approximately 5 seconds each. The telling number is that 20347. Doing the same on this host, that number is 4004, 80% less. So, apparently, one of the observed "failures" earlier in the day was lack of patience in that 10-12 interval, hitting ctrl-C instead of waiting for the delayed output.
As already mentioned by Per Jessen, this looks like a DNS issue, not a routing one. I guess you switched networking config but left old /etc/resolv.conf Michal Kubeček -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Felix Miata
-
Michal Kubecek
-
Per Jessen