Kevin K | 7 Aug 00:45
Picon
Favicon

sending raw packets via PPP

Is it possible to send raw packets via ppp under Linux?

More specifically, in 2.4 series kernels such as RH's 2.4.21-47 kernel?

I've trying to modify the DHCP 3.0.1 code provided with RH 3 so I can  
send requests via a PPP connection (standard RS-232), and it is just  
being dropped by the stack according to ifconfig and debug statements  
in ppp_generic.c.

Thanks,
Kevin
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

James Carlson | 7 Aug 01:30

Re: sending raw packets via PPP

Kevin K writes:
> Is it possible to send raw packets via ppp under Linux?
> 
> More specifically, in 2.4 series kernels such as RH's 2.4.21-47 kernel?
> 
> I've trying to modify the DHCP 3.0.1 code provided with RH 3 so I can  
> send requests via a PPP connection (standard RS-232), and it is just  
> being dropped by the stack according to ifconfig and debug statements  
> in ppp_generic.c.

I'm not sure what sort of "raw" packets you're talking about (IP raw
or something else), but you shouldn't need to send any raw packets to
do this.  DHCP runs over UDP, and, unlike Ethernet, there's no link
layer addressing to worry about.

--

-- 
James Carlson         42.703N 71.076W         <carlsonj <at> workingcode.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Kevin K | 7 Aug 02:24
Picon
Favicon

Re: sending raw packets via PPP


On Aug 6, 2007, at 6:30 PM, James Carlson wrote:

> Kevin K writes:
>> Is it possible to send raw packets via ppp under Linux?
>>
>> More specifically, in 2.4 series kernels such as RH's 2.4.21-47  
>> kernel?
>>
>> I've trying to modify the DHCP 3.0.1 code provided with RH 3 so I can
>> send requests via a PPP connection (standard RS-232), and it is just
>> being dropped by the stack according to ifconfig and debug statements
>> in ppp_generic.c.
>
> I'm not sure what sort of "raw" packets you're talking about (IP raw
> or something else), but you shouldn't need to send any raw packets to
> do this.  DHCP runs over UDP, and, unlike Ethernet, there's no link
> layer addressing to worry about.

I was basing the raw mode on comments in the DHCP source code about  
problems in older Linux kernels with sending packets to  
255.255.255.255 via normal IP.  The DHCP source code therefore wants  
to send raw packets (SOCKET_PACKET) (down to the ethernet addressing  
info).  I guess I thought I would need to do this too to fit in with  
the existing source code.

I'll give it a try to see whether packets sent to 255.255.255.255 can  
make it to ppp with the IP address unchanged.

Thanks,
(Continue reading)

Christopher Fowler | 7 Aug 02:32
Favicon

Re: sending raw packets via PPP

On Mon, 2007-08-06 at 19:24 -0500, Kevin K wrote:
> The DHCP source code therefore wants  
> to send raw packets (SOCKET_PACKET) (down to the ethernet addressing  
> info).  

I can imagine that would be the case.  The box requesting the DHCP
address has no IP address.  Therefore TCP/IP can not be used at that
point to communicate between the two.  I've not had to look at the DHCP
code to see how this works.

-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Matt Keenan | 7 Aug 10:46
Picon

Re: sending raw packets via PPP

