[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b332ecafbd3b4be5949edae050f98882@AcuMS.aculab.com>
Date: Wed, 1 Sep 2021 16:24:50 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'David Ahern' <dsahern@...il.com>,
"'netdev@...r.kernel.org'" <netdev@...r.kernel.org>
Subject: RE: IP routing sending local packet to gateway.
From: David Laight
> Sent: 31 August 2021 17:24
...
> I'm sure it has something to do with the 'fib_trie' data.
> When it fails I get:
> # cat /proc/net/fib_trie
> Id 200:
> |-- 0.0.0.0
> /0 universe UNICAST
> Main:
> +-- 0.0.0.0/0 3 0 6
> |-- 0.0.0.0
> /0 universe UNICAST
> |-- 192.168.1.0
> /24 link UNICAST
> Local:
> +-- 0.0.0.0/0 2 0 2
> +-- 127.0.0.0/8 2 0 2
> +-- 127.0.0.0/31 1 0 0
> |-- 127.0.0.0
> /32 link BROADCAST
> /8 host LOCAL
> |-- 127.0.0.1
> /32 host LOCAL
> |-- 127.255.255.255
> /32 link BROADCAST
> +-- 192.168.1.0/24 2 0 1
> |-- 192.168.1.0
> /32 link BROADCAST
> |-- 192.168.1.99
> /32 host LOCAL
> |-- 192.168.1.255
> /32 link BROADCAST
I've found a script that gets run after the IP address and default route
have been added that does:
SOURCE=192.168.1.88
GATEWAY=192.168.1.1
ip rule add from "$SOURCE" lookup px0
ip rule add to "$SOURCE" lookup px0
ip route add default via ${GATEWAY} dev px0 src ${SOURCE} table px0
The 'ip rule' are probably not related (or needed).
I suspect they cause traffic to the local IP be transmitted on px0.
(They may be from a strange setup we had where that might have been needed,
but why something from 10 years ago appeared is beyond me - and our source control.)
Am I right in thinking that the 'table px0' bit is what causes 'Id 200'
be created and that it would really need the normal 'use arp' route
added as well?
There is an attempt at some 'clever routing' in the script.
A second interface can be configured that might have its own
'default route' - but all that traffic (all RTP) is sent using
rawip and can select the specific interface.
It has to be said that should really just use a different network
namespace - and it would all be much simpler.
(As well as giving the RTP access to all 64k UDP port numbers.)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists