Subject: Re: dhcpd(8) _cannot_ be completely disabled on an interface
To: Olaf Seibert <rhialto@polderland.nl>
From: Andrew Brown <atatat@atatdot.net>
List: tech-net
Date: 01/14/2002 03:55:01
>> does the interface pppoe0 get destroyed and created at each line drop,
>> or just go up and down?  it's only destruction and creation that cause
>> the interface index to get bumped...
>
>And would it not be better to re-use those numbers? That seems more
>logical to me.

well...they do ultimately get reused, in much the same manner as pids
get reused.

>A possible counter-argument could be: But we always want different
>numbers for different interfaces. My reaction to that is then: what is
>"different"? Currently, I think, you can re-direct tunnel interfaces
>(change the endpoints) without destroying them. That would qualify too
>as "different". Or you could unplug an ethernet cable and put in another
>one, possibly with associated address changes. Same thing. It does not
>change the interface index. So I don't see any harm in re-useing the
>numbers.

different is related, as i mentioned before, to interface creation and
destruction.  reusing an interface, reconfiguring it, nuking all the
configuration on an interface and later reconfiguring it does not
count as a new interface.

network pc cards get plugged and unplugged.  those are "new".  cloning
interfaces get "created" and "destroyed".  those are also "new".

i believe the interface numbers are used in the kernel for things
other than just "making sure each interface has a different number"
beside the unit number (ie, the 0 after ep0).  the tunnel interface
certainly uses the index numbers to detect if this tun0 is the same as
that tun0.  if, in the middle of a tunnel operation, an interface is
deleted and then created, it can still have the same name, but not
provide the same purpose.  routing also comes to mind as a
possibility, although i won't pretend to have actually verified this
idea.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."