clear tcp-forwarding connections
Syntax
clear tcp-forwarding connections listening-port listening-port-number listening-address ipv4-listening-address source-address source-ipv4-address source-port source-port-number routing-instance routing-instance-name
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-address | IPv4 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-number | Port 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.
|
source-address source-ipv4-address | Source address of the triggering entity—the remote device or external management system—that appear in the TCP header. |
source-port source-port-number | Source port of the triggering entity—the remote device or external management system—that appear in the TCP header.
|
routing-instance routing-instance-name | Name of the routing instance for the TCP mapping. |
Required Privilege Level
view
Output Fields
When you enter this command, you are not provided feedback on the status of your request.
Sample Output
- clear tcp-forwarding connections
- clear tcp-forwarding connections (Listening Port and Address)
- clear tcp-forwarding connections (Source Address and Port)
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 Listening on: [default:]203.0.113.50:8002 Status: listening Total Bytes Rx: 1230 Tx: 482 Forwarding to: [default:]192.0.0.4:830 Total Bytes Rx: 482 Tx: 1230 Allowed Source Prefixes: 198.51.100.3/32 Connections Max: 1 Active: 1 Source: 198.51.100.3:55002 Listening: connected Bytes Rx: 0 Tx: 0 Forwarding: connected Bytes Rx: 0 Tx: 0 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 Listening on: [default:]203.0.113.50:8020 Status: listening Total Bytes Rx: 292 Tx: 112 Forwarding to: [default:]198.51.100.1:49 Total Bytes Rx: 112 Tx: 292 Allowed Source Prefixes: 192.0.0.1/24 Connections Max: 4 Active: 3 Source: 192.0.0.2:55000 Listening: connected Bytes Rx: 380 Tx: 223 Forwarding: connected Bytes Rx: 223 Tx: 380 Source: 192.0.0.3:55000 Listening: connected Bytes Rx: 855 Tx: 411 Forwarding: connected Bytes Rx: 411 Tx: 855 Source: 192.0.0.4:56022 Listening: connected Bytes 642 Tx: 350 Forwarding: connected Bytes Rx: 350 Tx: 642 user@host> clear tcp-forwarding connections source-address 192.0.0.2 source-port 55000 user@host> show tcp-forwarding status Listening on: [default:]203.0.113.50:8020 Status: listening Total Bytes Rx: 292 Tx: 112 Forwarding to: [default:]198.51.100.1:49 Total Bytes Rx: 112 Tx: 292 Allowed Source Prefixes: 192.0.0.1/24 Connections Max: 4 Active: 2 Source: 192.0.0.3:55000 Listening: connected Bytes Rx: 855 Tx: 411 Forwarding: connected Bytes Rx: 411 Tx: 855 Source: 192.0.0.4:56022 Listening: connected Bytes 642 Tx: 350 Forwarding: connected Bytes Rx: 350 Tx: 642
Release Information
Command introduced in Junos OS Release 18.3R1.