Kevin K wrote:
>
> On Aug 6, 2007, at 6:30 PM, James Carlson wrote:
>
>> Kevin K writes:
>>> Is it possible to send raw packets via ppp under Linux?
>>>
>>> More specifically, in 2.4 series kernels such as RH's 2.4.21-47 kernel?
>>>
>>> I've trying to modify the DHCP 3.0.1 code provided with RH 3 so I can
>>> send requests via a PPP connection (standard RS-232), and it is just
>>> being dropped by the stack according to ifconfig and debug statements
>>> in ppp_generic.c.
>>
>> I'm not sure what sort of "raw" packets you're talking about (IP raw
>> or something else), but you shouldn't need to send any raw packets to
>> do this.  DHCP runs over UDP, and, unlike Ethernet, there's no link
>> layer addressing to worry about.
>
> I was basing the raw mode on comments in the DHCP source code about
> problems in older Linux kernels with sending packets to
> 255.255.255.255 via normal IP.  The DHCP source code therefore wants
> to send raw packets (SOCKET_PACKET) (down to the ethernet addressing
> info).  I guess I thought I would need to do this too to fit in with
> the existing source code.
>
> I'll give it a try to see whether packets sent to 255.255.255.255 can
> make it to ppp with the IP address unchanged.
You shouldn't need to run DHCP over PPP, PPP uses LCP to configure
connections. I suspect the only time you would need to run DHCP over a
(Continue reading)

James Carlson | 7 Aug 12:30

Re: sending raw packets via PPP

Matt Keenan writes:
> Kevin K wrote:
> > I'll give it a try to see whether packets sent to 255.255.255.255 can
> > make it to ppp with the IP address unchanged.

You should be able to make DHCP work by sending ordinary unicast UDP
packets to the peer.  There shouldn't be any need to hack around with
special broadcast addresses.

Use AF_INET, SOCK_DGRAM, and send away.

> You shouldn't need to run DHCP over PPP, PPP uses LCP to configure
> connections. I suspect the only time you would need to run DHCP over a
> PPP link is if you had a DHCP proxy run the request over the PPP link,
> but that sounds way more complicated than what you are looking for.

I don't think that DHCP over PPP is a bad idea at all, particularly so
with DHCPINFORM messages, which are stateless and don't involve any
sort of address assignment.

PPP is not designed to provide arbitrary client application layer
configuration.  The RFC 1877 nonsense is a Microsoft proprietary thing
that doesn't actually work very well -- see my book for a more
substantial list of its flaws.

In contrast, DHCP works everywhere, includes *far* more configuration
information (such as boot servers, print servers, SIP addresses,
domain names, and the like), and is easier to manage than cramming
things into PPP.

(Continue reading)

James Carlson | 7 Aug 12:33

Re: sending raw packets via PPP

Christopher Fowler writes:
> On Mon, 2007-08-06 at 19:24 -0500, Kevin K wrote:
> > The DHCP source code therefore wants  
> > to send raw packets (SOCKET_PACKET) (down to the ethernet addressing  
> > info).  
> 
> I can imagine that would be the case.  The box requesting the DHCP
> address has no IP address.

That's not always true.  DHCP works fine on systems that already have
IP addresses -- address leasing is an _optional_ part of the protocol.
You can use DHCPINFORM to retrieve configuration parameters alone if
you already have an address.

Note that address assignment is technically optional in PPP (IPCP) as
well, so it would be possible to refuse IPCP addresses and then use
DHCP to acquire the needed information.  It'd be strange to do, though.

--

-- 
James Carlson         42.703N 71.076W         <carlsonj <at> workingcode.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Kevin K | 7 Aug 18:53
Picon
Favicon

Re: sending raw packets via PPP


On Aug 7, 2007, at 5:30 AM, James Carlson wrote:

> Matt Keenan writes:
>> Kevin K wrote:
>>> I'll give it a try to see whether packets sent to 255.255.255.255  
>>> can
>>> make it to ppp with the IP address unchanged.
>
> You should be able to make DHCP work by sending ordinary unicast UDP
> packets to the peer.  There shouldn't be any need to hack around with
> special broadcast addresses.
>
> Use AF_INET, SOCK_DGRAM, and send away.
>
>> You shouldn't need to run DHCP over PPP, PPP uses LCP to configure
>> connections. I suspect the only time you would need to run DHCP  
>> over a
>> PPP link is if you had a DHCP proxy run the request over the PPP  
>> link,
>> but that sounds way more complicated than what you are looking for.
>
> I don't think that DHCP over PPP is a bad idea at all, particularly so
> with DHCPINFORM messages, which are stateless and don't involve any
> sort of address assignment.
>
> PPP is not designed to provide arbitrary client application layer
> configuration.  The RFC 1877 nonsense is a Microsoft proprietary thing
> that doesn't actually work very well -- see my book for a more
> substantial list of its flaws.
(Continue reading)

