[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] PPP Trouble - is gated the solution?



On 26 Jan 2001 13:45:44 +0000, James Wallbank wrote:
> I'm also trying to configure a PPP gateway onto my home network - 
> I've got the machine to dial in alright, so now when I ifconfig I see 
> 3 networks - lo eth0 and ppp0. The only trouble is, I can't seem to 
> get any other connection to the outside world. If I try to ping the 
> IP number of my provider's DNS server (I like to try something I know 
> is there) then I get no contact.


First off, not being able to ping an IP address is usually not a DNS
problem, _if_ you're doing a 'ping -n'. Even if you're just doing a
straight ping, it will work - but will take ages. 

You don't say which machine you're trying to ping from. I presume you're
talking about the gateway machine itself? If not, the solutions will
probably have been provided by the other respondents. If you *are* on
the gateway, though, and you can't ping the dns server it could be one
of two troubles. The first, and most likely, as mentioned by someone
else is the default route. Do a 'ifconfig ppp0' to determine your IP
address, do a 'route add default gw [ip address here]', and then try
again. 

The other possible problem is that your pppd hasn't picked up an ip
address from the machine you're connecting to. You'll know this problem
by the fact that 'ifconfig ppp0' will show no ip address :(. The
solution is usually to get a more up-to-date pppd package - I recommend
the one called 'Debian' which also comes with a Linux operating system
:)  - but, you already have it. How did you configure your dial out? If
you didn't do it already, login as 'root' and execute 'pppconfig'. Let
Debian do the work :))


> I had though that DNS was the issue, and I'd have to try running 
> "bind" at my end - but obviously you don't need to resolve an IP 
> number - so it's genuinely the case that my pings aren't getting 
> though and DNS isn't the issue.


As I mentioned, sometimes you do need DNS to do things even with IP
addresses. The reason is, many utilities (ping, netstat, et al) do
reverse-lookups to determine a human-readable name from the IP.


> I'm guessing that my pings are zooming out of eth0 instead of ttyS0. 


You can check this out: do a 'tcpdump -i eth0'. If you want to be really
clever, you could do a 'tcpdump -i eth0 dest [ip address you're
pinging]'. If you don't see anything, that means there's no traffic on
eth0 and hence it isn't going that way. The easier method, though, is to
do a 'netstat -rn' - that prints out the kernel routing table. A packet
is matched against interfaces which are attached to networks the packet
is destined to (for example, if a packet was going to 192.168.0.1 and
you had eth0 on 192.168.0.* it would match eth0), and then (if there is
more than one interface) the smallest subnet is chosen. Hence, when you
have a default route (big wide subnet 0.0.0.0), packets can still get to
your local net (192.168.0.*, for example, which is a 255.255.255.0
subnet) even though the default route might be ppp0 whereas the lan is
eth0 - the 255.255.255.0 is the smaller subnet, and hence eth0 is
chosen. I hope that doesn't confuse :)


> In which case, what do I do to route the packets where I want them to 
> go? Do I run routed or gated - or is there a simply a config file I 
> can edit? (I'm running Debian 2.2 release 2, if that's any help).


pppd should take care of the routing for you - certainly, you don't need
routed. The default route should be established on demand if you've
setup pppd correctly. Also, don't put the dns servers in
/etc/resolv.conf - again, pppd (or, the associated utilities :) will
take of this for you. You don't really want dns servers you can't
connect to (e.g., when you're offline) in /etc/resolv.conf permanently -
that would lead to dns timing out, which is a common problem when people
say 'such-and-such network program hangs'. 

Cheers,

Alex.
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.