dis interface 加管道符 匹配drop 关键字有信息显示,不加管道符却没有drop关键字,这是咋回事
<H3C>dis interface | include drop
Input: 0 packets, 0 bytes, 0 drops
Output: 0 packets, 0 bytes, 0 drops
Input: 0 packets, 0 bytes, 0 drops
Output: 0 packets, 0 bytes, 0 drops
Input: 0 packets, 0 bytes, 0 drops
Output: 0 packets, 0 bytes, 0 drops
<H3C>dis interface FortyGigE1/0/53 Current state: DOWN Line protocol state: DOWN IP packet frame type: Ethernet II, hardware address: 60e8-d851-0100 Description: FortyGigE1/0/53 Interface Bandwidth: 40000000 kbps Loopback is not set 40Gbps-speed mode, unknown-duplex mode Link speed type is force link, link duplex type is autonegotiation Flow-control is not enabled Maximum frame length: 9216 Allow jumbo frames to pass Broadcast max-ratio: 100% Multicast max-ratio: 100% Unicast max-ratio: 100% PVID: 1 MDI type: Automdix Port link-type: Access Tagged VLANs: None Untagged VLANs: 1 Port priority: 2 Last link flapping: Never Last clearing of counters: Never Current system time:2023-08-17 10:28:49 Last time when physical state changed to up:- Last time when physical state changed to down:2023-08-17 09:44:24 Peak input rate: 0 bytes/sec, at 00-00-00 00:00:00 Peak output rate: 0 bytes/sec, at 00-00-00 00:00:00 Last 300 second input: 0 packets/sec 0 bytes/sec 0% Last 300 second output: 0 packets/sec 0 bytes/sec 0% Input (total): 0 packets, 0 bytes 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses Input (normal): 0 packets, 0 bytes 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses Input: 0 input errors, 0 runts, 0 giants, 0 throttles 0 CRC, 0 frame, 0 overruns, 0 aborts 0 ignored, 0 parity errors Output (total): 0 packets, 0 bytes 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses Output (normal): 0 packets, 0 bytes 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses Output: 0 output errors, 0 underruns, 0 buffer failures 0 aborts, 0 deferred, 0 collisions, 0 late collisions 0 lost carrier, 0 no carrier
(0)
最佳答案
这个问题可能是由于管道符号 "|" 的使用而导致的。管道符号可以将命令的输出作为输入传递给下一个命令。例如,你使用命令 "dis interface" 来查看接口的状态,但是这个命令的输出信息非常多,包括很多你不关心的信息。而加上管道符号 "|", 后面跟上 "include drop",意思是只显示包含关键字 "drop" 的内容。
所以,当你使用命令 "dis interface | include drop" 时,只有那些包含 "drop" 关键字的输出信息才会被显示出来,因此你看到的是与 "drop" 相关的信息。而当你不加管道符号,仅使用 "dis interface" 命令时,所有的接口信息都会被列出,而 "drop"关键字并不在其中,所以没有任何输出提示。
(0)
dis interface 输出的信息中无drop,而加完管道符匹配次此关键字怎么会有信息呢
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
dis interface 输出的信息中无drop,而加完管道符匹配次此关键字怎么会有信息呢