1

One single IP address is routed wrong by one of my Ubuntu server 14.04's. This happens for the second time in about a month.

The route it should have taken is to another server in the local network, that is the endpoint of several OpenVPN tunnels; instead it seems to be routed to the default gateway. Other IP addresses in the same remote network are routed correctly.

The solution is simple, route delete & route add (for the route that should be used for that address) or just reboot, but why does it happen? Can anyone offer a possible explanation?

Routing table, bad & good traceroute follow. I scrambled the nearest non-local IP's and a few names for security. 'bbbb' is the OpenVPN machine, 'aaaa' is the machine that exhibits the error.

All routes except for the default gateway are static, added through 'post-up' in /etc/network/interfaces.

root@aaaa:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         firewallcluster 0.0.0.0         UG    100    0        0 eth0
10.0.0.0        firewallcluster 255.255.255.0   UG    0      0        0 eth0
10.0.0.0        bbbb            255.0.0.0       UG    0      0        0 eth0
10.0.60.0       firewallcluster 255.255.255.0   UG    0      0        0 eth0
10.1.0.0        firewallcluster 255.255.255.0   UG    0      0        0 eth0
10.8.0.0        10.9.0.36       255.255.255.0   UG    0      0        0 eth0
10.9.0.0        *               255.255.254.0   U     0      0        0 eth0
10.10.10.8      firewallcluster 255.255.255.255 UGH   0      0        0 eth0
10.10.10.9      firewallcluster 255.255.255.255 UGH   0      0        0 eth0
10.10.10.11     firewallcluster 255.255.255.255 UGH   0      0        0 eth0
10.33.0.0       firewallcluster 255.255.0.0     UG    0      0        0 eth0

root@aaaa:~# traceroute 10.11.16.10
traceroute to 10.11.16.10 (10.11.16.10), 30 hops max, 60 byte packets
1  10.9.0.252 (10.9.0.252)  0.589 ms  0.729 ms  0.893 ms
2  xx.xx-xx-xxx.adsl-static.isp.belgacom.be (xxx.xx.xx.xx)  5.803 ms  5.824 ms  5.879 ms
3  zz.zz.zzz.zzz (zz.zz.zzz.zzz)  7.658 ms  7.688 ms  8.021 ms
4  xx.xxx-xxx-xx.adsl-static.isp.belgacom.be (xx.xxx.xxx.xx)  8.394 ms  9.398 ms  9.235 ms
5  ae-28-1000.iprstr1.isp.belgacom.be (91.183.246.84)  9.171 ms  8.401 ms  8.959 ms
6  ae-17-1000.ibrstr3.isp.belgacom.be (91.183.246.88)  8.476 ms  7.221 ms  7.463 ms^C

root@aaaa:~# traceroute 10.11.16.12
traceroute to 10.11.16.12 (10.11.16.12), 30 hops max, 60 byte packets
1  bbbb (10.9.0.22)  0.399 ms  0.430 ms  0.422 ms
2  10.255.255.234 (10.255.255.234)  27.611 ms  28.214 ms  29.370 ms
3  10.11.16.12 (10.11.16.12)  29.806 ms  30.783 ms  31.429 ms
4
  • Is the output of the route command what is defined in the routing table? If not, could you post /etc/network/interfaces to paste.ubuntu.com ?
    – Fabby
    Feb 9, 2015 at 7:11
  • Sorry for the late response. The route command dumps the kernel routing table. The routes are set up in post up events for eth0 in /etc/network/interfaces, for example "post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.0.22". BTW, 'firewallcluster' in the original question and '10.9.0.252' are the same, it's also the default gateway.
    – Luc VdV
    Mar 26, 2015 at 14:22
  • What I think is happening, is that a 'network unreachable' packet (when one of the VPN tunnels is down) causes traffic for a certain IP address to be sent to the next less specific route, but not back to the correct one when the tunnel comes back up. The machine where this happens is not the one where the tunnels' end points are, so it can't know when the tunnel comes back up.
    – Luc VdV
    Mar 26, 2015 at 14:29
  • Your netmasks are wrong: 10 is an A-class address, but you use them as B-classes and then cast them to C-classes. But depending on what you've got running, that might still work. But the 10.0.0.0 to both the DG and the bbb machine is fishy. Could you post all of the configs where you define stuff? (A.U.B.?)
    – Fabby
    Mar 26, 2015 at 19:08

0

You must log in to answer this question.

Browse other questions tagged .