Peter Christensen wrote:
> I was hoping this thread would answer a question that's been puzzling me 
> concerning defaultroute.  Some months ago there was a question about PPP on 
> this list and someone referred to "How to Hook Up PPP" by W. G. Unruh at 
> http://axion.physics.ubc.ca/ppp-linux.html
> 
> This document helped me past a problem with defaultroute when I installed 
> Woody this summer:
> ***************************************************************
> No Default Route Your computer passes messages for addresses it does not know 
> to the default route. ppp assumes that there can only be one default route on 
> any system. This is almost always the route to ISP's computer. However, if 
> pppd finds that a default route already exists, it will not set up one to 
> your ISP, causing problems (nothing gets through). In order that you not have 
> any conflicts between the routing across ppp and onto some network you have, 
> run 
> /sbin/route -n 
> (or you can also run 
> /bin/netstat -nr 
> which does the same thing) 
> while not connected via ppp, and look for a default entry. (First entry in 
> line is 0.0.0.0). This almost certainly should not be there. (Unless you 
> already have a hookup to the internet via an ethernet connection, you do not 
> want such a default route.) Unless you know that your computer has an 
> ethernet connection to other computers already, the only thing there should 
> be a route to 127.0.0.1 or 127.0.0.0 If there is such a default route (line 
> starting with 0.0.0.0), and you want the ppp interface to be your default 
> route, (the usual situation), run 
> /sbin/route del default 
> Also find out what was setting that wrong default route, and stop it from 
> doing so. (If you cannot figure out what is doing so, put that line 
> /sbin/route del default 
> at the end of whichever of /etc/rc.local or /etc/rc.d/rc.local exists on your 
> system.) 
> **********************************************************
> Before dialling out I always check for a default route (0.0.0.0) with "route 
> -n" and find it quite often.  So then I have to type "route del default" 
> before "pon."  
> 
> Rather than automate the "route del default" command by putting it in 
> rc.local, I'd like to know why it keeps coming back.  Is it possible to 
> prevent the default route from going back to 0.0.0.0?  
> 
> Thanks,
> Peter Christensen
> 
> 

Peter,

In a majority of these cases, you have an ethernet card on your computer 
and it is setup to interface with a LAN.  If you inspect the 
/etc/interfaces file with a text editor, you will probably find a line 
called "gateway" on the stanza for your ethernet card.  This is the 
entry that is setting the "default route".  If you remove this entry, 
then the next time you start your network, it "should" NOT be there. 
Doing this "removal" can pose problems on a computer running PPP 
occasionally but is NOT the "LAN" gateway.  Setup in these circumstances 
is a bit tricky, and I have not found a good way to do it without some 
sort of manual intervention.

There are other programs that can set the "default route" by design. 
DIALD is one of those.  If you are using diald, you should probably 
consult the setup docs to see the correct setup proceedure.  If you are 
NOT using diald, then I would recommend removing it from your system. 
It seems to be installed by default on most of mine...

As a last resort, you can stop/start the scripts in /etc/rcS.d in the 
same order as done during bootup and see which one "sets" the default 
route.  This procedure is time-consuming and often frustrating <grin>, 
but works when you are all out of ideas.  I would bet it is NOT before 
the network is started in /etc/rcS.d/S40networking <grin>...think about 
it....  BTW, this is where the /etc/network/interfaces file gets read 
and acted upon.

I hope these "hints" help you track down your problem.

Cheers,
-Don Spoon-




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to