lkml.org 
[lkml]   [1996]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: diald-0.14-1 ?
Date
From

Ray Curtis <ray@fred.net> writes:
>I'm using Kernel Version 2.0 and ppp-2.2.0f-1 along with diald-0.14-1
>and have just noticed that the routing seems wrong. Everything seems
>to be working, however I this is what I get. Does anyone have any
>idea's why I show (3) ppp0 lines and (2) default lines ?
>
>This is with link up:
>
>netstat -r
>Kernel routing table
>Destination Gateway Genmask Flags Metric Ref Use Iface
>bigdog.fred.net * 255.255.255.255 UH 500 0 1 ppp0
>bigdog.fred.net * 255.255.255.255 UH 2000 0 3 sl0
>portmaster2.fre * 255.255.255.255 UH 0 0 0 ppp0
>loopback * 255.0.0.0 U 0 0 1 lo
>default * 0.0.0.0 U 500 0 0 ppp0
>default bigdog.fred.net 0.0.0.0 UG 2000 0 6 sl0

Ok, this is (mostly) by design. Here goes:
when diald comes up it creates the proxy device (sl0) and sets up two
routes, a point to point route and a default route, that point at sl0.
These are both set up with a high metric value (2000).
[Aside to those in the know: I know I'm abusing the metric. I'll probably
switch the metrics to be 2 and 1 sometime in the near future.]

Now, we ppp comes up we want to assign some routes to the ppp link.
In this case, the default route and a point to point route through
bigdog.fred.net. At the same time pppd is pretty clever itself,
and sets up a point to point route to the address it sees on
the remote end, which is apparantly portmaster2.fred.net in this case.
In any case, the routes set up by diald have metric 500, and the
route set up by pppd has metric 0.

At this point you are all asking yourselves, ``Has Eric gone batty?
Why doesn't diald delete the routes to sl0 at this point?'' Good question.
The answer is that when the ppp line gets hung up on pppd dies and deletes
the ppp0 interface. This immediately deltes all the routes through ppp0.
Now, diald is not a kernel service, the deamon may be asleep when all
this happens. If we had deleted the routes, then during the time
between ppp0 going down and diald noticing that there is no pppd process
there would have been no routes at all. Anyone trying to get to the
network at this point would see "network unreachable". Since
the purpose of diald is to make it transparently appear as though
you always have an "up" connection to the network this is a Bad Thing (TM).
To avoid this I abuse the notion of routing metrics and leave lots
of extra routes around.

So, there you have it. This is completely normal. Well, almost. There
is one thing you'll notice I carefully didn't explain. Why does
pppd set up a point to point route to a different machine than diald?
Well, you told diald that the remote end was bigdog.fred.net, but in
fact when you got connected it was portmaster2.fred.net. Don't panic though.
Sometimes this is necessary. It may be that your ISP has several
different machines that can answer the phone. Depending on which
one you get, you'll get a different remote IP address. In any case,
bigdog.fred.net is reachable from any of these, so the extra
entry in your routing table won't hurt anything.

Hope this has been generally enlightening.

Cheers,

-- eric

---------------------------------------------------------------------------
Eric Schenk www: http://www.cs.toronto.edu/~schenk
Department of Computer Science email: schenk@cs.toronto.edu
University of Toronto


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.044 / U:7.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site