[nog] Strange linux routing issue
mm at yuhu.biz
Tue Jul 30 14:44:15 EEST 2019
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 184.108.40.206/24.
So I have the following routes:
220.127.116.11/24 dev lo src 18.104.22.168
22.214.171.124 via 10.0.0.6 dev eth0 src 126.96.36.199
188.8.131.52 via 10.0.0.9 dev eth0 src 184.108.40.206
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 220.127.116.11 t guests
ip r a 10.200.0.0/24 dev eth1 t guests
We ended up with the following situation:
# ip r g 18.104.22.168
22.214.171.124 dev lo src 126.96.36.199
Even thou, at the same time we have:
# ip r l|grep '^188.8.131.52'
184.108.40.206 via 10.0.0.6 dev eth0 src 10.0.0.1 cache
So, even thou we have a more specific route for 220.127.116.11, 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 18.104.22.168 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(22.214.171.124/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?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 195 bytes
Desc: OpenPGP digital signature
More information about the Nog