Subject: Re: null interface implementation
To: None <itojun@iijlab.net>
From: Andrew Brown <atatat@atatdot.net>
List: tech-net
Date: 08/22/2002 00:53:33
>>I attached a small patch to use null0 network interface
>
>	IIRC you can use lo1 for this (maybe with RTF_REJECT).

i also did this once, but as a cloning interface (which led to me
making tun into a cloning interface instead) without any flags or
interface ioctls, but hit a couple of weird spots (i've still got the
code, in case anyone wants it):

 * if it's an interface marked loopback (as lo1 would be) then ipv6
   automagically assigns the address ::1 to it, which seems rather
   wrong

 * if it's not marked loopback, ipv6 to the auto-configured address on
   that interface seems to transit the loopback interface so that ping
   still works, even though (technically) it should not

it struck me, at the time, as perhaps slightly unnecessary (yes, you
can do all of it with reject or blackhole routes via lo0 or lo1)
albeit logical interface to have.  it can allow one to make routes
that are *visually* distinct (imagine that nul0 is all the stuff that
just gets blackholed and that nul1 is all the stuff that gets
rejected, etc).  you can also make classes of routes go up and down
based on the interface state.  and...if we ever have anything like
cisco's vurp, it would be real useful as well.

i just feel that cluttering the loopback interface with piles of
routes is somehow wrong, however much it may work, but that's just my
opinion.  hey, it's not like i even look at it that much, so whatever.
:)

-- 
|-----< "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."