Description

This article explains the meaning of the "igp.v4_total_len" trapcode that may be seen on PE chip based linecards (PTX and QFX) and details one example scenario where this trapcode might be generated.

Symptoms

The following trapcode will be generated (counters will increment) when the FPC shell command show pechip trapstats is executed.

FPC0(router-name)# show pechip trapstats                                                                       

DEV        TRAPCODE                                           count                 rate
=========================================================================================

3 (  12) dlu.ucode.pkt_to_cpu                                245                   94
3 (  53) igp.v4_total_len                                    459                  100 

Solution

These traps are generated if the IPv4 sanity check on an incoming packet fails. Such packets are dropped since they failed to pass the IPv4 header sanity checks.

This trapcode can be dumped and decoding the packet may give an idea why the sanity check for the IPv4 header failed. Identifying the reason for such invalid packets will determine the next steps for troubleshooting and resolving the problem.

An example of a problematic packet that led to the generation of the "igp.v4_total_len" trapcode when it arrived on the router is given below. In the following packet, the "Total Length" value in the IPv4 header is 234B, which is greater than the actual packet size of 97B. Since the IPv4 length is greater than the actual packet length, this is treated as an invalid IPv4 and hence the packet is dropped, followed by the generation of the "igp.v4_total_len" trap.

Frame 1: 97 bytes on wire (776 bits)
  Encapsulation type: Ethernet (1)
  Arrival Time: Nov 23, 2021 11:35:21.000000000 CET
  Time shift for this packet: 0.000000000 seconds
  Epoch Time: 1637663721.000000000 seconds
  Time delta from previous captured frame: 0.000000000 seconds
  Time delta from previous displayed frame: 0.000000000 seconds
  Time since reference or first frame: 0.000000000 seconds
  Frame Number: 1
  Frame Length: 97 bytes (776 bits)
  Capture Length: 97 bytes (776 bits)
  Frame is marked: False
  Frame is ignored: False
  Protocols in frame: eth:ethertype:mpls:ip:udp:mpls:ip:tcp:tls
Ethernet II
  Destination: VMware_0f:71:a3 (00:0c:29:0f:71:a3)
    Address: VMware_0f:71:a3 (00:0c:29:0f:71:a3)
    .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
  Source: VMware_6a:94:c5 (00:0c:29:6a:94:c5)
    Address: VMware_6a:94:c5 (00:0c:29:6a:94:c5)
    .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
  Type: MPLS label switched packet (0x8847)
MultiProtocol Label Switching Header
  0000 0000 0000 0001 0000 .... .... .... = MPLS Label: 16
  .... .... .... .... .... 000. .... .... = MPLS Experimental Bits: 0
  .... .... .... .... .... ...1 .... .... = MPLS Bottom Of Label Stack: 1
  .... .... .... .... .... .... 0011 1111 = MPLS TTL: 63
Internet Protocol Version 4
  0100 .... = Version: 4
  .... 0101 = Header Length: 20 bytes (5)
  Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
    0000 00.. = Differentiated Services Codepoint: Default (0)
    .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
  Total Length: 234
    Expert Info (Error/Protocol): IPv4 total length exceeds packet length (79 bytes)
      IPv4 total length exceeds packet length (79 bytes)
      Severity level: Error
      Group: Protocol
  Identification: 0x2195 (8597)
  Flags: 0x00
    0... .... = Reserved bit: Not set
    .0.. .... = Don't fragment: Not set
    ..0. .... = More fragments: Not set
  Fragment Offset: 0
  Time to Live: 64
  Protocol: UDP (17)
  Header Checksum: 0xd101
  Header checksum status: Unverified
  Source Address: 99.78.208.246
  Destination Address: 52.95.30.201
Transmission Control Protocol
Transport Layer Security