On Wed, Dec 06, 2006 at 11:35:00AM +0000, Brian Candler wrote:
> Anyway, if there's anyone on this list who know is intimate with the
> internals of pty(4) and ppp(4), knows enough about rp-l2tp to set up a test
> rig, and would like to see the OpenBSD port working, I'd be very grateful
> for your assistance.

P.S. The patch also adds a -c option to l2tpd to allow a config file to be
specified. This lets you run multiple instances of l2tpd bound to different
IP addresses or ports.

So, you can run a completely local test between two instances of l2tpd. The
configuration files for this are given below. You need to make sure you have
two ppp interfaces:

# ifconfig ppp0 create
# ifconfig ppp1 create

Then proceed like this:

[screen 1]
# l2tpd -f -c /etc/l2tp/l2tp.conf.lac

[screen 2]
# l2tpd -f -c /etc/l2tp/l2tp.conf.lns

[screen 3]
# l2tp-control "start-session 127.0.0.1"

This brings up the link, and you can then demonstrate the problem:

# ping -s1000 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 1000 data bytes
1008 bytes from 10.0.0.1: icmp_seq=0 ttl=255 time=2031.528 ms
1008 bytes from 10.0.0.1: icmp_seq=1 ttl=255 time=2030.287 ms
--- 10.0.0.1 ping statistics ---
4 packets transmitted, 2 packets received, 50.0% packet loss
round-trip min/avg/max/std-dev = 2030.287/2030.907/2031.528/1.554 ms

In this case the packets are delayed by 2 seconds, as you get the problem
occuring in both directions.

Regards,

Brian.

==> /etc/l2tp/l2tp.conf.lac <==
global
load-handler "async-pppd.so"
load-handler "cmd.so"

listen-addr 127.0.0.1
listen-port 10000

section async-pppd
lac-pppd-opts "noauth user foouser name foouser noipdefault ipcp-accept-local 
ipcp-accept-remote lcp-echo-interval 30 lcp-echo-failure 6 debug"

section peer
peer 127.0.0.1
port 1701
lac-handler async-pppd

section cmd

==> /etc/l2tp/l2tp.conf.lns <==
global
load-handler "async-pppd.so"
load-handler "cmd.so"

listen-addr 127.0.0.1
listen-port 1701

section async-pppd
lns-pppd-opts "require-chap 10.0.0.1:10.0.0.2 lcp-echo-interval 30 
lcp-echo-failure 6 debug"

section peer
peer 127.0.0.1
port 10000
lns-handler async-pppd

section cmd
socket-path /var/run/l2tpctrl-lns

==> /etc/ppp/chap-secrets <==
foouser         *       xyzzy                   *

Reply via email to