Linux PPP protocol development
 help / color / mirror / Atom feed
* pppd creates route without "gateway" flag
@ 2008-09-17 19:23 Joakim Wennergren
  2008-09-17 21:15 ` Bill Unruh
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Joakim Wennergren @ 2008-09-17 19:23 UTC (permalink / raw)
  To: linux-ppp

I just looked at my routing table, and the route pppd created does not
have the "G" flag like I'm used to, is there a reason for this?

This is output from route:

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0

It seems to work, I'm just wondering why? And can it affect something
in the future?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pppd creates route without "gateway" flag
  2008-09-17 19:23 pppd creates route without "gateway" flag Joakim Wennergren
@ 2008-09-17 21:15 ` Bill Unruh
  2008-09-17 21:31 ` James Carlson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Bill Unruh @ 2008-09-17 21:15 UTC (permalink / raw)
  To: linux-ppp

On Wed, 17 Sep 2008, Joakim Wennergren wrote:

> I just looked at my routing table, and the route pppd created does not
> have the "G" flag like I'm used to, is there a reason for this?

PPP is Peer to Peer Protocol. Ie, it is from one peer to another. It has
nothing whatsoever to do with gateways, etc. 
Now you CAN use the peer as your gateway if you wish, but there is no need
to. 
In your output the default route is delivered to the ppp interface and
since there is only one thing, the remote peer, connected to that
interface, all traffic is sent out to that remote peer. 
A gateway says "if you get traffic for this range of addresses send it to
this IP". In your case it says "In the default case just dump it onto the
ppp interface"

>
> This is output from route:
>
> # route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
> 192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
> 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
> 0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
>
> It seems to work, I'm just wondering why? And can it affect something
> in the future?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@physics.ubc.ca
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pppd creates route without "gateway" flag
  2008-09-17 19:23 pppd creates route without "gateway" flag Joakim Wennergren
  2008-09-17 21:15 ` Bill Unruh
@ 2008-09-17 21:31 ` James Carlson
  2008-10-09 11:50 ` Paul Mackerras
  2008-10-14 10:26 ` James Carlson
  3 siblings, 0 replies; 5+ messages in thread
From: James Carlson @ 2008-09-17 21:31 UTC (permalink / raw)
  To: linux-ppp

Bill Unruh writes:
> On Wed, 17 Sep 2008, Joakim Wennergren wrote:
> 
> > I just looked at my routing table, and the route pppd created does not
> > have the "G" flag like I'm used to, is there a reason for this?
> 
> PPP is Peer to Peer Protocol. Ie, it is from one peer to another. It has
> nothing whatsoever to do with gateways, etc. 

I think the original poster is talking about the default route
inserted by the "defaultroute" option.  As he rightly notes, it's
missing the "G" flag:

> > 0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0

And that is in fact a gateway route.  The issue is whether that flag
actually matters on Linux.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pppd creates route without "gateway" flag
  2008-09-17 19:23 pppd creates route without "gateway" flag Joakim Wennergren
  2008-09-17 21:15 ` Bill Unruh
  2008-09-17 21:31 ` James Carlson
@ 2008-10-09 11:50 ` Paul Mackerras
  2008-10-14 10:26 ` James Carlson
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Mackerras @ 2008-10-09 11:50 UTC (permalink / raw)
  To: linux-ppp

James Carlson writes:

> Bill Unruh writes:
> > On Wed, 17 Sep 2008, Joakim Wennergren wrote:
> > 
> > > I just looked at my routing table, and the route pppd created does not
> > > have the "G" flag like I'm used to, is there a reason for this?
> > 
> > PPP is Peer to Peer Protocol. Ie, it is from one peer to another. It has
> > nothing whatsoever to do with gateways, etc. 
> 
> I think the original poster is talking about the default route
> inserted by the "defaultroute" option.  As he rightly notes, it's
> missing the "G" flag:
> 
> > > 0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
> 
> And that is in fact a gateway route.  The issue is whether that flag
> actually matters on Linux.

Why do you say it's a gateway route?  It doesn't have a gateway
address.  It's a route to the 0.0.0.0/0 network via the ppp0 device.

Paul.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pppd creates route without "gateway" flag
  2008-09-17 19:23 pppd creates route without "gateway" flag Joakim Wennergren
                   ` (2 preceding siblings ...)
  2008-10-09 11:50 ` Paul Mackerras
@ 2008-10-14 10:26 ` James Carlson
  3 siblings, 0 replies; 5+ messages in thread
From: James Carlson @ 2008-10-14 10:26 UTC (permalink / raw)
  To: linux-ppp

Paul Mackerras writes:
> > And that is in fact a gateway route.  The issue is whether that flag
> > actually matters on Linux.
> 
> Why do you say it's a gateway route?  It doesn't have a gateway
> address.  It's a route to the 0.0.0.0/0 network via the ppp0 device.

OK; fair point.  That point-to-point peer, though, still is the
'gateway' for all packets that match that route, even though we don't
have the (effectively useless) remote address stored in the route
itself.

If the flag is missing merely because the next-hop address isn't set,
then that explains it, and there's nothing wrong at all with the
original poster's system.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-14 10:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 19:23 pppd creates route without "gateway" flag Joakim Wennergren
2008-09-17 21:15 ` Bill Unruh
2008-09-17 21:31 ` James Carlson
2008-10-09 11:50 ` Paul Mackerras
2008-10-14 10:26 ` James Carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox