clear tcp-forwarding connections
语法
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
描述
清除所有 TCP 连接、与特定侦听端口/侦听地址组合相关联的所有连接,或由特定源地址/源端口组合表示的单一连接对。对于任一组合,您都可选择指定路由实例。如果不指定路由实例,则假设默认路由实例。此命令允许您断开行为不当的 TCP 端口转发连接。
选项
侦听地址 ipv4-listening-address | 作为侦听端口/侦听地址组合一部分的 IPv4 地址。侦听地址是 BNG 上的一个地址,外部管理系统或远程设备在尝试在侦听端口上触发连接时必须使用该地址。您还必须指定侦听端口。 |
侦听端口 port-number | 作为侦听端口/侦听地址组合一部分的端口号。侦听端口是 BNG 监控的外部管理系统或远程设备触发的连接。
|
源地址 source-ipv4-address | 触发实体(远程设备或外部管理系统)的源地址,显示在 TCP 报头中。 |
源端口 source-port-number | 触发实体(远程设备或外部管理系统)的源端口,显示在 TCP 报头中。
|
路由实例 routing-instance-name | TCP 映射的路由实例名称。 |
所需的权限级别
视图
输出字段
输入此命令时,不会提供有关请求状态的反馈。
示例输出
清除 tcp 转发连接
user@host> clear tcp-forwarding connections
清除 tcp 转发连接(侦听端口和地址)
在清除连接之前和之后,以下示例输出显示特定侦听端口/地址组合的 TCP 连接状态。
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
清除 tcp 转发连接(源地址和端口)
以下示例输出显示连接清除之前和之后 TCP 连接状态。
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
发布信息
在更新版本Junos OS引入18.3R1。