[nog] Strange linux routing issue

Marian Marinov mm at yuhu.biz
Tue Jul 30 14:44:15 EEST 2019


Hi guys,
yesterday we saw an issue that is still making me scratch my head...

One of my office routers(a Linux box) has multiple BGP sessions and announces a /24 prefix, lets say it is 12.12.12.0/24.

So I have the following routes:
  ...
  12.12.12.0/24 dev lo src 12.12.12.146
  12.12.12.10 via 10.0.0.6 dev eth0 src 12.12.12.146
  12.12.12.11 via 10.0.0.9 dev eth0 src 12.12.12.146
  ...

Suddenly after a route change(we added another routing table):
  ip ru a from 10.12.0.0/24 t guests
  ip r a 0/0 via 13.13.13.13 t guests
  ip r a 10.200.0.0/24 dev eth1 t guests

We ended up with the following situation:
# ip r g 12.12.12.10
12.12.12.10 dev lo src 12.12.12.146
Even thou, at the same time we have:
# ip r l|grep '^12.12.12.10'
12.12.12.10 via 10.0.0.6 dev eth0  src 10.0.0.1 cache

So, even thou we have a more specific route for 12.12.12.10, the machine thinks the IP is connected on dev lo, and sends the traffic to the loopback interface.

The first thing that solved our problem was:
# ip r a 12.12.12.10 via 10.0.0.6 dev eth0 src 10.0.0.1 t local

Which updated the local routing table and solved the problem, for that specific IP. But now I had to do it for all more specific routes.
So I decided to test another hypothesis.
We moved the IP with the /24 prefix(12.12.12.146/24) from dev lo, to dev eth0(I think any physical interface would do) and tested again.
And it worked like this.


======
So my question is: Have anyone of you seen this strange behavior of the Linux routing?
======


Best regards,
Marian


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ludost.net/pipermail/nog/attachments/20190730/945b7bc5/attachment.sig>


More information about the Nog mailing list