Querying status

The ProL2TP daemons can be queried using CLI utilities.

In this section, we explain how these can be used to query status.

prol2tpd

Status summary

The prol2tpd daemon is usually managed with the Linux system’s init subsystem.

Most Linux distributions have converged on using systemd, but some use alternatives, e.g. upstart and rc-sysvinit. The service command wraps these, and can be used to determine whether prol2tpd is running:

root@lns:~# service prol2tp status
● prol2tp.service - ProL2TP L2TPv2/L2TPv3 network protocol daemon
   Loaded: loaded (/lib/systemd/system/prol2tp.service; disabled; vendor preset:
   Active: active (running) since Thu 2018-11-29 11:45:30 UTC; 6min ago
  Process: 12245 ExecStart=/usr/sbin/prol2tpd $PROL2TPD_OPTIONS (code=exited, status=0/SUCCESS)
  Process: 12238 ExecStartPre=/bin/sh -c modprobe -q -a $MODULES || true (code=exited, status=0/SUCCESS)
 Main PID: 12246 (prol2tpd)
    Tasks: 6
   Memory: 1.9M
      CPU: 232ms
   CGroup: /system.slice/prol2tp.service
           ├─12246 /usr/sbin/prol2tpd -d -o /var/log/prol2tpd.log
           └─12251 /usr/sbin/prol2tp-scriptd -f

It is also possible to query prol2tpd state directly using the prol2tp tool. The show system command summarises the current state and shows some configuration values that may be derived, for example the hostname and the router id value used for L2TPv3:

root@lns:~# prol2tp show system
ProL2TP V2.0.0
  (c) Copyright 2004-2019 Katalix Systems Ltd.

L2TP configuration:
  listening on: 192.168.211.10:1701
  hostname: jackdaw
  router id: 3232235848
  log level: NOTICE
L2TP service status:
  tunnels: 1, sessions: 3

L2TP tunnels

To obtain lists of tunnels, use the show tunnels command.

root@lns:~# prol2tp show tunnels
       TunId Name State      Time Peer
N      27774    -    UP  00:41:50 192.168.211.20

In this example, there is one tunnel, assigned id 27774.

The ‘N’ in the first column indicates it is a net instance, that is, it is created by a network request. The L2TP peer is 192.168.211.20, which is our LAC. The tunnel doesn’t have a name because it is created by the network.

Details of any tunnel can be seen with the show tunnel command.

root@lns:~# prol2tp show tunnel id 27774
Tunnel 27774 from 192.168.211.25:20142 to 192.168.211.20:1962
  created at:                 Nov 29 11:56:36 2018
  origin:                     net
  tunnel mode:                LNS
  version:                    L2TPv2
  encapsulation:              UDP
  state:                      ESTABLISHED
  time since state change:    00:02:26
  number of sessions:         3
  log level:                  INFO
  local tunnel id:            27774
  transport ns:               4
  transport nr:               10
  transport cwnd:             5
  transport ssthres:          10
  transport tx window:        10
  tunnel profile name:        lac1
  peer tunnel id:             24377
  peer host name:             lac
  peer vendor name:           prol2tp 1.8.6 Linux-4.4.0-139-generic (x86_64)

For more details refer to the prol2tp man page.

L2TP sessions

Sessions can be listed with the show sessions command.

root@lns:~# prol2tp show sessions
       TunId     SessId TunName SessName   Type State      Time Identifier
N      27774      34877       -        -    PPP    UP  00:41:49 u1@example.com
N      27774       2129       -        -    PPP    UP  00:41:49 u3@example.com
N      27774      57634       -        -    PPP    UP  00:41:49 u2@example.com

With L2TPv2, sessions are assigned 16-bit ids, scoped by the tunnel in which they are created. The session list shows the assigned ID of the session and its tunnel.

Like the show tunnels output, the ‘N’ in the first column indicates that a session is created by a network request.

For PPP sessions, the Identifier column shows the PPP username, if known.

root@lcce1:~# prol2tp show sessions
       TunId     SessId TunName SessName   Type State      Time Identifier
C 2008991623  762631622     one      one    ETH    UP  00:00:02 demo-l2tpv3-eth-1

With L2TPv3, tunnel and session ids are 32-bit values.

For L2TPv3 ethernet/VLAN pseudowires, the Identifier column shows the session’s L2TPv3 Remote End ID. A ‘C’ in the first column indicates taht a session was created by a local request based on the prol2tpd config file.

Details of a session instance are shown using the show session command. If the optional stats keyword is used, the output includes dataplane statistics.

Sessions are identified by their id and their parent tunnel’s id.

root@lns:~# prol2tp show session id 34877 in tunnel id 27774 stats
Session 34877 on tunnel 27774:
  created at:                 Nov 29 11:56:36 2018
  state:                      ESTABLISHED
  origin:                     net
  time since state change:    00:04:24
  pseudowire type:            PPP
  log level:                  INFO
  tunnel id:                  27774
  session id:                 34877
  peer session id:            42991
  session profile name:       lac
  pseudowire profile name:    ppp
  data tx pkts/bytes/errors:  19 / 575 / 0
  data rx pkts/bytes/errors:  18 / 404 / 0
  data rx oos pkts/discards:  0 / 0

For more details refer to the prol2tp man page.

propppd

Status summary

Like prol2tpd, the propppd daemon is managed by the system’s init subsystem.

root@lns:~# service proppp status
● proppp.service - ProPPP Scalable PPP network protocol daemon
   Loaded: loaded (/lib/systemd/system/proppp.service; disabled; vendor preset:
   Active: active (running) since Thu 2018-11-29 11:45:30 UTC; 7min ago
  Process: 12200 ExecStart=/usr/sbin/propppd $PROPPPD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 12204 (propppd)
    Tasks: 5
   Memory: 1.6M
      CPU: 134ms
   CGroup: /system.slice/proppp.service
           └─12204 /usr/sbin/propppd -d -l /var/log/propppd.log

It is also possible to query propppd directly using the propppctl tool. The propppctl status command shows a status summary:

root@lns:~# propppctl status
ProPPP v2.0.0
  support: support@prol2tp.com
License:
  unlicensed
PPP:
  ppp instance count: 3
  create requests: 3, failures: 0
  destroy requests: 0, failures: 0
RADIUS:
  access requests: 3, accepts: 3, rejects: 0, challenges: 0
  accounting starts: 3, stops: 0, updates: 21, responses: 24
  disconnect requests: 0, responses: 0
  retransmits: 0, timeouts: 0
  auth requests in progress: 0, accounting requests in progress: 0
Events:
  created: 3, destroyed: 0, up: 3, down: 0
Config:
  config updates: 1, failures: 0

PPP sessions

To obtain a list of PPP sessions, use the propppctl list command.

root@lns:~# propppctl list
Name             Interface          Duration    State User
session-1        ppp0                0:08:07       UP u1@example.com
session-2        ppp1                0:08:07       UP u2@example.com
session-3        ppp2                0:08:07       UP u3@example.com

It is possible to filter the list to show only PPP instances that are either up or down.

root@lns:~# propppctl list down
Name             Interface          Duration    State User

root@lns:~# propppctl list up
Name             Interface          Duration    State User
session-1        ppp0                0:08:21       UP u1@example.com
session-2        ppp1                0:08:21       UP u2@example.com
session-3        ppp2                0:08:21       UP u3@example.com

Details of a session are displayed with the propppctl show command.

root@lns:~# propppctl show session-1
  interface name: ppp0
  created: 2018-11-29 11:56:39
  type: PPPoL2TP
  debug: 7
  connect delay: 1000
  state: RUNNING
  connect time: 8.7 minutes
  link mtu: 1500, peer mru: 1500
  run count: 84
 lcp:
  echo interval: 30, max echo failures: 0
  next echo: 18
  want: pap chap eap asyncmap magic mru pcomp accomp
  got: pap chap asyncmap magic mru pcomp accomp
  allow: chap eap asyncmap magic mru pcomp accomp
  his: asyncmap magic pcomp accomp
  state: OPENED
  timeout: 3
  max confreqs: 10, max termreqs: 2
  retransmits: 10, naks: 0
  naks since last ack: 0
 ccp:
  want: bsd deflate
  got: bsd deflate
  allow: bsd deflate predictor1
  his: bsd deflate
  state: OPENED
  timeout: 3
  max confreqs: 10, max termreqs: 2
  retransmits: 10, naks: 0
  naks since last ack: 0
 ipcp:
  want: negaddr reqaddr
  got: negaddr reqaddr
  allow: negaddr proxyarp
  his: negaddr
  state: OPENED
  timeout: 3
  max confreqs: 10, max termreqs: 2
  retransmits: 10, naks: 0
  naks since last ack: 0
  local ip: 10.5.1.100
  peer ip: 10.5.1.1
 pap:
  auth timeout: 30, retransmit interval: 3
  our state: CLOSED, peer state: CLOSED
 chap:
  timeout: 3, rechallenge time: 0
  local state:  lowerup started done
  transmits: 1
  peer state:  lowerup
 eap:
  local:
  state: Closed
   requests: 0, responses: 0
   timeout: 3, max requests: 10
  peer:
  state: Closed
   requests: 0, responses: 0
   timeout: 20, max requests: 20
 radius:
  status: AUTH_CHAP_ACK
  acct updates: 8
 auth:
  remote name: 'u1@example.com'
  config: local: , peer:
  done: local:  chap, peer:
 pppol2tp:
  protocol version: L2TPv2 (LNS)
  id: 27774/2129
  peer id: 24377/57566

For more details refer to the propppctl man page.

proacd

Status summary

As with prol2tpd and propppd, proacd is managed by the system’s init subsystem.

root@lac~# service proac status
● proac.service - ProL2TP Access Concentrator network protocol daemon
   Loaded: loaded (/lib/systemd/system/proac.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-10-17 19:00:49 UTC; 5min ago
 Main PID: 14851 (proacd)
   CGroup: /system.slice/proac.service
           └─14851 /usr/sbin/proacd -o /var/log/proacd.log

It is also possible to query proacd directly using the proac_info tool. Passing the -s argument displays a summary of system state:

root@lac:~# proac_info -s
Routing:
    Routes created: 6
    Route create failures: 0
    Insufficient license denials: 0
    Routes deleted: 4
    Route delete failures: 0
    Destination open failures: 4
    Destination close failures: 0
    Source close failures: 0
    Routes closed by destination: 0
    Routes closed by source: 2
PPPoE:
    PADI received: 4
    Invalid PADI received: 0
    PADO sent: 4
    PADR received: 4
    Invalid PADR received: 0
    Resent PADR received: 0
    PADS sent: 4
    PADT received: 2
    Invalid PADT received: 0
    PADT sent: 2
L2TP:
    Tunnels opened: 3
    Sessions opened: 2
    Sessions closed: 0
    DNS lookup failures: 0
RADIUS:
    Successful requests: 3
    Failed requests: 0
    DNS lookup failures: 0
    Server timeouts: 0
PPPD:
    Local pppd started: 0
    Local pppd terminated: 0
    Exit codes:
        OK: 0
        Fatal error: 0
        Option error: 0
        No kernel support: 0
        User request: 0
        Connect failed: 0
        Option 'pty' command failed: 0
        Negotiation failed: 0
        Peer failed to authenticate: 0
        Idle timeout: 0
        Connect time exceeded: 0
        Peer dead: 0
        Hangup: 0
        Init failed: 0
        Failed to authenticate with peer: 0
        Other: 0

AC routes

A list of all the routes currently instantiated in proacd can be displayed using proac_info using the -r argument:

root@lac:~# proac_info -r
Route 'r2' 13564:
    Source     : PPPoE interface enp0s8 session 5051
                 service name 'dynamic' (advertised)
                 peer MAC 08:00:27:4E:71:75
    Destination: L2TP tunnel 35352 session 41053
Route 'r1' 33975:
    Source     : PPPoE interface enp0s8 session 15932
                 service name 'static' (advertised)
                 peer MAC 08:00:27:64:4A:2B
    Destination: L2TP tunnel 64947 session 32602

If the system has many instantiated routes, proac_info can select just one of them using either the route name or route ID rather than showing the full list:

root@lac:~# proac_info -r 33975
Route 'r1' 33975:
    Source     : PPPoE interface enp0s8 session 15932
                 service name 'static' (advertised)
                 peer MAC 08:00:27:64:4A:2B
    Destination: L2TP tunnel 64947 session 32602
root@lac:~# proac_info -r r1
Route 'r1' 33975:
    Source     : PPPoE interface enp0s8 session 15932
                 service name 'static' (advertised)
                 peer MAC 08:00:27:64:4A:2B
    Destination: L2TP tunnel 64947 session 32602

For more details refer to the proac_info man page.

You are reading the manual of ProL2TP: enterprise class L2TP software for Linux systems

Learn more about ProL2TP and register for a free trial

Go