I recently started using ip route commands for advanced routing stuff. Now I am faced with something rather perplexing for me. The default route added to the table will be easily deleted, while the other route will remain.
I add these two rules:
ip route add dev wlan0 default via 192.168.0.1 table 21 ip route add dev wlan0 192.168.0.0/24 table 21
Now if I do:
ip route show table 21
I see both of these rules.
default via 192.168.0.1 dev wlan0 192.168.0.0/24 dev wlan0 scope link
If I try to delete table 21 and show it again:
ip route del table 21 ip route show table 21
This rule still remains.
192.168.0.0/24 dev wlan0 scope link
Can anyone explain this? The man page says del is designed to remove ROUTE, which also includes tables.
linux routing
Vincent ketelaars
source share