ppp MULTILINK issue / problem
i am testing PPP MULTILINK
server side is running LINUX 2.4.18-3
client side is running LINUX 2.4.19
the link between them are 56k analog modems
i can place calls and set up the MUTILINK.... and the links are bundled together just fine....
now i am testing "UNBUNDLING" of the link.... if i unplug the one of the modem (not the master link), i do not see the IP traffic anymore, though i do see data on the serial link (i put a serial line monitor on the serial port), but no more IP packets coming out of PPP
i do see a couple linkes of mp_construct sequencing error
appreciate if any pointer on where to look....
thansk
tom
Quoted 5 lines · Thomas Chen
now i am testing "UNBUNDLING" of the link.... if i unplug the one of the modem (not the master link), i do not see the IP traffic anymore, though i do see data on the serial link (i put a serial line monitor on the serial port), but no more IP packets coming out of PPP
Questions:
1. What is your configuration? You haven't included any pppd configuration files or options with your message.
2. What are the debug messages? Please include a *COMPLETE* set of debug messages with any problem report! It's virtually impossible to troubleshoot without data.
3. Do the peers think the link went down or not? If they do, then it's possibly a bug in the MP part of the Linux kernel. If they don't, then more details on why they didn't detect the failure are needed.
Quoted 1 line
i do see a couple linkes of
mp_constructsequencing error
That's what would be expected to happen *if* the peers think that the link itself is still up.
Signature · 3 lines
James Carlson, IP Systems Group <[email protected]> Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677
Quoted 5 lines · Thomas Chen
now i am testing "UNBUNDLING" of the link.... if i unplug the one of the modem (not the master link), i do not see the IP traffic anymore, though i do see data on the serial link (i put a serial line monitor on the serial port), but no more IP packets coming out of PPP
Does the pppd process that is controlling the link that you unplug see the disconnection? Use the debug flag to pppd and look for a message in the logs like "Modem hangup". If pppd doesn't see that the link has gone it won't take it out of the bundle.
Paul.
this is what james sent me:
in the userland pppd main loop, it calls get_input and in get_input, if the packet length is 0, it assume the link is bad and print out "Modem Hangup"
if someone can tell me what it IS SUPPOSED to do, i can trace it down and report back the issue
when the modem line drop, the CARRIER DETECT should go away, and serial driver (lowest level) should send SIG_HANGUP to someone (to the userland pppd or kernel ppp) ??? and when that does happen
should kernel ppp automaitcally disassociate the link or wait for the userland PPPD to call ioctl to do that ???
thanks
Quoted 6 lines · thomas chen
when i disconnect the phone cable of LINE 2 (2nd line)...
in the userland application PPPD,get_input(called in the main loop) it actually think the first (master link) MODEM hangs up, and drop the link all togehter...is this right ?
It sure looks broken, and it looks to me like a Linux kernel problem.
That SIGHUP comes from the kernel -- it's the kernel's responsibility to notify the correct daemon.
That said, I see no good way to explain what you're seeing. It doesn't make sense. You'll need to contact someone who maintains the Linux kernel code.
(The logs you're showing now would be helpful to forward to the mailing list.)
Quoted 4 lines
May 4 13:44:08 sys_1u pppd[1298]: Serial connection established. May 4 13:44:12 sys_1u pppd[1298]: Connect: <--> /dev/ttyR0 May 4 13:44:16 sys_1u pppd[1298]: Using interface ppp0 May 4 13:44:16 sys_1u pppd[1298]: New bundle ppp0 created
Quoted 8 lines
May 4 13:44:16 sys_1u modprobe: modprobe: Can't locate module ppp-compress-21 May 4 13:44:16 sys_1u /etc/hotplug/net.agent: assuming ppp0 is already up May 4 13:44:16 sys_1u kernel: PPP Deflate Compression module registered May 4 13:44:16 sys_1u kernel: PPP Deflate Compression module registered May 4 13:44:16 sys_1u modprobe: modprobe: Can't locate module ppp-compress-21 May 4 13:44:16 sys_1u pppd[1298]: Deflate (15) compression enabled May 4 13:44:16 sys_1u pppd[1298]: local IP address 10.100.200.1 May 4 13:44:16 sys_1u pppd[1298]: remote IP address 10.100.200.10
That all looks good.
Quoted 4 lines
May 4 13:46:06 sys_1u pppd[1355]: Serial connection established. May 4 13:46:10 sys_1u pppd[1355]: Connect: <--> /dev/ttyR2 May 4 13:46:14 sys_1u pppd[1355]: Using interface ppp0 May 4 13:46:14 sys_1u pppd[1355]: Link attached to ppp0
That looks like normal multilink.
Quoted 10 lines
AFTER I unplug the 2nd phone cable (NOTE i unplug the second line but it is the FIRST process that indicate MODEM HANG UP)!!!!!
May 4 13:51:55 sys_1u pppd[1298]: Modem hangup May 4 13:51:55 sys_1u pppd[1298]: Connection terminated. May 4 13:51:55 sys_1u pppd[1298]: Connect time 7.8 minutes. May 4 13:51:55 sys_1u pppd[1298]: Sent 7002 bytes, received 3353 bytes. May 4 13:51:55 sys_1u /etc/hotplug/net.agent: NET unregister event notsupported
Assuming there's nothing obvious amiss (such as a mislabeled cable that actually connects to /dev/ttyR0 rather than /dev/ttyR2), it looks like you have the makings of a kernel bug here.
Signature · 3 lines
James Carlson, IP Systems Group <[email protected]> Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677
Quoted 15 lines · on 5/4/04 3:45 PM, Paul Mackerras at [email protected] wrote:
Quoted 5 lines · Thomas Chen
now i am testing "UNBUNDLING" of the link.... if i unplug the one of the modem (not the master link), i do not see the IP traffic anymore, though i do see data on the serial link (i put a serial line monitor on the serial port), but no more IP packets coming out of PPP
Does the pppd process that is controlling the link that you unplug see the disconnection? Use the debug flag to pppd and look for a message in the logs like "Modem hangup". If pppd doesn't see that the link has gone it won't take it out of the bundle.
Paul.
Quoted 3 lines · Thomas Chen
in the userland pppd main loop, it calls
get_inputand inget_input, if the packet length is 0, it assume the link is bad and print out "Modem Hangup"
The 0 return value from get_input is an "end of file" indication. The serial driver should return an EOF if it detects that the CD signal has dropped. Make sure you use the "modem" option to pppd and that you have CD and DTR hooked up correctly to the modem. It is possible to get the serial driver to send a SIGHUP but pppd doesn't rely on that (because it isn't possible to get the tty device to be pppd's controlling terminal in all cases).
Quoted 2 lines
should kernel ppp automaitcally disassociate the link or wait for the userland PPPD to call ioctl to do that ???
When pppd gets the 0 return value from get_input, it will do the ioctl to disconnect the link from the bundle.
Paul.
Quoted 5 lines · Thomas Chen
this is what james sent me:
in the userland pppd main loop, it calls
get_inputand inget_input, if the packet length is 0, it assume the link is bad and print out "Modem Hangup"
Excuse me? I did *not* write that text. I don't know where you got it.
Zero is end of file. There's no "assumption" there.
Signature · 3 lines
James Carlson, IP Systems Group <[email protected]> Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677
Quoted 1 line · [email protected] wrote:
Subject: ppp MULTILINK issue / problem
...
Quoted 5 lines
now i am testing "UNBUNDLING" of the link.... if i unplug the one of the modem (not the master link), i do not see the IP traffic anymore, though i do see data on the serial link (i put a serial line monitor on the serial port), but no more IP packets coming out of PPP
...
I just ran into this and discovered that PPPIOCDISCONN is never being called when pppd brings the link down.
This causes the MP fragmentation queue to stall.
Calling this IOCTL in sys-linux.c:generic_disestablish_ppp() fixes the problem for me.
void generic_disestablish_ppp(int dev_fd)
{
if (new_style_driver) {
+ if (ioctl(ppp_fd, PPPIOCDISCONN) < 0)
+ error("Couldn't detach from PPP unit %d: %m", ifunit);
close(ppp_fd);
ppp_fd = -1;
if (demand) {--
Matthew N. Dodd <[email protected]>
Software Engineer, Patton Electronics
7622 Rickenbacker Dr., Gaithersburg, MD 20879
(301) 975-1000x184
on 7/16/04 9:22 AM, Matthew N. Dodd at [email protected] wrote:
i am not sure this is a good fix....
first of all, what version of ppp is this applicable to ?
also, i put this fix in, and for single link (not multilink) it did not work (ioctl returning error).... i have not tried multilink, if it works for multilink, then the fix should be wrap around with
if (multilink)
{
if (ioctl(ppp_fd, PPPIOCDISCONN) < 0)
error("Couldn't detach from PPP unit %d: %m", ifunit);
}
???
however, there is a PPIOCDETACH a few lines below... does that not do DISCONN ???
Quoted 33 lines
Quoted 1 line · [email protected] wrote:
Subject: ppp MULTILINK issue / problem
...
Quoted 5 lines
now i am testing "UNBUNDLING" of the link.... if i unplug the one of the modem (not the master link), i do not see the IP traffic anymore, though i do see data on the serial link (i put a serial line monitor on the serial port), but no more IP packets coming out of PPP
...
I just ran into this and discovered that PPPIOCDISCONN is never being called when pppd brings the link down.
This causes the MP fragmentation queue to stall.
Calling this IOCTL in sys-linux.c:generic_disestablish_ppp() fixes the problem for me.
void
generic_disestablish_ppp(int dev_fd)
{
if (new_style_driver) {(quoted diff) +2
-0+ if (ioctl(ppp_fd, PPPIOCDISCONN) < 0) + error("Couldn't detach from PPP unit %d: %m", ifunit);
close(ppp_fd);ppp_fd= -1;
if (demand) {--
Matthew N. Dodd <[email protected]>
Software Engineer, Patton Electronics
7622 Rickenbacker Dr., Gaithersburg, MD 20879
(301) 975-1000x184