ppp reconnecting problem
Malcolm Kay
malcolm.kay at internode.on.net
Mon Apr 28 15:51:35 UTC 2008
On Sun, 27 Apr 2008 04:43 pm, Ivan Toman wrote:
>=20
> Hello!
> I encountered big problem after switching router from gentoo to
> freebsd. It does not properly reconnect ADSL link after loosing
> connection, for example, when ISP cycle IP address or when I pull out
> cable from ADSL switcher for testing purporse. I cannot realize what's
> going on and really need help.
> First problem get when ISP disconnect me after 24 hours due to IP
> change. Link does not properly get reconnected. ppp tries to connect,
> and appearenty is connected, but something is wrong because no traffic
> is possible and after few seconds ppp goes down and reconnects again.
> And again and again.... Strange above all is that during reconnecting
> routing table always has default route, but ping does not go. Next, I
> will put some information that I think is relevant to problem, but it
> seems to me, not very useful in debugging this.
> During reconnecting as I describe above, this is my routing table:
> [root at maraska-gw /home/coldplug]# netstat -rn
> Routing tables
> Internet:
> Destination=C2 =C2 =C2 =C2 =C2 =C2 =C2 Gateway=C2 =C2 =C2 =C2 =C2 =C2=
=C2 =C2 =C2 =C2 =C2 Flags=C2 =C2 =C2
> Refs=C2 =C2 =C2 =C2 =C2 Use=C2 Netif Expire
> default=C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 172.29.252.12=C2 =
=C2 =C2 =C2 =C2
> UGS=C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 1=C2 2284023=C2 =C2 tun0
> 10.23.99.64/29=C2 =C2 =C2 =C2 link#1=C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 =
=C2 =C2 =C2 =C2
> UC=C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 =C2 0=C2 =C2 =C2 =C2 =C2 =C2 =C2 0=
=C2 =C2 nfe0
> 10.23.99.66=C2 =C2 =C2 =C2 =C2 =C2 =C2 00:30:84:ee:3c:cf=C2 UHLW=C2 =
=C2 =C2 =C2 =C2 =C2 =C2
> 1=C2 =C2 =C2 =C2 4065=C2 =C2 nfe0=C2 =C2 1030
> 10.23.99.70=C2 =C2 =C2 =C2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 tun0
> [root at maraska-gw /home/coldplug]#
> And this.... I get if try to ping ISP's dns
> [root at maraska-gw /home/coldplug]# ping 195.29.150.3
> PING 195.29.150.3 (195.29.150.3): 56 data bytes
> ping: sendto: No buffer space available
> ping: sendto: No buffer space available
> ping: sendto: No buffer space available
> ping: sendto: No buffer space available
> ^C
> --- 195.29.150.3 ping statistics ---
> 10 packets transmitted, 0 packets received, 100.0% packet loss
> [root at maraska-gw /home/coldplug]#
> No buffer space available??? What is that?
> These are lines from log, where you can see that it reconnects and
> never stops that
> [root at maraska-gw /home/coldplug]# tail -f /var/log/ppp.log
> Apr 26 12:06:22 maraska-gw ppp[956]: tun0: Phase: deflink: carrier ->
> login
> Apr 26 12:06:22 maraska-gw ppp[956]: tun0: Phase: deflink: login ->
> lcp
> Apr 26 12:06:23 maraska-gw ppp[956]: tun0: Warning: deflink: Reducing
> configured MRU from 1500 to 1492
> Apr 26 12:06:23 maraska-gw ppp[956]: tun0: Phase: deflink: his =3D PAP,
> mine =3D none
> Apr 26 12:06:23 maraska-gw ppp[956]: tun0: Phase: Pap Output:
> ertoman1 at htnet-dsl ********
> Apr 26 12:06:24 maraska-gw ppp[956]: tun0: Phase: Pap Input: SUCCESS
> (Access Accepted. )
> Apr 26 12:06:24 maraska-gw ppp[956]: tun0: Phase: deflink: Already in
> NETWORK phase
> Apr 26 12:06:24 maraska-gw ppp[956]: tun0: Phase: deflink: lcp -> open
> Apr 26 12:06:24 maraska-gw ppp[956]: tun0: Warning: 0.0.0.0/0: Change
> route failed: errno: No such process
> Apr 26 12:06:24 maraska-gw ppp[956]: tun0: Warning: ff02:6::/32:
> Change route failed: errno: Network is unreachable
> Apr 26 12:08:23 maraska-gw ppp[956]: tun0: Phase: deflink: open -> lcp
> Apr 26 12:08:23 maraska-gw ppp[956]: tun0: Warning: 0.0.0.0/0: Change
> route failed: errno: No such process
> Apr 26 12:08:23 maraska-gw ppp[956]: tun0: Warning: ff02:6::/32:
> Change route failed: errno: Network is unreachable
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: Received
> NGM_PPPOE_CLOSE
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink: Device
> disconnected
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink:
> Disconnected!
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink: lcp ->
> logout
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink:
> Disconnected!
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink: logout ->
> hangup
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink: Connect
> time: 123 secs: 374 octets in, 96 octets out
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink: 3218212
> packets in, 2284164 packets out
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase:=C2 total 3 bytes/se=
c,
> peak 40 bytes/sec on Sat Apr 26 12:06:24 2008
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink: hangup ->
> opening
> Apr 26 12:08:24 maraska-gw ppp[956]: tun0: Phase: deflink: Enter pause
> (3) for redialing.
> Apr 26 12:08:27 maraska-gw ppp[956]: tun0: Phase: deflink: Connected!
> Apr 26 12:08:27 maraska-gw ppp[956]: tun0: Phase: deflink: opening ->
> dial
> Apr 26 12:08:27 maraska-gw ppp[956]: tun0: Phase: deflink: dial ->
> carrier
> Apr 26 12:08:28 maraska-gw ppp[956]: tun0: Phase: Received
> NGM_PPPOE_ACNAME (hook "HTdsl")
> Apr 26 12:08:28 maraska-gw ppp[956]: tun0: Phase: Received
> NGM_PPPOE_SESSIONID
> Apr 26 12:08:28 maraska-gw ppp[956]: tun0: Phase: Received
> NGM_PPPOE_SUCCESS
> Apr 26 12:08:28 maraska-gw ppp[956]: tun0: Phase: deflink: carrier ->
> login
> Apr 26 12:08:28 maraska-gw ppp[956]: tun0: Phase: deflink: login ->
> lcp
> Apr 26 12:08:29 maraska-gw ppp[956]: tun0: Warning: deflink: Reducing
> configured MRU from 1500 to 1492
> Apr 26 12:08:29 maraska-gw ppp[956]: tun0: Phase: deflink: his =3D PAP,
> mine =3D none
> Apr 26 12:08:29 maraska-gw ppp[956]: tun0: Phase: Pap Output:
> ertoman1 at htnet-dsl ********
> Apr 26 12:08:29 maraska-gw ppp[956]: tun0: Phase: Pap Input: SUCCESS
> (Access Accepted. )
> Apr 26 12:08:29 maraska-gw ppp[956]: tun0: Phase: deflink: Already in
> NETWORK phase
> Apr 26 12:08:29 maraska-gw ppp[956]: tun0: Phase: deflink: lcp -> open
> Apr 26 12:08:29 maraska-gw ppp[956]: tun0: Warning: 0.0.0.0/0: Change
> route failed: errno: No such process
> Apr 26 12:08:29 maraska-gw ppp[956]: tun0: Warning: ff02:6::/32:
> Change route failed: errno: Network is unreachable
> ^C
> [root at maraska-gw /home/coldplug]#
> Only way to exit this trouble is restarting ppp manually!
> [root at maraska-gw /home/coldplug]# killall ppp
> [root at maraska-gw /home/coldplug]# ppp -ddial htnet
> Loading /lib/libalias_cuseeme.so
> Loading /lib/libalias_ftp.so
> Loading /lib/libalias_irc.so
> Loading /lib/libalias_nbt.so
> Loading /lib/libalias_pptp.so
> Loading /lib/libalias_skinny.so
> Loading /lib/libalias_smedia.so
> Working in ddial mode
> Using interface: tun0
> Warning: usage: nat addr [addr_local addr_alias]
> Warning: usage: nat addr [addr_local addr_alias]
> Warning: usage: nat addr [addr_local addr_alias]
> [root at maraska-gw /home/coldplug]# ping 195.29.150.3
> PING 195.29.150.3 (195.29.150.3): 56 data bytes
> 64 bytes from 195.29.150.3: icmp_seq=3D2 ttl=3D251 time=3D23.386 ms
> This is my config file
> [root at maraska-gw /home/coldplug]# cat /etc/ppp/ppp.conf
> default:
> =C2 =C2 =C2 =C2 =C2 =C2 set log Phase tun command
> =C2 =C2 =C2 =C2 =C2 =C2 nat enable yes
> htnet:
> =C2 =C2 =C2 =C2 =C2 =C2 set device PPPoE:rl0:
> =C2 =C2 =C2 =C2 =C2 =C2 set authname ertoman1 at htnet-dsl
> =C2 =C2 =C2 =C2 =C2 =C2 set authkey ***
> =C2 =C2 =C2 =C2 =C2 =C2 set dial
> =C2 =C2 =C2 =C2 =C2 =C2 set login
> =C2 =C2 =C2 =C2 =C2 =C2 add default HISADDR
> =C2 =C2 =C2 =C2 =C2 =C2 nat addr 10.23.99.66
> =C2 =C2 =C2 =C2 =C2 =C2 nat addr 10.23.99.67
> =C2 =C2 =C2 =C2 =C2 =C2 nat addr 10.23.99.70
> [root at maraska-gw /home/coldplug]#
> I tried lot of things. "enable lqr", "enable echo"... nothing helps.
> Moreover, testing this by pulling out cable and replugging it give no
> response from system! If I do that, link goes down (real link), but
> system do not realize that at all! Routing table remains unchanged,
> default route still is there, tun0 interface still configured, ppp
> runs, and in /var/log/ppp.log there is no new single line after that
> replugging cable into ADSL modem! How is that possible? Isn't pulling
> out and replugging cable should be enough for ppp to realize it that
> tun0 should be reconfigured and ppp redialed?
I have seen I similar but slightly different problem on my son's server
running 6.x. In that case ppp was started using /etc/rc.d/ppp which also=20
calls '/etc/rc.d/pf resync'. In this case apparently the pf firewall blocked
any packets when ppp tries to automatically restart after a connection inte=
rrupt.
We devised a work around of running another process (script) which loops=20
testing the difference in time between the modify time of ppp.log and the c=
urrent=20
time and if this is too great stops and restarts ppp, through /etc/rc.d/ppp=
=2E=20
Normally the file time is updated every 30 seconds or so by setting "enable=
echo".=20
The loop also includes a call to sleep of a few minutes so the the loop doe=
s not=20
greatly consume processing time. This has worked well for us and I suspect =
would
also work in your case even though it does not fix the root cause of the pr=
oblem.
Unfortunately I don't have access to my son's server so I can't recall the =
exact=20
details of the script but I think it was started from a rc.d script. But yo=
u=20
should be able to knit something similar without too much effort. This could
keep you operational while looking for the base cause of the difficulty.=20
Malcolm Kay
> Of course, I start ppp as:
> # ppp -ddial htnet
> I really need reliable connection that needs no permanent monitoring
> by myself and manually reconnecting after being dropped. Please, give
> me some idea what can I do because I'm still desperate after few days
> of trying to fix this. For sake of completness, I had no problems with
> this before, on gentoo. Now I run FreeBSD 7.
> [root at maraska-gw /home/coldplug]# uname -a
> FreeBSD maraska-gw.zdw 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24
> 19:59:52 UTC 2008=C2 =C2 =C2 =C2
> [1]root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC=C2 i386
> If you think that some other messages from system will be more useful,
> I will hapily provide them.
> Thanks to all!
> Ivan Toman
>=20
> References
>=20
> 1. mailto:root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
More information about the freebsd-questions
mailing list