Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPPD returns no such device error while establishing XL2TPD over PPPoE #225

Open
AnjanaRajan97 opened this issue Nov 23, 2021 · 0 comments

Comments

@AnjanaRajan97
Copy link

Hi Team,
We are trying to establish an XL2TPD connection between a linux machine and an embedded linux board. The embedded linux board uses Linux Kernel Version 4.19. The Linux Machine is running on Ubuntu 18.04. There is already a PPPoE connection between the Linux Machine and the Board, providing IP to the Board. The idea is to implement XL2TPD over PPPoE. Currently we are running XL2TPD without IPsec support.

image

  1. Versions
    XL2TPD :- 1.3.14
    PPPD :- 2.4.8
    PPPoE :- 3.12

*In both Linux Machine and Board we are running as root

  1. Commands used for connecting to LNS from LAC
    sudo xl2tpd -c /etc/xl2tpd/xl2tpd.conf -C /var/run/xl2tpd/l2tp-control
    sudo xl2tpd-control add l2tp lns=
    sudo xl2tpd-control add l2tp local ip=
    sudo xl2tpd-control connect l2tp -------> Username and Password stored in /etc/ppp/chap-secrets

  2. Configuration in LNS

  • /etc/xl2tpd/xl2tpd.conf
    [global] ; Global parameters:
    port = 1701 ; * Bind to port 1701
    access control = no ; * Refuse connections without IP match
    [lns default] ; Our fallthrough LNS definition
    ip range = 192.168.4.53-192.168.4.60 ; * Allocate from this IP range
    local ip = 192.168.4.52 ; * Our local IP to use
    require chap = yes ; * Require CHAP auth. by peer
    refuse pap = yes ; * Refuse PAP authentication
    name = <user mentioned in /etc/ppp/chap-secrets> ; * Report this as our hostname
    pppoptfile = /etc/ppp/options.xl2tpd ; * ppp options file

  • /etc/ppp/options.xl2tpd
    logfd 2
    logfile /tmp/xl2tpd.log
    noccp
    auth
    refuse-eap
    mtu 1410
    mru 1410
    nodefaultroute
    proxyarp
    silent
    debug
    ms-dns 8.8.8.8

  • /etc/ppp/options
    persist
    lcp-echo-failure 1
    lcp-echo-interval 30
    +ipv6
    ipv6cp-use-persistent
    mru 1492
    idle 0
    defaultroute
    usepeerdns
    user xxxxxxxx
    mtu 1492
    lock
    debug
    maxauthreq 5

  • /etc/ppp/pppoe.conf
    MRU=1492
    USER=xxxxxxxx
    IFNAME='erouter0'
    DEMAND=no
    DNSTYPE=SERVER
    PEERDNS=yes
    DNS1=
    DNS2=
    DEFAULTROUTE=yes
    CONNECT_TIMEOUT=0
    CONNECT_POLL=2
    ACNAME=
    SERVICENAME=
    PING="."
    PIDFILE="/var/run/pppoe.pid"
    SYNCHRONOUS=no
    CLAMPMSS=1412
    LCP_INTERVAL=30
    LCP_FAILURE=3
    PPPOE_TIMEOUT=80
    FIREWALL=NONE
    PPPOE_EXTRA=""
    PPPD_EXTRA="host-uniq e4c0e22464d3"
    ETH='eth0.32'
    LINUX_PLUGIN="/usr/lib/pppd/2.4.8/rp-pppoe.so"

  • /etc/ppp/chap-secrets
    Xl2tp_host * mysecretpass *

  1. Configuration in LAC
  • /etc/xl2tpd/xl2tpd.conf
    [global] ; Global parameters:
    port = 1701 ; * Bind to port 1701
    access control = no ; * Refuse connections without IP match
    [lac Xl2tp_host] ; Another quick LAC
    lns = ; * Required, but can take from default
    require authentication = no
    pppoptfile = /etc/ppp/options.xl2tpd

  • /etc/ppp/chap-secrets
    Xl2tp_host * mysecretpass *

  1. IPtable Rules added for XL2TPD
    iptables -I INPUT -p udp --dport 1701 -j ACCEPT

  2. XL2TPD Logs from LNS
    Listening on IP address 0.0.0.0, port 1701
    Connection established to 172.32.50.1, 1701. Local: 22865, Remote: 62009 (ref=0/0). LNS session is 'default'
    control_finish: Warning: Peer did not specify transmit speed
    Call established with 172.32.50.1, Local: 8, Remote: 7794, Serial: 1
    using channel 17
    Using interface ppp1
    Connect: ppp1 <--> /dev/pts/1
    rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x816a3a4c>]
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x34d9f77c> ]
    sent [LCP ConfNak id=0x1 ]
    rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x816a3a4c>]
    sent [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0x816a3a4c>]
    rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x34d9f77c> ]
    ioctl(SIOCSIFMTU): No such device (line 1243)
    sent [LCP EchoReq id=0x0 magic=0x34d9f77c]
    sent [CHAP Challenge id=0x4c <39ad28dd6d86e73670b9ed66936ebfc322603c20>, name = "Xl2tp_host"]
    rcvd [CHAP Challenge id=0x79 , name = "Xl2tp_host"]
    sent [CHAP Response id=0x79 , name = "Xl2tp_host"]
    rcvd [LCP EchoReq id=0x0 magic=0x816a3a4c]
    sent [LCP EchoRep id=0x0 magic=0x34d9f77c]
    rcvd [CHAP Response id=0x4c , name = "Xl2tp_host"]
    sent [CHAP Success id=0x4c "Access granted"]
    rcvd [LCP EchoRep id=0x0 magic=0x816a3a4c]
    rcvd [CHAP Success id=0x79 "Access granted"]
    CHAP authentication succeeded: Access granted
    CHAP authentication succeeded
    sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 192.168.4.0>]
    rcvd [IPCP ConfReq id=0x1 <addr 0.0.0.0>]
    sent [IPCP ConfRej id=0x1 <addr 0.0.0.0>]
    rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
    sent [IPCP ConfReq id=0x2 <addr 192.168.4.0>]
    rcvd [IPCP ConfReq id=0x2 <addrs 0.0.0.0 0.0.0.0>]
    sent [IPCP ConfRej id=0x2 <addrs 0.0.0.0 0.0.0.0>]
    rcvd [IPCP ConfAck id=0x2 <addr 192.168.4.0>]
    rcvd [IPCP ConfReq id=0x3]
    sent [IPCP ConfAck id=0x3]
    Could not determine remote IP address: defaulting to 10.64.64.65
    ioctl(SIOCSIFADDR): No such device (line 2630)
    Interface configuration failed
    Couldn't get PPP statistics: No such device
    ioctl (SIOCGIFFLAGS): No such device (line 2587)
    ioctl(SIOCSIFADDR): No such device (line 2750)

    sent [IPCP TermReq id=0x3 "Interface configuration failed"]
    rcvd [IPCP TermReq id=0x4 "Could not determine local IP address"]
    sent [IPCP TermAck id=0x4]
    rcvd [IPCP TermAck id=0x3]
    Couldn't get PPP statistics: No such device
    sent [LCP TermReq id=0x2 "No network protocols running"]
    rcvd [LCP TermReq id=0x3 "No network protocols running"]
    sent [LCP TermAck id=0x3]
    rcvd [LCP TermAck id=0x2]
    Connection terminated.

We have tried the above setup and configuration between two virtual machines running on Ubuntu 18.04 and were able to successfully establish XL2TPD over PPPoE. Any suggestions or help would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant