It is currently Wed Jul 18, 2018 3:14 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: openl2tp reconnection (recall) function
PostPosted: Thu Mar 08, 2012 6:15 pm 

Joined: Thu Mar 08, 2012 4:52 pm
Posts: 2
Hi all. I use openl2t on my home "server-router" something about 2 years, I prefer it for lowest ping (lowest in comparison with xl2tp) and for much higher speeds
I just wonder why openl2tp and xl2tpd does not provide this function. All disconnection problems as I could see for a few years - It was only provider problems. For last years situation become much better, but sometimes session just hang and openl2tp can't reconnect to server, can't choose new ip server to connect for (my provider have few ip's under one domain name)
Here's the topic, I have similar situation.
Modem hang up or connection terminated 50/50 and openl2tp just exiting, instead of reconnect
Bash script in cron, it can be solution, but this very ugly I think...
Need something like this, but not so ugly
Quote:
Code:
#!/bin/sh
INETFILE=~/.conncheck.log

ping -c 4 -w 10 provider.l2tpd.server.com &> /dev/null || /etc/init.d/networking restart &&
ping -c 4 google.com &> /dev/null

if [ $? -eq 0 ];then
   echo "[`date`] [provider.l2tpd.server.com] available, [GOOGLE.com] available" >> $INETFILE
   exit 0
else
   echo "[`date`] [GOOGLE.com] not available, try again (after NETWORK daemon restart)" >> $INETFILE
   service openl2tp stop
   sleep 2
   service openl2tp stop
   sleep 2
#yes, trying to stop it 2 times, sometime it doesn't unload
   service openl2tp start
   sleep 32
   ping -c 4 google.com &> /dev/null
   if [ $? -eq 0 ];then
       echo "[`date`] [provider.l2tpd.server.com] available, [GOOGLE.com] available" >> $INETFILE
       exit 0
   else
       echo "[`date`] [provider.l2tpd.server.com] not available, [GOOGLE.com] not available, try letter" >> $INETFILE
       exit 0
   fi
fi


Top
 Profile  
 
 Post subject: Re: openl2tp reconnection (recall) function
PostPosted: Thu Apr 12, 2012 6:13 pm 
Site Admin

Joined: Sun Jul 27, 2008 1:39 pm
Posts: 122
kambei.7s wrote:
Hi all. I use openl2t on my home "server-router" something about 2 years, I prefer it for lowest ping (lowest in comparison with xl2tp) and for much higher speeds
I just wonder why openl2tp and xl2tpd does not provide this function. All disconnection problems as I could see for a few years - It was only provider problems. For last years situation become much better, but sometimes session just hang and openl2tp can't reconnect to server, can't choose new ip server to connect for (my provider have few ip's under one domain name)
Here's the topic, I have similar situation.
Modem hang up or connection terminated 50/50 and openl2tp just exiting, instead of reconnect
Bash script in cron, it can be solution, but this very ugly I think...

Are you using persist=yes when creating your tunnel? If so, openl2tpd should try to reconnect every few minutes.


Top
 Profile  
 
 Post subject: Re: openl2tp reconnection (recall) function
PostPosted: Fri Apr 13, 2012 11:56 am 

Joined: Thu Mar 08, 2012 4:52 pm
Posts: 2
jchapman
Thanks for reply, yes I use it (also I have "lcp_echo_interval=10" in options.pptp) but I think this function start working only after I add this - "max_retries=9999 \", I cannot understand how actually this must work. It was reestablish connection, sometimes, but it's very very lazy. Openl2tp tries to recall after 5-10 minutes after connection terminated by peer and sometimes it was just exiting. Also, in some situation restarting of openl2tp totaly useless because whole network subsystem need to be restarted (debian - /etc/init.d/network restart "service network restart") after internet provider gateway get fail
Can openl2tp rotate servers from host name(for example l2tp.provider.com=5 servers ip to connect for)? If disconnected - openl2tp tries to connect different ip under same servers hostname.
Code:
system modify deny_remote_tunnel_creates=yes \
        deny_remote_tunnel_creates=yes \
        tunnel_establish_timeout=45 \
        session_establish_timeout=60 \
        tunnel_persist_pend_timeout=45 \
        session_persist_pend_timeout=30

peer profile modify profile_name=default lac_lns=lac

ppp profile modify profile_name=default \
        mru=1460 mtu=1460 auth_pap=no \
        auth_eap=no auth_none=no \
        default_route=no  proxy_arp=no auth_mschapv1=no auth_mschapv2=yes

tunnel create tunnel_name=beeline dest_ipaddr=l2tp.corbina.net \
        persist=yes \
        max_retries=9999 \

session create tunnel_name=corbina \
        session_name=corbina \
        user_name="username"

P.S
User manual need to be updated


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group