OpenWrt Forum Archive

Topic: Howto use Israeli cable TV internet (HOT) with openwrt - l2tp

The content of this topic has been archived on 28 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

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

Hi Shahar,

Thanx for the info.

I was wondering what the status of the l2tp for HOT was?

Is it available as a package? If so, for what version?

Is it available for X-Wrt? If so, for what version?

I tried to download the files from your site, but some are restricted.

In any case, I'd appreciate very much somewhat more detailed Howto, if possible.

Thx,
D

Hi Shahar
I need n_hdlc kernel module c source file so that i can compile for my kernel 2.6.25.17
.Please help me with the c source file,thanks in advance.

Appreciated info, its good to know..

The discussion might have continued from here.