LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-07-2005, 11:40 PM   #1
detly
Member
 
Registered: Nov 2003
Distribution: Debian Sarge/Etch
Posts: 54

Rep: Reputation: 15
pppd connects, nothing uses route


Computer (laptop): NEC Versa M540
Modem: Intel Corp 8280 AC'97 Modem Controller (on /dev/ttySL0)
Distro: Debian GNU/Linux
Kernel: 2.6.8-mppe
pppd: 2.4.3
chat: 1.22

I realise that this is quite possibly the most common sort of post, and I have found a prolific number of similar posts - but none seem to solve my problem.

Trying to connect to my dial-up ISP using "pon isp-name" (I do use my actual ISP name) connects with pppd and chat. The /var/log/ppp.log shows that PAP authentication seems fine, the nameservers are found (I've checked that they are correct). It also shows the local and remote IP addresses. /etc/resolv.conf contains both nameservers (and ONLY those two nameservers).

Now, I've used "ping" to successfully ping the local and remote IP addresses, but when I try "ping dns.ip.addresses.here" (or any other, for that matter), I get "connect: Network is unreachable".

I can connect to the network at uni using the built-in network card, with none of these problems. There is a script for my uni network username in /etc/ppp/ip-up.d - I tried to adapt this to my dialup connection, but with no luck.

/etc/ppp/peers/isp-name:

Code:
# This optionfile was generated by pppconfig 2.3.10.
#
#
hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/isp-name"
debug
/dev/ttySL0
115200
defaultroute
replacedefaultroute
noipdefault
user "<<username>>"
remotename isp-name
ipparam isp-name

usepeerdns
/etc/ppp/peers/ppp0

Code:
usepeerdns

user <<username>>
/dev/ttySL0
connect "/usr/bin/wvdial --chat ppp0"
defaultroute
replacedefaultroute

noauth
I inserted the "replacedefaultroute" after reading similar posts on various forums. No luck.

Last few lines of /var/log/ppp.log:

Code:
Jul  7 21:54:52 localhost pppd[5532]: Cannot determine ethernet address for proxy ARP
Jul  7 21:54:52 localhost pppd[5532]: local  IP address <<local-IP-add>>
Jul  7 21:54:52 localhost pppd[5532]: remote IP address <<rem-IP-add>>
Jul  7 21:54:52 localhost pppd[5532]: primary   DNS address <<DNS-1>>
Jul  7 21:54:52 localhost pppd[5532]: secondary DNS address <<DNS-2>>
Jul  7 21:54:52 localhost pppd[5532]: Script /etc/ppp/ip-up started (pid 5544)
Jul  7 21:54:52 localhost pppd[5532]: Script /etc/ppp/ip-up finished (pid 5544), status = 0x0
Code:
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
<<rem-IP-add>>  0.0.0.0         255.255.255.255 UH    0      0        0 isp-name

Code:
# cat /var/log/ppp-ipupdown.log
/etc/ppp/ip-up ppp0 /dev/ttySL0 115200 <<local-IP-add>> <<rem-IP-add>> isp-name

/etc/ppp/ip-up.d/0dns-up: line 120: /usr/sbin/nscd: No such file or directory
The line in question is the last one in the script (nscd doesn't seem to exist on my system):

Code:
# Tell nscd about what we've done.
/usr/sbin/nscd -i hosts || exit 0
I would appreciate any help.
 
Old 07-08-2005, 11:45 AM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
The nscd command shouldn't be a problem, you can either leave it in or comment it out.

Was that route command run after you were connected? If so, your default route is not being set up. Sorry, I haven't used pppd in years, but I do remember this being a problem. One way to solve it is to add the default route manually at the end of the script. I don't have a linux system handy (it's too late for me to get out of bed), so you should check "man route", but something very similar to this should work:
route add default ppp0

To test, try running the command manually after dialling and see if you can ping things correctly. If it works, add the command to the end of your dialup script, whichever is appropriate for your system.... perhaps 'pon'.

There should be a cleaner way, but I thought that was the 'defaultroute' command in your config. It seems a little confusing.
 
Old 07-10-2005, 01:56 AM   #3
detly
Member
 
Registered: Nov 2003
Distribution: Debian Sarge/Etch
Posts: 54

Original Poster
Rep: Reputation: 15
Quote:
Was that route command run after you were connected? If so, your default route is not being set up [...]

There should be a cleaner way, but I thought that was the 'defaultroute' command in your config. It seems a little confusing.
Yes - very confusing, since the "defaultroute" command was the solution to just about every other post. I've gone into a bit more detail (possibly too much...):

Before connecting:

Code:
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
After "pon isp-name":

The ppp log, from the time of connection:

Code:
Jul 10 14:28:50 localhost chat[5680]: CONNECT
Jul 10 14:28:50 localhost chat[5680]:  -- got it 
Jul 10 14:28:50 localhost chat[5680]: send (\d)
Jul 10 14:28:51 localhost pppd[5679]: Serial connection established.
Jul 10 14:28:51 localhost pppd[5679]: using channel 2
Jul 10 14:28:51 localhost pppd[5679]: Using interface ppp0
Jul 10 14:28:51 localhost pppd[5679]: Connect: ppp0 <--> /dev/ttySL0
[...]
Jul 10 14:29:10 localhost pppd[5679]: PAP authentication succeeded
[...]
Jul 10 14:29:11 localhost pppd[5679]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
[...]
Jul 10 14:29:12 localhost pppd[5679]: Cannot determine ethernet address for proxy ARP
Jul 10 14:29:12 localhost pppd[5679]: local  IP address <<loc-IP-add>>
Jul 10 14:29:12 localhost pppd[5679]: remote IP address <<rem-IP-add>>
Jul 10 14:29:12 localhost pppd[5679]: primary   DNS address <<DNS-1>>
Jul 10 14:29:12 localhost pppd[5679]: secondary DNS address <<DNS-2>>
Jul 10 14:29:12 localhost pppd[5679]: Script /etc/ppp/ip-up started (pid 5691)
Jul 10 14:29:12 localhost pppd[5679]: Script /etc/ppp/ip-up finished (pid 5691), status = 0x0
Routing:

Code:
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
<<rem-IP-add>>  0.0.0.0         255.255.255.255 UH    0      0        0 isp-name
Ifconfig output:

Code:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:40:D0:73:86:06
          inet6 addr: fe80::240:d0ff:fe73:8606/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:378 (378.0 b)
          Interrupt:10 Base address:0xa100

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:104 errors:0 dropped:0 overruns:0 frame:0
          TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6580 (6.4 KiB)  TX bytes:6580 (6.4 KiB)

isp-name  Link encap:Point-to-Point Protocol
          inet addr:<<loc-IP-add>>  P-t-P:<<rem-IP-add>>  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:64 (64.0 b)  TX bytes:97 (97.0 b)
So I try to add a default route:

Code:
# route add default ppp0
SIOCADDRT: No such device
# route add default isp-name

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
<<rem-IP-add>>  0.0.0.0         255.255.255.255 UH    0      0        0 isp-name
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 isp-name
That second line doesn't look like it does much... After this, "ping" no longer says "network unreachable," but simply times out (or rather, I kill it after five minutes). The "route" man page was not particularly helpful to me, not knowing too much about how Linux networks. On the bright side, I'm certainly learning. :)
 
Old 07-10-2005, 02:09 AM   #4
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Oops, I was sure I saw ppp0 in your earlier output. Try replacing ppp0 in that command with the 'isp-name' that appears at the end of your route output.
 
Old 07-10-2005, 02:16 AM   #5
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
and now I am not reading your post properly. Sorry about that. Instead, try using the remote IP ifconfig shows for isp-name.

route add default gw a.b.c.d

where a.b.c.d is the IP

Last edited by CroMagnon; 07-10-2005 at 02:21 AM.
 
Old 07-10-2005, 08:27 AM   #6
detly
Member
 
Registered: Nov 2003
Distribution: Debian Sarge/Etch
Posts: 54

Original Poster
Rep: Reputation: 15
Firstly, I shouldn't have used the DNS to test with ping, since they don't respond on my desktop either, and that's fine with (k)ppp.

At any rate, I did:

Code:
# route add default gw <<rem-IP-add>>

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
<<rem-IP-add>>  0.0.0.0         255.255.255.255 UH    0      0        0 isp-name
0.0.0.0         <<rem-IP-add>>  0.0.0.0         UG    0      0        0 isp-name
...and now I can ping anything (that I've tried) but only by specifying the IP (66.102.7.147 instead of www.google.com). Trying to ping anything by name doesn't work, and trying to use "host" to find the IP results in a timeout (an actual timeout message, not me killing it out of impatience).

So it seems that:

1. pppd/pon/whatever, is not setting the default gateway, despite the option "defaultroute" being in both peer files.

2. I've turned a routing problem into a name resolution problem. I've checked that both nameservers are in /etc/resolv.conf (after connection), and even added by hand the domain isp-name.com.au line. Arg.

Thanks for your help, [CroMagnon]

Hmm.
 
Old 07-10-2005, 08:50 AM   #7
detly
Member
 
Registered: Nov 2003
Distribution: Debian Sarge/Etch
Posts: 54

Original Poster
Rep: Reputation: 15
A related thread:

http://lists.debian.org/debian-user/.../msg05112.html

...but not altogether helpful.
 
Old 10-08-2005, 02:24 PM   #8
ngmlinux
LQ Newbie
 
Registered: Jul 2005
Location: NY, USA
Distribution: Mandriva 2005 LE x86_64, arm-linux
Posts: 12

Rep: Reputation: 0
I think I'm experiencing a similar if not same issue. If you could please take a look at:

http://www.linuxforums.org/forum/post-305256.html

I would appreciate any help anyone could offer to help resolve this. Please note you'll have to scroll down to my 2nd or third post there as I've already resolved the first issue I mentioned there.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pppd connects and route set up, but cannot resolve detly Linux - Networking 12 02-25-2008 10:16 PM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
modem connects, pppd won't start roger_b Linux - Newbie 7 05-17-2004 09:16 AM
pppd died: pppd options error (exit code 2 taveirac Linux - Networking 1 02-12-2004 10:17 AM
pppd route additions Tarantismic Yak Linux - Networking 1 10-31-2001 04:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration