Monitoring Interfaces

Each interface has associated counters, which enable traffic volume and error monitoring.

Note

To limit the amount of administrative traffic, VPP only updates these counters every 10 seconds.

There are four commands used to monitor interfaces, show interface, show counters, interface clear counters, and show packet-counters.

show interface

The show interface command prints important traffic volume and error counters specific to each interface. For example:

tnsr# show interface
Interface: GigabitEthernet0/6/0
    Admin status: up
    Link up, 1G bit/sec, full duplex
    Link MTU: 9216 bytes
    MAC address: 00:00:42:0b:86:cf
    IPv4 Route Table: ipv4-VRF:0
    IPv4 addresses:
        1.1.1.1/24
    IPv6 Route Table: ipv6-VRF:0
    counters:
      received: 214541 bytes, 2144 packets, 0 errors
      transmitted: 862 bytes, 11 packets, 0 errors
      2143 drops, 0 punts, 0 rx miss, 0 rx no buffer

The show interface command also supports filtering of its output using one or more special keywords. When the list is filtered, its name, description, and administrative status are printed along with the chosen output.

acl:Prints the access control lists configured on an interface
counters:Prints the interface traffic counters for an interface
ipv4:Prints the IPv4 addresses present on the interface and the IPv4 route table used by the interface.
ipv6:Prints the IPv6 addresses present on the interface and the IPv6 route table used by the interface.
link:Prints the link status (e.g. up or down), media type and duplex, and MTU
mac:Prints the hardware MAC address, if present
nat:Prints the NAT role for an interface (e.g. inside or outside)

These keywords may be used with the entire list of interfaces, for example:

tnsr# show interface ipv4

The filtering may also be applied to a single interface:

tnsr# show interface GigabitEthernet0/6/0 link

Multiple keywords may also be used:

tnsr# show interface ipv4 link

show counters

The show counters command displays detailed information on all available interface counters.

Example output:

tnsr# show counters
Interface: GigabitEthernet0/6/0
    admin up link up
       counter:      value      updated      cleared      elapsed
      rx-bytes:       8118   1520970418   1520970410            8
    rx-packets:         82   1520970418   1520970410            8
        rx-ip4:         82   1520970418   1520970410            8
        rx-ip6:          0   1520970418   1520970410            8
      rx-error:          0   1520970418   1520970410            8
       rx-miss:          0   1520970418   1520970410            8
  rx-no-buffer:          0   1520970418   1520970410            8

      tx-bytes:          0   1520970418   1520970410            8
    tx-packets:          0   1520970418   1520970410            8
      tx-error:          0   1520970418   1520970410            8

          drop:         82   1520970418   1520970410            8
          punt:          0   1520970418   1520970410            8

The columns have the following meanings:

counter:The name of the counter.
value:The value, as of the last update, for the named counter.
updated:The time that the counters were last updated. This time is represented as a UNIX timestamp, which is the number of seconds since midnight, January 1st 1970 UTC based on the time setting of the router.
cleared:A UNIX timestamp representing the last time that the counter values were reset.
elapsed:The elapsed time, in seconds, since the counters were cleared. This is calculated as (update time - cleared time).

Counter values take a minimum of 10 seconds to be populated with valid data. During this time, the values in this table are invalid and the value and updated time will be 0.

The cleared time will not update until the counters are manually cleared. Until this happens, the cleared and elapsed time are displayed as -.

clear interface counters

The interface clear counters <name> command clears all counters on a given interface. If no specific interface is given, all interfaces will have their counters cleared:

tnsr# interface clear counters
Counters cleared
tnsr#

Available Counters

Counter Descriptions
Counter Description
rx-bytes bytes received
rx-packets packets received
rx-ip4 IPv4 packets received
rx-ip6 IPv6 packets received
rx-error receiver errors
rx-miss receiver miss
rx-no-buffer no buffers on receiver
tx-bytes bytes transmitted
tx-packets packets transmitted
tx-error transmitter errors
drop packets dropped
punt packets punted

show packet-counters

The show packet-counters command prints packet statistics and error counters taken from the dataplane. These counters show counts of packets that have passed through various aspects of processing, such as encryption, along with various types of packet send/receive errors.

Example output:

tnsr# show packet-counters
   Count                    Node                  Reason
       624            dpdk-crypto-input           Crypto ops dequeued
       624          dpdk-esp-decrypt-post         ESP post pkts
       624            dpdk-esp-decrypt            ESP pkts received
       622               esp-encrypt              ESP pkts received
       624             ipsec-if-input             good packets received
       304                ip4-input               Multicast RPF check failed
         9                 ip4-arp                ARP requests sent
        22               lldp-input               lldp packets received on disabled interfaces
         8             ethernet-input             no error
         2             ethernet-input             unknown ethernet type
      5821             ethernet-input             unknown vlan
        16                arp-input               ARP request IP4 source address learned
        28      GigabitEthernet0/14/0-output      interface is down
         8       GigabitEthernet3/0/0-output      interface is down