* Re: [PATCH] Re: [Openl2tp-users] OpenL2TP, multilink, ppp[PID] and bundle
@ 2009-12-01 9:24 Johannes Jakob
2009-12-01 11:00 ` [PATCH] Re: [Openl2tp-users] OpenL2TP, multilink, ppp[PID] and Ben McKeegan
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Jakob @ 2009-12-01 9:24 UTC (permalink / raw)
To: linux-ppp
Hi Ben!
Hi Lists,
On Mon, 30 Nov 2009 10:47:27 +0000 (GMT), Ben McKeegan
<ben@netservers.co.uk> wrote:
> On Fri, 27 Nov 2009, Johannes Jakob wrote:
>
>> With multilink disabled, radattr works fine and creates
>> /var/run/radattr.ppp0:
>>
>> RADATTR plugin wrote 8 line(s) to file /var/run/radattr.ppp0.
>>
>> but with enabled multilink it doesn't:
>>
>> rc_map2id: can't find tty /dev/ in map database
>> RADATTR plugin wrote 8 line(s) to file /var/run/radattr..
>>
>>
>> pppd in both cases did attach to ppp0, and ip-up gets called with
>> iface=ppp0, but at the time /var/run/radattr.$iface was written
>> pppd-radattr didn't know the interface the session had been attached to.
>
>
> Here's a patch we use for radattr that delays writing the file until the
> interface name is known.
Thank you very much for your patch! It is working absolutely great and as I
hoped it would (pppd-2.4.5)!
As I think you might have had other similar problems we have, what are your
experiences with openl2tp for dialin users in a large scale? Are there
problems still unsolved?
Currently I'm having trouble monitoring mlppp bundles. Is there any
reasonable and reliable way to check how many ppp links are in a bundle and
if they are up and running?
Because of it's nature, there aren't any pid files in /var/run/ except for
the bundle, ip, ifconfig and netstat aren't of any help, too. Is there any
status plugin, that is multilink aware?
We are still looking for a patch to get pppd to name it's interfaces
ppp[PID] instead of ppp[incrementor], just changing the ifname didn't work
(of course ;)
# diff main.c.orig main.c
740,741c740,741
< info("Using interface %s%d", PPP_DRV_NAME, ifunit);
< slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, ifunit);
---
> info("Using interface %s%d", PPP_DRV_NAME, getpid());
> slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, getpid());
relevant messages:
sess 51907/65380: spawned pppd pid1763
rc_map2id: can't find tty /dev/ in map database
Using interface ppp31763
ioctl(SIOCSIFMTU): No such device (line 1188)
RADATTR plugin wrote 8 line(s) to file /var/run/radattr.ppp31763.
ioctl(SIOCSIFADDR): No such device (line 2332)
Interface configuration failed
Couldn't get PPP statistics: No such device
openl2tp send: sent PPP_UPDOWN_IND, 100 bytes
ioctl (SIOCGIFFLAGS): No such device (line 2292)
ioctl(SIOCSIFADDR): No such device (line 2452)
sent [IPCP TermReq id=0x2 "Interface configuration failed"]
rcvd [IPCP TermAck id=0x2]
Couldn't get PPP statistics: No such device
ioctl(SIOCSIFMTU): No such device (line 1188)
PPPoL2TP options: sendseq lnsmode tid 51907 sid 65380 debugmask 10
sent [LCP TermReq id=0x3 "No network protocols running"]
rcvd [LCP TermAck id=0x3]
Connection terminated.
RADATTR plugin removed file /var/run/radattr.ppp31763.
I know that rp-l2tp provides an option to set interface names with PID, but
we are using OpenL2TP ;)
Again, Ben, thanks a lot for your patch, you saved my day!
Thanks for any other hint to anybody how want's to help me out on the other
issues ;)
Greetings,
Johannes Jakob
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Re: [Openl2tp-users] OpenL2TP, multilink, ppp[PID] and
2009-12-01 9:24 [PATCH] Re: [Openl2tp-users] OpenL2TP, multilink, ppp[PID] and bundle Johannes Jakob
@ 2009-12-01 11:00 ` Ben McKeegan
0 siblings, 0 replies; 2+ messages in thread
From: Ben McKeegan @ 2009-12-01 11:00 UTC (permalink / raw)
To: linux-ppp
Johannes Jakob wrote:
>
> Thank you very much for your patch! It is working absolutely great and as I
> hoped it would (pppd-2.4.5)!
>
> As I think you might have had other similar problems we have, what are your
> experiences with openl2tp for dialin users in a large scale? Are there
> problems still unsolved?
>
We've run into various multilink related kernel bugs (not openl2tp
specific). I've submitted patches upstream. One fixes lost fragments
and has been included upstream as of 2.6.31. The other fixes quite a
nasty kernel BUG (panic) and will be in 2.6.32.
>
> Currently I'm having trouble monitoring mlppp bundles. Is there any
> reasonable and reliable way to check how many ppp links are in a bundle and
> if they are up and running?
We've written our own LNS management application that gathers all this
data together. It reads /var/run/pppd2.tdb to learn about active
connections and the links that make them up, talks to openl2tpd via the
RPC interface to learn how these relate to L2TP sessions and gather L2TP
bandwidth stats for them, and uses libpcap to monitor the L2TP
encapsulated LCP packets which it uses to provide a continual log of
latency and packet loss.
> Because of it's nature, there aren't any pid files in /var/run/ except for
> the bundle, ip, ifconfig and netstat aren't of any help, too. Is there any
> status plugin, that is multilink aware?
The info is all in /var/run/pppd2.tdb. Try dumping the database file
with tdbdump, the format isn't too hard to figure out by example.
>
>
> We are still looking for a patch to get pppd to name it's interfaces
> ppp[PID] instead of ppp[incrementor], just changing the ifname didn't work
> (of course ;)
You probably need to write a plugin to do that. We have a couple of
bespoke pppd plugins we use to rename interfaces in various ways. They
are similar in a way to my radattr patch in that they try to hook in as
soon as PPPd has decided on the interface name, but this differs
depending on whether multilink is on or off. Once they have control
they do an ioctl SIOCSIFNAME to rename the interface then update pppd's
internal device name sting (ifname) to match and also set an environment
variable with the new name. They first hook into the phasechange
notifier and wait for PHASE_ESTABLISH. If the ifname string is not
empty at this stage (non-multilink) it can rename the interface,
otherwise it then hooks itself into the ip_choose_hook so it can try
again as that's the first hook on a multilink connection after ifname is
set.
Regards,
Ben.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-01 11:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 9:24 [PATCH] Re: [Openl2tp-users] OpenL2TP, multilink, ppp[PID] and bundle Johannes Jakob
2009-12-01 11:00 ` [PATCH] Re: [Openl2tp-users] OpenL2TP, multilink, ppp[PID] and Ben McKeegan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).