You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a separate route table called 'lan':
root@btkrgn:~# cat /etc/iproute2/rt_tables
reserved values
128 prelocal
255 local
254 main
253 default
0 unspec
local
#1 inr.ruhep
40 lan
Then I have an interface configured with ip4table:
config interface 'ni'
option type 'bridge'
option delegate '0'
option ifname 'eth0.22 vx22'
option proto 'static'
option ipaddr '192.168.22.248'
option ip4table 'lan'
option netmask '255.255.255.0'
And I also have static route with explicitly defined table 'main':
config route
option interface 'ni'
option target '192.168.22.0'
option netmask '255.255.255.0'
option gateway '192.168.22.253'
option table 'main'
option metric '100'
I expected that this static route will be in the 'main' table however it is being added to 'lan' table:
root@btkrgn:~# ip route show table lan
192.168.22.0/24 dev br-ni proto static scope link
192.168.22.0/24 via 192.168.22.253 dev br-ni proto static metric 100
The text was updated successfully, but these errors were encountered:
I think that this commit is relevant:
commit 4452867c4b34cb0d9dc7fe9dc42ecc86af887176
Author: Steven Barth steven@midlink.org
Date: Fri Jun 20 19:50:13 2014 +0200
interface: don't store table id in route if the default table is used
Use system_is_default_rt_table() to test whether the resolved routing table
is the default one, in this case do not apply the table attribute to the
route object.
This is needed for backwards compatibility - only routes using a non-default
table shall report it in the ifstatus output.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
petzah:
I have a separate route table called 'lan':
root@btkrgn:~# cat /etc/iproute2/rt_tables
reserved values
128 prelocal
255 local
254 main
253 default
0 unspec
local
#1 inr.ruhep
40 lan
Then I have an interface configured with ip4table:
config interface 'ni'
option type 'bridge'
option delegate '0'
option ifname 'eth0.22 vx22'
option proto 'static'
option ipaddr '192.168.22.248'
option ip4table 'lan'
option netmask '255.255.255.0'
And I also have static route with explicitly defined table 'main':
config route
option interface 'ni'
option target '192.168.22.0'
option netmask '255.255.255.0'
option gateway '192.168.22.253'
option table 'main'
option metric '100'
I expected that this static route will be in the 'main' table however it is being added to 'lan' table:
root@btkrgn:~# ip route show table lan
192.168.22.0/24 dev br-ni proto static scope link
192.168.22.0/24 via 192.168.22.253 dev br-ni proto static metric 100
The text was updated successfully, but these errors were encountered: