Subject: Re: PPPoE doesn't auto-add interface route
To: Martin Husemann <email@example.com>
From: Rick Byers <rb-netbsd@BigScaryChildren.net>
Date: 12/11/2001 13:14:34
On Sun, 9 Dec 2001, Martin Husemann wrote:
> > The in-kernel PPPoE doesn't appear to automatically add a route to
> > localhost for the interface address like other interfaces do.
> This confused me for a moment, as I couldn't see anything the pppoe code is
> not doing that it is supposed to do. With some pointers from Matt Thomas
> I found this "automagically add a route to the local address via the first
> configured loopback interface" happens via the ARP code for ethernet, arcnet
> and probably fddi interfaces (which all do (indirectly) call arp_ifinit).
> It does not happen for other interface types.
> Try setting up a standard ppp connection via pppd(8) and the ppp0 interface:
> you won't get a default route to the local endpoint.
Ahh, I guess I never noticed that before...
> > But what about people with dynamic IPs?
> They probably most of the time do not care, as they don't bind any services
> to this P2P endpoint but use NAT and bind to the internal addresses.
> You can add the route manually via the ip-up script.
> (see ifwatchd(8) or wait one or two days for the missing pppoe(8) man page
> and /etc/rc.d/ifwatchd)
Cool! That should do the trick.
> I have no clue if we should add this (and how) to all not yet covered
> interfaces. Calling arp_ifinit for an interface without LLADDR does not
> look like the right thing to do.
Yeah. With ifwatchd, its easy enough to do from userland so I guess it
doesn't really matter if the kernel does it or not. Just aslong as its
obvious that its up to the user (i.e. maybe done by default ip-up/ip-down
scripts), because (IMHO) its a natural assumption that ppp interfaces
behave the same as lan interfaces in that respect, and it can easily go
unnoticed and potentially cause lots of unnecessary network traffic.