ppp reconnecting problem

Ivan Toman ivtoman at inet.hr
Sun Apr 27 07:15:28 UTC 2008


   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        Gateway            Flags  Â
   Refs      Use  Netif Expire
   default            172.29.252.12    Â
   UGSÂ Â Â Â Â Â Â Â  1Â  2284023Â Â  tun0
   10.23.99.64/29Â Â Â Â  link#1Â Â Â Â Â Â Â Â Â Â Â Â
   UCÂ Â Â Â Â Â Â Â Â  0Â Â Â Â Â Â Â  0Â Â  nfe0
   10.23.99.66        00:30:84:ee:3c:cf  UHLW      Â
   1Â Â Â Â  4065Â Â  nfe0Â Â  1030
   10.23.99.70Â Â Â Â Â Â Â  00:02:b3:9e:b9:81Â  UHLWÂ Â Â Â Â Â Â  1Â Â
   223104Â Â  nfe0Â Â  1027
   127.0.0.1Â Â Â Â Â Â Â Â Â  127.0.0.1Â Â Â Â Â Â Â Â Â
   UHÂ Â Â Â Â Â Â Â Â  0Â Â Â Â Â Â  72Â Â Â  lo0
   172.29.252.12Â Â Â Â Â  78.3.33.136Â Â Â Â Â Â Â  UGHÂ Â Â Â Â Â Â Â
   1Â Â Â Â Â Â Â  0Â Â  tun0
   Internet6:
   Destination                     Â
   Gateway                       Flags  Netif
   Expire
   ::1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
   ::1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  UHLÂ Â Â Â
   lo0
   fe80::%lo0/64Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
   fe80::1%lo0Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  UÂ Â Â Â  lo0
   fe80::1%lo0Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
   link#5Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  UHLÂ Â Â Â  lo0
   ff01:5::/32Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
   fe80::1%lo0Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  UCÂ Â Â Â  lo0
   ff01:6::/32Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
   link#6Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  UGCÂ Â Â  tun0
   ff02::%lo0/32Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
   fe80::1%lo0Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  UCÂ Â Â Â  lo0
   ff02::%tun0/32Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
   fe80::211:9ff:fe8d:4a27%tun0Â  UGCÂ Â Â  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 = PAP,
   mine = 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:Â  total 3 bytes/sec,
   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 = PAP,
   mine = 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=2 ttl=251 time=23.386 ms
   This is my config file
   [root at maraska-gw /home/coldplug]# cat /etc/ppp/ppp.conf
   default:
   Â Â Â Â Â Â  set log Phase tun command
   Â Â Â Â Â Â  nat enable yes
   htnet:
   Â Â Â Â Â Â  set device PPPoE:rl0:
   Â Â Â Â Â Â  set authname ertoman1 at htnet-dsl
   Â Â Â Â Â Â  set authkey ***
   Â Â Â Â Â Â  set dial
   Â Â Â Â Â Â  set login
   Â Â Â Â Â Â  add default HISADDR
   Â Â Â Â Â Â  nat addr 10.23.99.66
   Â Â Â Â Â Â  nat addr 10.23.99.67
   Â Â Â Â Â Â  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?
   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Â Â Â Â
   [1]root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERICÂ  i386
   If you think that some other messages from system will be more useful,
   I will hapily provide them.
   Thanks to all!
   Ivan Toman

References

   1. mailto:root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC


More information about the freebsd-questions mailing list