Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

clear services l2tp session

 

Syntax

Release Information

Command introduced before Junos OS Release 7.4.

Description

(M10i and M7i routers only) Clear Layer 2 Tunneling Protocol (L2TP) sessions on LNS.

(MX Series routers only) Clear L2TP sessions on LAC and LNS.

Note

On MX Series routers, you cannot issue the clear services l2tp session command in parallel with statistics-related show services l2tp commands from separate terminals. If this clear command is running, then you must press Ctrl+c to make the command run in the background before issuing any of the show commands listed in the following table:

show services l2tp summary statistics

show services l2tp tunnel extensive

show services l2tp tunnel statistics

Options

allClose all L2TP sessions.
Best Practice

The all option is not intended to be used as a means to perform a bulk logout of L2TP subscribers. We recommend that you do not use the all option in a production environment. Instead of clearing all subscribers at once, consider clearing subscribers in smaller group, based on interface, tunnel, or destination end point.

interface interface-nameClear only the L2TP sessions using the specified adaptive services or inline services interface. The interface type depends on the line card as follows:
  • si-fpc/pic/port—MPCs on MX Series routers only. This option is not available for L2TP on M Series routers.

  • sp-fpc/pic/port—AS or Multiservices PICs on M7i, M10i, and M120 routers only. This option is not available for L2TP on MX Series routers.

local-gateway gateway-addressClear only the L2TP sessions associated with the specified local gateway address.
local-gateway-name gateway-nameClear only the L2TP sessions associated with the specified local gateway name.
local-session-id session-id Clear only the L2TP sessions with this identifier for the local endpoint of the L2TP session.
local-tunnel-id tunnel-idClear only the L2TP sessions associated with the specified local tunnel identifier.
peer-gateway gateway-addressClear only the L2TP sessions associated with the peer gateway with the specified address.
peer-gateway-name gateway-nameClear only the L2TP sessions associated with the peer gateway with the specified name.
tunnel-group group-nameClear only the L2TP sessions associated with the specified tunnel group. This option is not available for L2TP LAC on MX Series routers.
user username (M Series routers only) Clear only the L2TP sessions for the specified username.

Required Privilege Level

clear

List of Sample Output

clear services l2tp session

clear services l2tp session interface

Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

clear services l2tp session

user@host> clear services l2tp session 31694

Sample Output

clear services l2tp session interface

user@host> show services l2tp session Tunnel local ID: 17185
user@host> clear services l2tp session interface si-2/0/0
user@host> show services l2tp session Tunnel local ID: 17185