Now my connection works also with l2tp. I changed it, since actcom support told me that the disconnects I have may be solved when I change from pptp to l2tp. I hope to see that this change indeed solves the problem.
In order use the openwrt with l2tp, I had to add the rp-l2tp package + relevant kernel modules + configuration + connect script.
I use the script:
/etc/init.d/S49cable-l2tp
#!/bin/sh
case "$1" in
start|restart)
insmod ppp_generic
insmod ppp_synctty
insmod slhc
insmod n_hdlc
mkdir -p /var/lock
ifconfig vlan1 down
ifconfig vlan1 hw ether 00:11:22:33:44:55
/sbin/udhcpc -i vlan1
CABLE_FULL_USERNAME=myusername@CActcom
CABLEGW=`route | grep default | awk -F ' ' '{ print $2 }'`
/sbin/route add -host 172.26.255.197 gw $CABLEGW
/sbin/route del default
/usr/sbin/l2tpd
sleep 1
/usr/sbin/l2tp-control "start-session 172.26.255.197"
;;
esac
I use the configuration:
/etc/l2tp.conf
# Global section
global
# Load handlers
load-handler "sync-pppd.so"
load-handler "cmd.so"
# Bind address
listen-port 1701
# Peer section
section peer
peer 172.26.255.197 # <-- Your ISP's LNS adderss here
port 1701
lac-handler sync-pppd
hide-avps no
# Configure the cmd handler.
section cmd
# Configure the sync-pppd handler.
# *** You should replace "user@cactcom" with your user name, as configures
# *** in /etc/ppp/pap-secrets
section sync-pppd
lac-pppd-opts "user myusername@CActcom debug persist noipdefault defaultroute usepeerdns noauth lcp-echo-in
and:
/etc/ppp/pap-secrets
"myusername@CActcom" "l2tp.actcom.net.il" "mypassword"
l2tp.actcom.net.il is 172.26.255.197 in /etc/hosts
I assume that after compiling a new openwrt version, this script can work smoothly, but I wanted to keep my RC3 working, and just add the l2tp option. The build also had some problems, so instead of having a nice ipk package, I just built the binaries, and put them in place.
what I did is:
Adding to the kernel config (2.4.20):
CONFIG_N_HDLC
CONFIG_PPP_SYNC_TTY
And adding the rp-l2tp package from svn verion 3902 to the RC3 tag, and choosing:
BR2_COMPILE_RP_L2TP=m
BR2_PACKAGE_RP_L2TPD=m
BR2_PACKAGE_RP_L2TPD_MOD_CMD=m
file locations:
/etc/init.d/S49cable-l2tp
/usr/sbin/l2tp-control
/usr/sbin/l2tpd
/lib/modules/2.4.20/ppp_generic.o
/lib/modules/2.4.20/slhc.o
/lib/modules/2.4.20/n_hdlc.o
/lib/modules/2.4.20/ppp_synctty.o
/usr/lib/l2tp/cmd.so
/usr/lib/l2tp/sync-pppd.so
/etc/l2tp.conf
Anyone who wants to avoid the mess and time of building everything, can download the ready products (+ this README) from:
http://livnex.com/openwrt/l2tp/
Share and enjoy!
Shahar Livne