L2TP configuration command directory

show l2tp

clear l2tp

debug l2tp

show l2tp

Showing the channel of 12tp and statistic information of sessions.

   show l2tp [tunnel | session]

parameter:

tunnel    Showing statistic information of channel

session   Showing statistic information of sessions ¡¡

Command mode:

Non-user mode¡¡

Explanation:

Showing the existing channel and the related statistic information of the sessions.

Example:

37DE#show l2tp tunnel

L2TP Tunnel Information Total tunnels 1 sessions 1

 

LocID  RemID  Remote Name      State  Remote Address   Port   Sessions

2      27204  cisco26          Est    192.168.20.156   1701   1     

The first line is the number of the tunnels and the sessions.

Area

Description

LocID

Local ID of the channel

RemID

Remote ID of the channel

Remote Name

Name of remote channel of the channel

State

Current channel status

Remote Address

Remote IP address of the channel

Port

Remote port number of the channel

sessions

The number of the session contained in the channel.

 

clear l2tp

At the time of clearing the tunnel, the tunnel of the designated tunnel ID is cleared (all the sessions under the tunnel will also be cleared.). At the time of clearing session, the session of the designated session ID under the tunnel of the designated tunnel ID is cleared.

clear l2tp [tunnel tunnelID tunnelID-number | session tunnelID tunnelID-number sessionID sessionID-number]

   

parameter:

tunnel     Clearing the channel

session     Clearing the session

¡¡

Command mode:

Supervisor mode

Explanation:

   Clearing the channel of the designated tunnel ID or clearing the session of the designated session ID under the designated tunnel ID channel. The numeric area of tunnel ID and session ID is <1-65535>.¡¡

Example:

Observing the existed channel and session before clearing (including a channel and a session)

37DE#show l2tp tunnel

L2TP Tunnel Information Total tunnels 1 sessions 1

 

LocID  RemID  Remote Name      State  Remote Address   Port   Sessions

2      14914  cisco26          Est    192.168.20.156   1701   1     

 

37DE#show l2tp session

L2TP Session Information Total tunnels 1 sessions 1

 

LocID  RemID  TunnelID Intf       Username             State

1      3391   2        vn1        (null)               Est 

Clearing session 1 in channel 2.

37DE#clear l2tp session tunnelID 2 sessionID 1

Observing the remaining channel and session after clearing. The session has been cleared and the channels still exists.

37DE#show l2tp tunnel

L2TP Tunnel Information Total tunnels 1 sessions 0

 

LocID  RemID  Remote Name      State  Remote Address   Port   Sessions

2      14914  cisco26          Est    192.168.20.156   1701   0     

 

37DE#show l2tp session

L2TP Session Information Total tunnels 1 sessions 0

 

debug l2tp

The abnormal operation of the module or error occurrence at the time of printing or the erroneous information; printing the event information when the module operation triggers the event, printing the content of the data packet received or sent by the module.

(no) debug l2tp [error | event | packets [control-packets | data-packets | detail]]

    

The command ¡°no debug l2tp¡± is used for stopping the display of information   

parameter:

Error

Showing the abnormity of l2tp module operation

Event

Showing event triggering information of l2tp module.

Packets

