Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with internet connection (pptp, cable broadband)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
TFK
n00b
n00b


Joined: 04 Jul 2004
Posts: 18
Location: Jerusalem, Israel

PostPosted: Sun Jul 04, 2004 12:44 pm    Post subject: Problems with internet connection (pptp, cable broadband) Reply with quote

I've installed Gentoo yesterday, and it feels very good :D . However, the script I used to connect to my ISP (to which I must authorize via pptp) in Mandrake 10.0 doesn't work anymore (this happens to me every time I change my Linux distro :? ). I get ppp0, but can't ping anything. The DNS nameservers are fine (it won't ping ips, too, after it got ppp0). So here's a lot of info (may be useless, but you never know...):

I'm using this script to connect:

Code:
#!/bin/bash

USERNAME="tfk"
IFACE="eth0"
PPTPS=pns.inter.net.il

#ifdown $IFACE
#ifup $IFACE

   NVGW=213.8.8.112
#$(host $PPTPS | cut -d" " -f4 | cut -f3 | tail -1)
   CABLEGW=172.25.201.249
#$(ip r l | grep default | cut -d" " -f3)
   
route add -host $NVGW gw $CABLEGW dev $IFACE

./pptp $NVGW debug user $USERNAME mtu 1380 mru 1380 defaultroute nopersist nobsdcomp usepeerdns noauth

sleep 7

   NEWGW=$(ifconfig ppp0 | grep inet | cut -d":" -f3 | tail -1 | cut -d" " -f1)

route add default gw $NEWGW
route del default gw $CABLEGW

echo nameserver 192.116.202.222 > /etc/resolv.conf


The script used to utilize host and ip originally, but these tools are missing from the current installation I have. I'm pretty sure the numerical values are correct, though. (I don't know in which package ip and host reside anyway.) ifup and ifdown are commented out for the same reason, but manually running/killing dhcpcd does the same thing, I think. The script uses it's own pptp ("emerge pptp" doesn't work), but it worked fine.

Also, the script outpus this (it didn't in Mandrake):

Code:
SIOCDELRT: No such process


No idea what it means :-/

Relevant ifconfig lines before the connection:

Code:

eth0      Link encap:Ethernet  HWaddr 00:0B:06:56:BE:AB 
          inet addr:172.25.201.249  Bcast:255.255.255.255  Mask:255.255.224.0

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0


route output before connection:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.25.192.0    *               255.255.224.0   U     0      0        0 eth0
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         172.25.192.1    0.0.0.0         UG    0      0        0 eth0


Relevant ifconfig lines after connection:

Code:
ppp0      Link encap:Point-to-Point Protocol 
          inet addr:80.230.141.17  P-t-P:213.8.255.81  Mask:255.255.255.255


Route output after connection:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
213.8.8.112     172.25.201.249  255.255.255.255 UGH   0      0        0 eth0
213.8.255.81    *               255.255.255.255 UH    0      0        0 ppp0
172.25.192.0    *               255.255.224.0   U     0      0        0 eth0
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         213.8.255.81    0.0.0.0         UG    0      0        0 ppp0
default         172.25.192.1    0.0.0.0         UG    0      0        0 eth0


/var/log/messages is littered with messages of this sort (but nothing else of interest):

Code:
Jul  4 14:24:57 kbox pppd[9794]: rcvd [LCP EchoReq id=0x2 magic=0xe6b983db c0 74 ca de]
Jul  4 14:24:57 kbox pppd[9794]: sent [LCP EchoRep id=0x2 magic=0x25bb770e c0 74 ca de]


Thanks in advance! :)
Back to top
View user's profile Send private message
DaNIsH
Apprentice
Apprentice


Joined: 01 Jan 2003
Posts: 197
Location: Melbourne, Australia.

PostPosted: Sun Jul 04, 2004 2:31 pm    Post subject: Reply with quote

I think the problem may lie in the line:
Code:
route del default gw $CABLEGW

Going by your route output "default gw $CABLEGW (172.25.201.249)" doesn't exist.
The closest match being 213.8.8.112 gw 172.25.201.249.

From: http://www.in-addr.de/pipermail/lvs-users/2001-September/003060.html
It sounds like that would generate the error.
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
TFK
n00b
n00b


Joined: 04 Jul 2004
Posts: 18
Location: Jerusalem, Israel

PostPosted: Sun Jul 04, 2004 4:09 pm    Post subject: Reply with quote

Well, I certainly feel very, very silly now. Apparently, my numeric values have been wrong indeed. I've adopted some elements from an older script that used to work once upon a time, and now it works. Thanks and sorry for the spam ^_^;;
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum