Internet connection is lost after several minutes

Asked by Tom Gur

Hi,

I'm using Ubuntu 7.04 on an IBM ThinkPad R51 laptop.
I'm connecting to the internet through standard l2tp scripts (which I've successfully run over Red Hat 9, Fedora Core 6, Zenwalk and Vector).
The problem is that after several minutes I lose my connection (though network-manager-gnome still indicates that I'm connected).

I know the hardware is fine, because I've installed Fedora (After I've experienced the problem with Ubuntu) and it works fine.
I've tried using PPTP - but it refuses to connect (I get a "FATAL ERROR: bind: host not found) - again, the same scripts works perfectly on other distributions.

this is my l2tp script:

#!/bin/bash
LNS=172.26.255.197
IF=eth0
/sbin/ifdown $IF
/sbin/ifup $IF
CABLEGW=`/sbin/route -n | grep ^0.0.0.0 | awk '{print $2}'`
/sbin/route add -host $LNS gw $CABLEGW
/sbin/route del default
/usr/local/sbin/l2tpd -d 256
sleep 1
/usr/local/sbin/l2tp-control "start-session $LNS" > /var/run/l2tp-$LNS
sleep 1
echo "nameserver 192.114.47.4" > /etc/resolv.conf
echo "nameserver 192.114.47.52" >> /etc/resolv.conf

And this is my pptp script:

      #!/bin/bash
      USERNAME=username@CActcom
      IF=eth0
      /sbin/ifdown $IF
      /sbin/ifup $IF
      CABLEGW=`/sbin/route -n | grep ^0.0.0.0 | awk '{print $2}'`
      PNS=`host pns4.actcom.net.il 192.114.47.4 | awk '{print $4}' | tail -1`
      /sbin/route add -host $PNS gw $CABLEGW
      /sbin/route del default
      /usr/sbin/pptp $PNS debug user $USERNAME mtu 1460 mru 1460 defaultroute usepeerdns noauth
      sleep 10
      echo "nameserver 192.114.47.4" > /etc/resolv.conf
      echo "nameserver 192.114.47.52" >> /etc/resolv.conf

and that's my pap-secrets content:
    "username@CActcom" * "password"
(Of course, I use my own user and password here, as in the pptp script)
all of the address and hostnames are correct.

I would greatly appreciate any aid, I'm getting quite desperate...

Thanks,
Tom

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Tom Gur
Solved:
Last query:
Last reply:
Revision history for this message
Massimo Forti (slackwarelife) said :
#1

Thanks for your question, I want to know your hardware, probably your script use a api call that ubuntu 7.04 has delete. I'm not sure, nd I'm not so expert, but if you can post your hardware we can try to understand :)

Thanks

Revision history for this message
Best Tom Gur (gur-tom) said :
#2

Finally solved it (though it's a rather foolish solution).
I'm using a laptop which supports wi-fi.
Now, apparently my neighbor installed an unprotected wi-fi net - so de facto there was some sort of conflict between the two connections.