Click to See Complete Forum and Search --> : Cannot browse the internet after successful PPP


ruchika
09-08-2003, 10:42 PM
After the PPP connection gets established, I am not able to browse the internet. I think the problem is because the default route is ethernet on my machine. I know that by changing the default route using /sbin/route del default I can fix this. Is there an alternate way of fixing this problem? Maybe by specifying something in the options file?

Also, I want to support demand dial. Do I need to specify/change some settings inorder to support this? My current settings are

persist idle debug lock modem crtscts defaultroute noauth bsdcomp 0 deflate 0 asyncmap 0 kdebug 0 connect $DIALER SCRIPT

Thanks,
Ruchika

philo
09-08-2003, 11:22 PM
you may have also neglected to assign DNS server addresses, you can set these and the default route by using netconf (as root)

hope that helps :)

bgunn
09-09-2003, 12:19 AM
Yes, your problem is most likely to do with the default routing table.

First you must delete the default route as you mentioned in your post, then you must create a new default route to your ppp connection.

Below is part of a 'Setting Up ADSL How-I-Did-It ' that I wrote. This extract discribes how to fix the routing issue. Since ADSL and dialup modem both use 'ppp0' the information is equally applicable.

Good luck

--------------------------------------------------
TROUBLE SHOOTING
1. You may find that you are unable to access the internet if both 'eth0' and 'ppp0' are running at the same time. Chances are that this is a routing problem. Routing is what tells the system where to send IP packets based on their IP address. Routing information is stored in routing tables which can be viewed using '/sbin/route -n'. The entry you are looking for contains the flag 'UG'. This defines which network interface is the gateway for all outgoing (IP packets destined outside of the LAN). Obviously any packets destined for the internet must be routed to the network device connected to the internet (ie. 'ppp0' - not 'eth1' even though packets must travers this interface to reach 'ppp0'). Check the line containing the flag 'UG'. This line should specify the 'ppp0' device. If not, you system will not know where to send outgoing packets or try sending them to a different device (if the default gateway ('UG') is set to 'eth0').

To solve this problem you must use the following steps:
- First bring up 'eth0' if it is not running. This must be started before 'ppp0' is started.
- Now bring up 'ppp0'.
- Run 'route -n' and look for the line containing the flag 'UG'. If the line is present check to see what device it specifies. If it specifies 'ppp0' then your routing setup is fine. If it specifies a different device, you must first delete the record (use '/sbin/route del default') and then add a new one, binding it with 'ppp0' (use '/sbin/route add default ppp0').
- You should now be able to connect to the internet via 'ppp0' while being connected to the LAN via 'eth0' at the same time.

The changes made to the routing tables are not permanent and will need to be run each time after the system has started. To make life easier the above commands can be added to '/etc/ppp/ip-up.local'. This script will be run after 'ppp0' has comeup and is ready to start transmitting packets. Any scripts you may wish to run after 'ppp0' has been disconnected should be placed in '/etc/ppp/ip-down.local' (NB: You might need to create these to files yourself if they are not present).