목차

소개

문제

솔루션

IP 조각화

소개

이 문서에서는 ASR(Aggregation Services Router) 5000 Series 플랫폼의 CLI에서 ping을 실행할 때 show port 명령으로 보고되는 바이트 수를 설명합니다.또한 전송된 패킷이 인터페이스에서 구성된 MTU(Maximum Transmission Unit)보다 클 때 프래그멘테이션의 영향을 보여 줍니다.이는 ping과 관련된 사용자 플레인 문제를 해결할 때 또는 섀시를 통과하는 패킷에 대해서도 일반적으로 문제를 해결할 때 사용할 수 있는 좋은 배경 정보입니다.또한 노드에서 ping을 사용하여 실험하는 것은 이 문서에서 설명하는 개념을 확인하는 좋은 방법입니다.

문제

ICMP(Internet Control Message Protocol) 패킷의 크기를 지정할 때 크기는 패킷에 래핑되는 원시 페이로드를 참조합니다.ICMP 헤더(8바이트) 또는 IP 헤더(20바이트)는 포함되지 않습니다. 또한 Wireshark 추적에 표시되지 않는 이더넷 헤더(14바이트 = 대상 MAC(6) + 소스 MAC(6) + 이더넷 프레임 유형(2)), VLAN 태그(4바이트) 및 후행 이더넷 프레임 확인 시퀀스(FCS, 4바이트)도 주목할 만 합니다.

솔루션

show port [npu]에서 출력을 볼 때 | datalink] counters 명령, 적용할 수 있는 수학이 이 예제에 나와 있습니다.정확한 이해를 얻기 위해 색상을 일치시킵니다.이 연습은 결과 출력을 클라우드로 이동하는 다른 트래픽 없이 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 헤더를 포함하지만 소스/대상 MAC, VLAN ID 또는 FSC와 같은 레이어 2 데이터는 포함되지 않는 패킷의 크기가 인터페이스에 대한 "ip mtu" 설정을 준수하기 위해 여러 세그먼트로 분할될 때 발생합니다(기본값 1500).  이 예에서는 MTU가 기본 크기인 1500으로 설정되면 1472 크기의 ICMP 페이로드 전송 시도가 프래그먼트되지 않습니다(1472 + ICMP 헤더(8) + IP 헤더(20) = 1500). 이보다 더 큰 것은 프래그먼트화됩니다.프래그먼트화가 발생하면 포트 npu 및 datalink 카운터에 두 개의 패킷 프래그먼트가 계산되며, 각 해당 크기의 버킷에 하나씩 포함됩니다.500개 패킷의 플러드 ping이 완료되면 1,000개 프래그먼트가 전송됩니다.큰 사이즈는 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

IP 헤더를 포함하는 1500바이트 크기의 Ping은 조각화되지 않은 상태로 전송됩니다.데이터 링크 레이어의 총 크기는 다음과 같습니다(포트를 떠날 때).

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

크기를 1바이트로 늘리면 프래그먼트화(> 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