Showing the content of the data packet received and sent by l2tp module (including control packet and data packet.

     

Sub-command parameter of packets:

control-packets

Showing the content of the control packet received and sent by L2TP module.

data_packets 

Showing the content of the data packet received and sent by L2TP module.

Detail

Opening the switch of printing the detailed content of the packet received by the module.

 

Note: Executing the command:

debug l2tp packets

equaling to execute the two commands below:

debug l2tp packets control-packets

debug l2tp packets data-packets

Executing the command:

no debug l2tp packets

Equaling to execute the two commands below:

no debug l2tp packets control-packets

no debug l2tp packets data-packets

The command ¡°debug l2tp packets detail¡± is only a switch. Opening the ¡°debug¡± along is not able to print the content of the data packet. If the command ¡°debug l2tp packets control-packets¡± is configured simultaneously, the detailed information of the control packet will be printed. Similarly, if the command ¡°debug l2tp packets data-packets¡± is configured simultaneously, the detailed information of the data packet will be printed. If the ¡°debug¡± is not configured, only the summary information of debug control packet and data packet will be printed.

¡¡

Command mode:

Supervisor mode

¡¡

Explanation:

   After l2tp debug information is opened, the erroneous information of l2tp module, event triggering information and the content of the data packet received and sent can be exported to help the user diagnose l2tp trouble.¡¡

Example:

Configuration Command:

37DE#debug l2tp packets control-packets

37DE#debug l2tp packets detail

   Print Information:

2003-1-14 11:19:23

L2TP TX -> ctrl packet: flg TLS,ver 2,len 55,TunlID 0,SesnID 0,Ns 0,Nr 0 :SCCRQ

2003-1-14 11:19:23

L2TP Control Packet Header :

C8 02 00 37 00 00 00 00 00 00 00 00               ...7........

2003-1-14 11:19:23

L2TP avp Message Type :

80 08 00 00 00 00 00 01                           ........

2003-1-14 11:19:24

L2TP avp Protocol Version :

80 08 00 00 00 02 01 00                           ........

2003-1-14 11:19:24

L2TP avp Framing Capabilities :

80 0A 00 00 00 03 00 00 00 00                     ..........

2003-1-14 11:19:24

L2TP avp Assigned Tunnel ID :

80 08 00 00 00 09 00 02                           ........

2003-1-14 11:19:24

L2TP avp Host name :

80 09 00 00 00 07 6C 61 63                        ......lac

When the module receives SCCRQ control packet, it divides the packet into L2TP header and some AVPs and shows the specific content of each AVP. (If the command ¡°debug l2tp packets detail¡± is not configured, the content of the packet will not be divided).

Area

Description

L2TP

Name of protocol

TX ->

Direction of packet transmission (it means outward transmission here) .

ctrl packet

Packet type (It is classified into control packet and data packet)

flg

The flags contained in L2TP header.

ver

Protocol version of L2T pprotocol

len

Length of the whole packet

TunlID

The channel ID number contained in L2TP header.

SesnID

The session ID number contained in L2TP header.

Ns

Sequence number of sending the channel

Nr

Sequence number of receiving the channel

SCCRQ

Type of the control packet

L2TP Control Packet Header:

Content of L2TP header of the control packet.

L2TP avp

AVP contained in the control packet (AVP type and content followed)

 

The following is the event information of l2tp negotiation process.

37DE#debug l2tp event

2003-1-14 10:58:51 L2TP: Tunl 6 be created.

2003-1-14 10:58:51 Tunl 6 L2TP: status changed into IDLE

2003-1-14 10:58:51 Tunl 6 L2TP: Sesn 1 be created.

2003-1-14 10:58:51 Tunl/Sesn 6/1 L2TP: status changed into IDLE

2003-1-14 10:58:51 Tunl 6 L2TP: TX -> SCCRQ to  Tunl 0

 

2003-1-14 10:58:51 Tunl 6 L2TP: status changed into WAIT REPLY

2003-1-14 10:58:51 Tunl 6 L2TP: RX <- SCCRP from cisco26 Tunl 12871

 

2003-1-14 10:58:51 Tunl 6 L2TP: TX -> SCCCN to cisco26 Tunl 12871

 

2003-1-14 10:58:51 Tunl 6 L2TP: status changed into ESTABLISHED

2003-1-14 10:58:51 Tunl/Sesn 6/1 L2TP: TX -> ICRQ to cisco26 Tunl/Sesn 12871/0

 

2003-1-14 10:58:51 Tunl/Sesn 6/1 L2TP: status changed into WAIT REPLY

2003-1-14 10:58:51 Tunl 6 L2TP: RX <- ZLB from cisco26 Tunl 12871

 

2003-1-14 10:58:51 Tunl/Sesn 6/1 L2TP: RX <- ICRP from cisco26 Tunl/Sesn 12871/3387

 

2003-1-14 10:58:51 Tunl/Sesn 6/1 L2TP: TX -> ICCN to cisco26 Tunl/Sesn 12871/3387

 

2003-1-14 10:58:51 Tunl/Sesn 6/1 L2TP: status changed into ESTABLISHED

2003-1-14 10:58:51 Line on Interface Virtual-tunnel1, changed state to up

2003-1-14 10:58:51 Tunl 6 L2TP: RX <- ZLB from cisco26 Tunl 12871

Area

Description

Tunl/Sesn

Local channel and ID number of the session (if the control packet of the channel is sent, there will be only an ID number of the channel. The same below.).

L2TP

Name of protocol

TX ->

Direction of packet transmission (it means outward transmission here) .

ICCN

Type of control packet

Cisco26

Name of remote channel

Tunl/Sesn

Remote channel and ID number of the session.

  ¡¡