Re: Default route (IPv4) demolished by destroying clone (gif/gre) interface




Hello!

On Wed, 16 Aug 2006, Yar Tikhiy wrote:
The question is: Do all the routes really need to be flushed upon
the destruction of an interface?

I've killed devd on my test machine (yesterday's RELENG_6) and done
the following:

root@test# ifconfig vlan0 create
root@test# ifconfig vlan0 inet 10.1.1.1/30
root@test# route add 10.2.2.0/24 10.1.1.1
add net 10.2.2.0: gateway 10.1.1.1
root@test# nst -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 193.108.47.145 UGS 0 64439 rl0
10.0.0.252/30 link#1 UC 0 0 fxp0
10.1.1/30 link#4 UC 0 0 vlan0
10.1.1.1 00:00:00:00:00:00 UHLW 2 0 lo0
10.2.2/24 10.1.1.1 UGS 0 0 vlan0
127.0.0.1 127.0.0.1 UH 0 0 lo0
193.108.47.144/29 link#2 UC 0 0 rl0
193.108.47.145 00:02:b3:8b:26:4a UHLW 2 20523 rl0 38
root@test# ifconfig vlan0 destroy
root@test# nst -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 193.108.47.145 UGS 0 64500 rl0
10.0.0.252/30 link#1 UC 0 0 fxp0
127.0.0.1 127.0.0.1 UH 0 0 lo0
193.108.47.144/29 link#2 UC 0 0 rl0
193.108.47.145 00:02:b3:8b:26:4a UHLW 2 20571 rl0 58

So it seems that just simple 'ifconfig vlan0 destroy' already takes care
about all the routes via the defunct interface, and does this correctly.
The question is whether interface auto-destruction code in kernel does
the same. I don't have removable NIC hardware handy to check this.

Sincerely, Dmitry
--
Atlantis ISP, System Administrator
e-mail: dmitry@xxxxxxxxxxxxxx
nic-hdl: LYNX-RIPE
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • struct ifnet question!
    ... every interface + IN/OUT pair. ... shape out on fxp0 ... ... in this example we have 3 decision trees: ... # ifconfig vlan0 create; ... ...
    (freebsd-net)
  • struct ifnet question!
    ... It use PFIL hooks. ... every interface + IN/OUT pair. ... in this example we have 3 decision trees: ... # ifconfig vlan0 create; ... ...
    (freebsd-net)
  • Re: Automatic VLANS
    ... > ifconfig vlan0 destroy ... > to create or remove vlan0 interface. ... While what you have posted is correct, the automatic vlans the original ...
    (freebsd-net)
  • Re: Default route (IPv4) demolished by destroying clone (gif/gre) interface
    ... root@test# ifconfig vlan0 inet 10.1.1.1/30 ... about all the routes via the defunct interface, ... "The question is whether interface auto-destruction code in kernel does the same." ...
    (freebsd-stable)
  • Re: MROUTING, clonedev
    ... | Compile current kernel with MROUTING enabled. ... | reboot the new kernel ...
    (comp.unix.bsd.openbsd.misc)