Szymon Stefanek | 9 Aug 01:59
X-Face
Picon
Favicon

pppd and rp-pppoe LCP timeout issues

Hi All!

Couldn't reach the pppd mantainer in a couple of days and I've seen this
problem posted on the list without an answer. I was really happy to find one 
after spending a sunday evening on it so I post it here to save someone 
else's sunday :)

There is an issue related to pppd-2.4.4 (maybe other versions too)
and the rp-pppoe daemon (have tried version 3.8 but other might be also 
affected).

The problem usually manifests itself with a pppd debug output similar
to the following:

pppd[28986]: Connect: ppp0 <--> /dev/pts/13
pppd[28986]: rcvd [LCP ConfReq id=0x0 <mru 1480> <magic 0x287a30b1>]
pppd[28986]: sent [LCP ConfReq id=0x1 <auth pap> <magic 0x2f2d3639>]
pppd[28986]: sent [LCP ConfAck id=0x0 <mru 1480> <magic 0x287a30b1>]
pppd[28986]: rcvd [LCP ConfReq id=0x1 <mru 1480> <magic 0x287a30b1>]
pppd[28986]: sent [LCP ConfAck id=0x1 <mru 1480> <magic 0x287a30b1>]
pppd[28986]: sent [LCP ConfReq id=0x1 <auth pap> <magic 0x2f2d3639>]
pppd[29986]: rcvd [LCP ConfReq id=0x2 <mru 1480> <magic 0x287a30b1>]
pppd[29986]: sent [LCP ConfAck id=0x2 <mru 1480> <magic 0x287a30b1>]
pppd[28986]: sent [LCP ConfReq id=0x1 <auth pap> <magic 0x2f2d3639>]
pppd[28986]: sent [LCP ConfReq id=0x1 <auth pap> <magic 0x2f2d3639>]
pppd[28986]: rcvd [LCP ConfReq id=0x3 <mru 1480> <magic 0x287a30b1>]
pppd[28986]: sent [LCP ConfAck id=0x3 <mru 1480> <magic 0x287a30b1>]
pppd[28986]: sent [LCP ConfReq id=0x1 <auth pap> <magic 0x2f2d3639>]
pppd[28986]: rcvd [LCP ConfReq id=0x4 <mru 1480> <magic 0x287a30b1>]
[....]
(Continue reading)

James Chapman | 9 Aug 09:43
Gravatar

[PATCH 1/1 ppp-2.4.4] Introduce L2TP support

This patch adds support for L2TP. It makes use of a pppol2tp driver in
the Linux kernel. All data packets are handled by the Linux kernel in
order that the datapath be as efficient as possible, while a userspace
daemon implements the L2TP control protocol, handling tunnel/session
setup and teardown. The implementation uses the PPPoX infrastructure;
the architecture is similar to PPPoE/PPPoATM in that a userspace
daemon spawns a pppd process per PPP session and uses a
protocol-specific plugin to connect pppd with the kernel.

The pppol2tp Linux kernel driver is scheduled for inclusion in
2.6.23. For earlier kernels, an out of tree driver is available from
the pppol2tp-kmod package from the OpenL2TP project
http://sf.net/projects/openl2tp.

This code has been in use for some time in the OpenL2TP community.
Please consider for inclusion in the next release of ppp.

James Chapman

Index: ppp-2.4.4/README.pppol2tp
===================================================================
--- /dev/null
+++ ppp-2.4.4/README.pppol2tp
@@ -0,0 +1,98 @@
+pppol2tp plugin
+===============
+
+This document describes the support for PPP over L2TP (PPPoL2TP).
+
+The code was developed by the OpenL2TP project:
(Continue reading)


Gmane