From: James Carlson <carlsonj@workingcode.com>
To: linux-ppp@vger.kernel.org
Subject: Re: IFF_RUNNING support for ppp interfaces?
Date: Mon, 09 Feb 2009 15:17:32 +0000 [thread overview]
Message-ID: <18832.18700.496640.25336@gargle.gargle.HOWL> (raw)
In-Reply-To: <OF25BF4B49.1E3AF8FD-ONC1257551.0047CFD6-C1257551.00493095@transmode.se>
Joakim Tjernlund writes:
> James Carlson <carlsonj@workingcode.com> wrote on 09/02/2009 13:10:45:
> > I don't think that's a problem with the current code. If you do see a
> > problem here, then I think it'd be helpful to have the problem itself
> > described in some detail, rather than focussing on what solution you'd
> > like to see implemented.
>
> I should have been clearer. I think it is a bit rude to tear down/delete
> the ppp interface when it looses a link. Compare with ethernet, when the
> cable
> is pulled you still see the I/F but the running status is gone so you get
> a clue
> to what is wrong. For ppp the I/F is just deleted and you can only guess
> the cause,
> or start looking at logs to find out what happened.
Ah, this is a much higher-level issue, and is only slightly related to
IFF_RUNNING.
The real issue is that (a) there are at least two different "kinds" of
PPP links, (b) the identity of the IP-level object doesn't say
anything about the physical entity, and (c) a bit about pppd design
itself.
With Ethernet, you (generally) know that a "net0" interface is
connected to a single hardware instance, and that IFF_RUNNING
transitions represent changes in the status of that one instance.
With PPP, things are different. First of all, to point (a), there are
different kinds of PPP links that we have no good way of
distinguishing. One type is (as you suggest) a point-to-point
connection between two nodes that seldom gets rewired. This is like
Ethernet, and it'd be nice if there were a way to leave the IP
interface in place and toggle that bit when the link goes down. It's
still conceptually the "same" interface when it goes up and down.
The other type is the dynamic kind. The IP interface you see doesn't
represent anything at all about the "wire" because the wire is in some
way virtual -- either a PSTN connection, or tunneled as in L2TP or
PPTP. The pppd code base actually comes from this world, and the
interface isn't at all the same when it goes up and down. The "pppX"
interfaces don't have administrative significance in that they don't
identify the underlying link.
To point (b), the "net0" interface is normally used as an
administrative proxy for the wire itself -- the user has a 1-to-1
mapping in his head for the IP interface names and the wires he sees.
That's not so for PPP, where "ppp0" could be "tty0" in one
incarnation, but "tty1" in another. There's no stable mapping. (It'd
be nice in some ways if these were actually named "ttyN" ... but
that's probably a bigger issue to deal with.)
For point (c), the way pppd is designed is that the daemon itself is
in charge of the interface, so when the daemon goes away, so must the
interface. That's unlike Ethernet, where there's no daemon at all;
it's entirely a kernel feature. Because that user-level bit goes
away, and we don't typically want trash left behind on the system for
the user to clean up, daemon death means interface destruction.
There is an exception to this: on Solaris, you can plumb the
interfaces separately (using ifconfig or /etc/hostname.*) and then use
the "plumbed" keyword to tell pppd that it should use the _existing_
PPP interface and leave it in place when terminating. In this case,
you get exactly what you've asked about: IFF_RUNNING is turned off
when the PPP link goes down, but the IP interface itself remains in
the list.
If you're not using Solaris, then you'll probably have to check the
documentation for your system (I'm not as familiar with the other
systems), but I suspect there may be no way to do what you're asking
with the design that exists today.
--
James Carlson 42.703N 71.076W <carlsonj@workingcode.com>
prev parent reply other threads:[~2009-02-09 15:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-02 13:18 IFF_RUNNING support for ppp interfaces? Joakim Tjernlund
2009-02-04 17:14 ` James Carlson
2009-02-08 19:23 ` Joakim Tjernlund
2009-02-09 12:10 ` James Carlson
2009-02-09 14:43 ` Joakim Tjernlund
2009-02-09 15:17 ` James Carlson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18832.18700.496640.25336@gargle.gargle.HOWL \
--to=carlsonj@workingcode.com \
--cc=linux-ppp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox