无线 : Cisco ASR 5000 系列

从CLI和分段识别的ASR 5000系列ICMP数据包生成

2016 年 10 月 24 日 - 机器翻译
其他版本: PDFpdf | 英语 (2016 年 4 月 21 日) | 反馈

简介

本文描述show port命令报告的字节数和ping命令,当ping在聚合服务路由器(ASR)时5000系列平台的CLI被执行。它也展示分段的作用,当发送的数据包比在接口的已配置的最大传输单元(MTU)极大时。这是有好的背景信息,当您排除故障用户平面问题与ping甚至一般来说穿过机箱的数据包的时。并且,与ping的实验在节点是一个巨大方式确认在本文解释的概念。

贡献由Dave Damerjian, Cisco TAC工程师。

问题

当您指定互联网控制消息协议(ICMP)数据包的大小时,大小是指获得包裹到数据包的原始有效负载。它不包括ICMP报头(8个字节)或IP报头(20个字节)。并且知名之士是以太网报头(14个字节=目的地MAC (6) +源MAC (6) +以太网帧类型(2)), VLAN标记(4个字节)和落后的以太网帧检查顺序(FCS, 4个字节),以后哪些不将显示在Wireshark trace。

解决方案

当您查看从show port [npu的输出|数据链接]计数器命令,可以应用的算术在本例中显示。匹配颜色为了获取直接的了解。当允许将发送的ping,不用其他流量覆盖产生的输出,此练习在与一点的端口工作对没有流量。

有效负载大小:(也是此命令的默认)的56个字节

有效负载+ ICMP报头:64

有效负载+ ICMP报头+ IP报头:84

有效负载+ ICMP报头+ IP报头+以太网报头+ VLAN标记: 102

有效负载(56) + ICMP报头(8) + IP报头(20) +以太网报头(14) + VLAN标记(4) + FCS (4) : 106

  context Ctx
    interface 21/1 broadcast
      ip address 10.193.82.118 255.255.255.0
      ip mtu 1500
    #exit
 
  port ethernet 21/1
    no shutdown
    vlan 30
      no shutdown
      bind interface 21/1 Ctx
    #exit
  #exit
 
[Ctx]ASR5000> show ip arp

Flags codes:
I - Incomplete, R - Reachable, M - Permanent, S - Stale,
D - Delay,      P - Probe,     F - Failed

Address         Link Type Link Address      Flags  Mask            Interface
10.193.82.1     ether     00:00:0C:07:AC:1E R                      21/1

 
[Ctx]ASR5000> show ip route
 
"*" indicates the Best or Used route.  S indicates Stale.

 Destination         Nexthop          Protocol   Prec Cost Interface
*0.0.0.0/0           10.193.82.1      static     1    0    21/1
 
[Ctx]ASR5000> clear port data counters 21/1
Saturday April 12 14:06:21 UTC 2014

[Ctx]ASR5000> clear port npu count 21/1
Saturday April 12 14:06:21 UTC 2014

[Ctx]ASR5000> ping 10.193.82.1 count 1 size 56
Saturday April 12 14:06:21 UTC 2014
PING 10.193.82.1 (10.193.82.1) 56(84) bytes of data.
64 bytes from 10.193.82.1: icmp_seq=1 ttl=255 time=0.957 ms

--- 10.193.82.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.957/0.957/0.957/0.000 ms
 
Note that the datalink counters include the FCS bytes, while both datalink and npu
counters include the ethernet frame and vlan tags.

[Ctx]ASR5000> show port datalink count 21/1
Saturday April 12 14:06:25 UTC 2014
Counters for port 21/1:
Line Card  Gigabit Ethernet Port
Rx Counter                        Data  |  Tx Counter                       Data
-----------------------  -------------- + -----------------------  -------------
RX Unicast frames                   112 | TX Unicast frames                    1
RX Multicast frames                   3 | TX Multicast frames                  0
RX Broadcast frames                   9 | TX Broadcast frames                  0
RX Size   64 frames                   0 | TX Size   64 frames                  0
RX Size   65 ..  127 fr              14 | TX Size   65 ..  127 fr              1
RX Size  128 ..  255 fr               0 | TX Size  128 ..  255 fr              0
RX Size  256 ..  511 fr             110 | TX Size  256 ..  511 fr              0
RX Size  512 .. 1023 fr               0 | TX Size  512 .. 1023 fr              0
RX Size 1024 .. 1518 fr               0 | TX Size 1024 .. 1518 fr              0
RX Size > 1518 frames                 0 | TX Size > 1518 frames                0
RX Bytes OK                       43966 | TX Bytes OK                        106
RX Bytes BAD                          0 | TX Bytes BAD                         0
RX SHORT OK                           0 | TX PAUSE                             0
RX SHORT CRC                          0 | TX ERR                               0
RX OVF                                0 |
RX NORM CRC                           0 |
RX LONG OK                            0 |
RX LONG CRC                           0 |
RX PAUSE                              0 |
RX FALS CRS                           0 |
RX SYM ERR                            0 |
-----------------------  -------------- + -----------------------  -------------

[Ctx]ASR5000> show port npu count 21/1
Saturday April 12 14:06:25 UTC 2014
Counters for port 21/1
Counter                  Rx Frames       Rx Bytes      Tx Frames        Tx Bytes
-------------------- ------------- --------------- ------------- ---------------
Unicast                          1             102             1             102
Multicast                        3             202             0               0
Broadcast                        8             512             0               0
IPv4 unicast                     1             102             1             102
IPv4 non-unicast                 1              66             0               0
IPv6 unicast                     0               0             0               0
IPv6 non-unicast                 0               0             0               0
Fragments received               0               0           n/a             n/a
Packets reassembled              0               0           n/a             n/a
Fragments to kernel              0               0           n/a             n/a
HW error                         0               0           n/a             n/a
Port non-operational             0               0             0               0
SRC MAC is multicast             0               0           n/a             n/a
Unknown VLAN tag                 0               0           n/a             n/a
Other protocols                  2             136           n/a             n/a
Not IPv4                         0               0           n/a             n/a
Bad IPv4 header                  0               0           n/a             n/a
IPv4 MRU exceeded                0               0           n/a             n/a
TCP tiny fragment                0               0             0               0
No ACL match                     0               0             0               0
Filtered by ACL                  0               0             0               0
TTL expired                      0               0           n/a             n/a
Flow lookup twice                0               0           n/a             n/a
Unknown IPv4 class               0               0           n/a             n/a
Too short: IP                    0               0           n/a             n/a
Too short: ICMP                  0               0             0               0
Too short: IGMP                  0               0             0               0
Too short: TCP                   0               0             0               0
Too short: UDP                   0               0             0               0
Too short: IPIP                  0               0           n/a             n/a
Too short: GRE                   0               0           n/a             n/a
Too short: GRE key               0               0           n/a             n/a
Don't frag discards            n/a             n/a             0               0
Fragment packets               n/a             n/a             0               0
Fragment fragments             n/a             n/a             0               0
IPv4VlanMap dropped              0               0           n/a             n/a
IPSec NATT keep alive            0               0           n/a             n/a
MPLS Flow not found              0               0           n/a             n/a
MPLS unicast                     0               0             0               0
Size < 17                        0               0             0               0
Size   17 ..   64                8             512             0               0
Size   65 ..  127                4             304             1             102
Size  128 ..  255                0               0             0               0
Size  256 ..  511                0               0             0               0
Size  512 .. 1023                0               0             0               0
Size 1024 .. 2047                0               0             0               0
Size 2048 .. 4095                0               0             0               0
Size 4096 .. 4500                0               0             0               0
Size > 4500                      0               0             0               0

IP 分段

IP数据包分段发生,当数据包的大小,包括IP报头,但是没有任何Layer2数据例如来源/目的地MAC、VLAN ID或者FSC,分成多个网段为了遵照接口的(默认1500) “ip mtu”设置。 在本例中, MTU设置为默认容量1500, 1472尝试的ICMP有效载荷大小发送大于那将被分段不会被分段(1472 + ICMP报头(8) + IP报头(20) = 1500),但是的任何。当分段发生时,有在端口npu和数据链接计数器计数的两个信息包碎片,一个在每个适当大小的桶。使用500数据包充斥ping的完成, 1000个片段发送;500大号的和500小型的。此示例在ASR 5500运行了(与在ASR 5000)的输出示例比较,但是在两平台类似运作。

[ECS]ASR500> show ip interface 
Thursday July 16 00:31:39 UTC 2015
Intf Name: 5/29-ECS
Intf Type: Broadcast
Description:
VRF: None
IP State: UP (Bound to 5/29 vlan id 31, 802.1P prior 0, ifIndex 85786626)
IP Address: 10.213.137.105 Subnet Mask: 255.255.255.0
Bcast Address: 10.213.137.255 MTU: 1500
Resoln Type: ARP ARP timeout: 60 secs
L3 monitor LC-port switchover: Disabled
Number of Secondary Addresses: 0

port ethernet 5/29
no shutdown
vlan 31
no shutdown
bind interface 5/29-ECS ECS
#exit
#exit

首先,请设立计数器的一个基准。指定NPU计数器的VLAN ID (为了确认所有ping有被添附的VLAN ID)。

[ECS]ASR5500> clear port datalink counters 5/29
Friday July 17 23:53:46 UTC 2015

[ECS]ASR5500> show port datalink counters 5/29
Friday July 17 23:53:46 UTC 2015
rCounters for port 5/29:
Line Card 10 Gigabit Ethernet Port
Rx Counter                        Data  |  Tx Counter                       Data
-----------------------  -------------- + -----------------------  -------------
RX Bytes                            406 | TX Bytes                             0
RX Unicast frames                     0 | TX Unicast frames                    0
RX Multicast frames                   4 | TX Multicast frames                  0
RX Broadcast frames                   1 | TX Broadcast frames                  0
RX Size 64 frames                     0 | TX Size 64 frames                    0
RX Size   65 ..  127 fr               5 | TX Size   65 ..  127 fr              0
RX Size  128 ..  255 fr               0 | TX Size  128 ..  255 fr              0
RX Size  256 ..  511 fr               0 | TX Size  256 ..  511 fr              0
RX Size  512 .. 1023 fr               0 | TX Size  512 .. 1023 fr              0
RX Size 1024 .. 1518 fr               0 | TX Size 1024 .. 1518 fr              0
RX Size 1519 .. 1522 fr               0 | TX Size 1519 .. 1522 fr              0
-----------------------  -------------- + -----------------------  -------------

[ECS]ASR5500> clear port npu counters 5/29 vlan 31
Friday July 17 23:53:47 UTC 2015

[ECS]ASR5500> show port npu counters 5/29 vlan 31
Friday July 17 23:53:47 UTC 2015
Counters for port 5/29 vlan id 31:

Counter                  Rx Frames       Rx Bytes      Tx Frames        Tx Bytes
-------------------- ------------- --------------- ------------- ---------------
Unicast                          0               0             0               0
Multicast                        3             196             0               0
Broadcast                        1              64             0               0
IPv4 unicast                     0               0             0               0
IPv4 non-unicast                 3             196             0               0
IPv6 unicast                     0               0             0               0
IPv6 non-unicast                 0               0             0               0
Fragments received               0               0           n/a             n/a
Packets reassembled              0               0           n/a             n/a
Fragments to kernel              0               0           n/a             n/a
HW error                         0               0           n/a             n/a
Port non-operational           539           38520             0               0
SRC MAC is multicast             0               0           n/a             n/a
Unknown VLAN tag                 0               0           n/a             n/a
Other protocols                  2             128           n/a             n/a

ping incude IP报头被派出未成碎片的大小1500字节。在数据链路层的总大小(因为离开端口)是:

1472 (有效负载) + 8 (ICMP报头) + 20 (IP报头) + 14 (MAC源/目的) + 4 (VLAN ID) + 4 (FSC) = 1522

[ECS]ASR5500> ping  10.213.137.1 size 1472 flood
Friday July 17 23:53:48 UTC 2015
PING 10.213.137.1 (10.213.137.1) 1472(1500) bytes of data.
 
--- 10.213.137.1 ping statistics ---
500 packets transmitted, 500 received, 0% packet loss, time 422ms
rtt min/avg/max/mdev = 0.405/0.800/0.994/0.143 ms, ipg/ewma 0.845/0.802 ms

[ECS]ASR5500> show port datalink counters 5/29
Friday July 17 23:53:54 UTC 2015
Counters for port 5/29:
Line Card 10 Gigabit Ethernet Port
Rx Counter                        Data  |  Tx Counter                       Data
-----------------------  -------------- + -----------------------  -------------
RX Bytes                         771008 | TX Bytes                        765656
RX Unicast frames                   536 | TX Unicast frames                  524
RX Multicast frames                  45 | TX Multicast frames                  0
RX Broadcast frames                  20 | TX Broadcast frames                  0
RX Size 64 frames                     0 | TX Size 64 frames                    0
RX Size   65 ..  127 fr              75 | TX Size   65 ..  127 fr              0
RX Size  128 ..  255 fr              24 | TX Size  128 ..  255 fr             18
RX Size  256 ..  511 fr               2 | TX Size  256 ..  511 fr              6
RX Size  512 .. 1023 fr               0 | TX Size  512 .. 1023 fr              0
RX Size 1024 .. 1518 fr               0 | TX Size 1024 .. 1518 fr              0
RX Size 1519 .. 1522 fr             500 | TX Size 1519 .. 1522 fr            500
RX OverSize frames                    0 | TX OverSize frames                   0
RX UnderSize frames                   0 | TX UnderSize frames                  0
RX ExceedMaxSize frames               0
RX Fragment frames                    0 | TX Fragment frames                   0
RX Jabber frames                      0 | TX Jabber frames                     0
RX Control frames                     0 | TX Control frames                    0
RX Pause frames                       0 | TX Pause frames                      0
RX FCS Error frames                   0 | TX FCS Error frames                  0
RX Length Error frames                0 | TX Length Error frames               0
RX Code Error frames                  0
RX ExMaxSize Err frames               0
-----------------------  -------------- + -----------------------  -------------

[ECS]ASR5500> show port npu counters 5/29 vlan 31
Friday July 17 23:53:54 UTC 2015
Counters for port 5/29 vlan id 31:
Counter                  Rx Frames       Rx Bytes      Tx Frames        Tx Bytes
-------------------- ------------- --------------- ------------- ---------------
Unicast                        520          761900           520          762800
Multicast                       38            2811             0               0
Broadcast                       18            1408             0               0
IPv4 unicast                   538          763308           520          762800
IPv4 non-unicast                30            2027             0               0
IPv6 unicast                     0               0             0               0
IPv6 non-unicast                 8             784             0               0
Fragments received               0               0           n/a             n/a
Packets reassembled              0               0           n/a             n/a
Fragments to kernel              0               0           n/a             n/a
HW error                         0               0           n/a             n/a
Port non-operational          9482          681251             0               0
SRC MAC is multicast             0               0           n/a             n/a
Unknown VLAN tag                 0               0           n/a             n/a
Other protocols                 20            1280           n/a             n/a
Not IPv4                         8             784           n/a             n/a
...
Size    0 ..   63                0               0             0               0
Size   64 ..  127               70            5193             0               0
Size  128 ..  255               24            3408            18            2580
Size  256 ..  511                0               0             6            1980
Size  512 .. 1023                0               0             0               0
Size 1024 .. 2047              500          759000           500          759000
Size 2048 .. 4095                0               0             0               0
Size 4096 .. 8191                0               0             0               0
Size >= 8192                     0               0             0               0

在大小的一增加由一个字节导致分段(> 1500),因此500数据包被发送作为两套500数据包。在本例中ping发生故障的注释。这比已配置的MTU很可能归结于的网络能处理大小极大,但是那不是此条款焦点。

[ECS]ASR5500> ping 10.213.137.1 size 1473 flood
Friday July 17 23:53:55 UTC 2015
PING 10.213.137.1 (10.213.137.1) 1473(1501) bytes of data.
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
....................^C
--- 10.213.137.1 ping statistics ---
500 packets transmitted, 0 received, 100% packet loss, time 7124ms
, ipg/ewma 14.277/0.000 ms

[ECS]ASR5500> show port datalink counters 5/29
Friday July 17 23:54:05 UTC 2015
Counters for port 5/29:
Line Card 10 Gigabit Ethernet Port
Rx Counter Data | Tx Counter Data
----------------------- -------------- + ----------------------- -------------
RX Bytes 786615 | TX Bytes 1566628
RX Unicast frames 601 | TX Unicast frames 1567
RX Multicast frames 111 | TX Multicast frames 0
RX Broadcast frames 47 | TX Broadcast frames 0
RX Size 64 frames 0 | TX Size 64 frames 501
RX Size 65 .. 127 fr 190 | TX Size 65 .. 127 fr 2
RX Size 128 .. 255 fr 64 | TX Size 128 .. 255 fr 48
RX Size 256 .. 511 fr 5 | TX Size 256 .. 511 fr 16
RX Size 512 .. 1023 fr 0 | TX Size 512 .. 1023 fr 0
RX Size 1024 .. 1518 fr 0 | TX Size 1024 .. 1518 fr 0
RX Size 1519 .. 1522 fr 500 | TX Size 1519 .. 1522 fr 1000
RX ExceedMaxSize frames               0
RX Fragment frames                    0 | TX Fragment frames                   0
RX Jabber frames                      0 | TX Jabber frames                     0
RX Control frames                     0 | TX Control frames                    0
RX Pause frames                       0 | TX Pause frames                      0
RX FCS Error frames                   0 | TX FCS Error frames                  0
RX Length Error frames                0 | TX Length Error frames               0
RX Code Error frames                  0
RX ExMaxSize Err frames               0
----------------------- -------------- + ----------------------- -------------

[ECS]ASR5500> show port npu counters 5/29 vlan 31
Friday July 17 23:54:06 UTC 2015

Counters for port 5/29 vlan id 31:
Counter Rx Frames Rx Bytes Tx Frames Tx Bytes
-------------------- ------------- --------------- ------------- ---------------
Unicast 554 766984 1562 1549040
Multicast 94 6962 0 0
Broadcast 53 4294 0 0
IPv4 unicast 607 771278 1562 1549040
IPv4 non-unicast 73 4904 0 0
IPv6 unicast 0 0 0 0
IPv6 non-unicast 21 2058 0 0
Fragments received 0 0 n/a n/a
Packets reassembled 0 0 n/a n/a
Fragments to kernel 0 0 n/a n/a
HW error 0 0 n/a n/a
Port non-operational 25146 1805666 0 0
SRC MAC is multicast 0 0 n/a n/a
Unknown VLAN tag 0 0 n/a n/a
Other protocols 68 4742 n/a n/a
Not IPv4 21 2058 n/a n/a
...
Size 0 .. 63 0 0 501 19546
Size 64 .. 127 188 14154 2 140
Size 128 .. 255 60 8520 45 6450
Size 256 .. 511 0 0 15 4950
Size 512 .. 1023 0 0 0 0
Size 1024 .. 2047 500 759000 1000 1518000
Size 2048 .. 4095 0 0 0 0
Size 4096 .. 8191 0 0 0 0
Size >= 8192 0 0 0 0


Document ID: 119210