[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

So I have the following routes:
  ... dev lo src via dev eth0 src via dev eth0 src

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

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

So, even thou we have a more specific route for, 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 via dev eth0 src 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( 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,

-------------- 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