Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

clear tcp-forwarding connections

 

Syntax

Release Information

Command introduced in Junos OS Release 18.3R1 on MX Series routers.

Description

Clear all TCP connections, all connections associated with a specific listening port/listening address combination, or a single connection pair represented by a specific source address/source port combination. For either combination, you can optionally specify a routing instance. If you do not specify a routing instance, the default routing instance is assumed. This command enables you to disconnect TCP port forwarding connections that are not behaving properly.

Options

listening-address ipv4-listening-addressIPv4 address that is part of a listening port/listening address combination. The listening address is one on the BNG that external management systems or remote devices must use when attempting to trigger connections on the listening port. You must also specify a listening port.
listening-port port-numberPort number that is part of a listening port/listening address combination. The listening port is one that the BNG monitors for connections to be triggered by external management systems or remote devices.

Range: 8000 through 8031

source-address source-ipv4-addressSource address of the triggering entity—the remote device or external management system—that appear in the TCP header.
source-port source-port-numberSource port of the triggering entity—the remote device or external management system—that appear in the TCP header.

Range: 1 through 65,535

routing-instance routing-instance-nameName of the routing instance for the TCP mapping.

Required Privilege Level

view

List of Sample Output

clear tcp-forwarding connections

clear tcp-forwarding connections (Listening Port and Address)

clear tcp-forwarding connections (Source Address and Port)

Output Fields

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

Sample Output

clear tcp-forwarding connections

user@host> clear tcp-forwarding connections

clear tcp-forwarding connections (Listening Port and Address)

The following sample output displays the TCP connection status for a specific listening port/address combination before and after the connection is cleared.

user@host> show tcp-forwarding status listening-port 203.0.113.50 listening-address 8002
user@host> clear tcp-forwarding connections listening-port 8002 listening-address 203.0.113.50
user@host> show tcp-forwarding status listening-port 8002 listening-address 203.0.113.50

clear tcp-forwarding connections (Source Address and Port)

The following sample output displays the TCP connection status before and after the connection is cleared.

user@host> show tcp-forwarding status
user@host> clear tcp-forwarding connections source-address 192.0.0.2 source-port 55000user@host> show tcp-forwarding status