Layer 2 Overhead Attribute in Interface Statistics
SUMMARY Learn about the Layer 2 overhead attributes, the guidelines for configuring the calculation of layer 2 overhead, and view the layer 2 overhead bytes calculated for ingress and egress traffic on Ethernet Interfaces.
By default, the physical interface and logical interface statistics do not account for Layer 2 overhead in input or output statistics. You can now configure the logical interface statistics to calculate and display all the Layer 2 header details for ingress and egress interfaces.
Accounting of the Layer 2 Overhead Attribute in Interface Statistics
On a router, you can configure the logical interface statistics to include the Layer 2 overhead size (header and trailer bytes) for both ingress and egress interfaces. Both the transit and total statistical information are computed and displayed for each logical interface. This functionality is supported on 1-Gigabit, 10-Gigabit, 40-Gigabit, and 100-Gigabit Ethernet interfaces on Dense Port Concentrators (DPCs), and Modular Port Concentrators (MPCs) on routers.
You can also configure the capability to compute the Layer 2 overhead bytes in interface
statistics on Type-3, Type-4 and Type-5 Flexible Port Concentrators (FPCs) on routers. To enable
the Layer 2 overhead bytes to be counted in the interface statistics at the PIC level, you must
use the account-layer2-overhead
statement at the [edit chassis fpc
slot-number pic pic-number]
hierarchy level.
If you configure this capability, all the Layer 2 header details
(Layer 2 header and cyclic redundancy check [CRC]) based on the Layer
2 encapsulation configured for an interface are calculated and displayed
in the logical interface statistics for ingress and egress interfaces
in the output of the show interfaces interface-name
commands. For logical interfaces, the Input
bytes and Output bytes fields
under the Traffic statistics section in the output of the show
interfaces interface-name <detail | extensive>
command include the Layer 2 overhead of the packets. For logical
interfaces, the Input rate and Output rate fields under the Traffic
statistics section in the output of the show interfaces interface-name <media | statistics>
command include
the Layer 2 overhead of the packets. For logical interfaces, the
values for the newly added Egress account overhead and Ingress account overhead fields display
the Layer 2 overhead size for transmitted and received packets respectively.
The input and output octets at the logical interface configured on the PIC includes all the Layer 2 headers. All the logical interfaces on the PIC, including the ae and the non-ae interfaces, are processed for Layer 2 overhead accounting for the arriving and exiting packets. This method of operation impacts the transit statistics that are primarily used for subscriber accounting and billing purposes in customer networks.
Table 1 lists the adjustment bytes that are counted based on the encapsulation on the logical interface over the Ethernet interface, when you enable accounting of Layer 2 overhead in interface statistics at the PIC level. The values for the adjustment bytes that are listed for all types of encapsulation are the same for DPCs and MPCs, with the only exception being for the VLAN CCC adjustment value. On DPCs, the VLAN CCC adjustment value is –4 bytes and on MPCs, the VLAN CCC adjustment value is +4 bytes.
Encapsulation Type on Logical Interfaces | Number of Adjustment Bytes | Description |
---|---|---|
Ethernet DIXv2 (IP datagrams over Ethernet) |
18 |
Untagged (includes CRC) |
Ethernet DIXv2 (IP datagrams over Ethernet) |
22 |
Single-tagged (includes CRC) |
Ethernet DIXv2 (IP datagrams over Ethernet) |
26 |
Double-tagged (includes CRC) |
VLAN Bridge |
4 |
CRC |
VLAN CCC |
4 |
CRC |
VLAN TCC |
18 |
Untagged (includes CRC) |
VLAN TCC |
22 |
Single-tagged (includes CRC) |
VLAN TCC |
26 |
Double-tagged (includes CRC) |
VLAN VPLS |
4 |
CRC |
Guidelines to Configure the Computation of Layer 2 Overhead in Interface Statistics
Keep the following points in mind when you configure the computation of Layer 2 overhead in interface statistics:
When you configure a native VLAN ID on a logical interface, the Layer 2 header adjustment for input statistics is different for tagged and untagged packets. For such interfaces, if you configure the setting to account for Layer 2 overhead, incorrect statistics might be displayed.
An untagged packet is considered as a tagged packet and an additional 4 bytes are appended to the counter values displayed in the output of the
show interface
command.The computed statistics might not be completely accurate in scenarios where the packets are dropped after they have been included in the interface statistics, but before the packets reach the destination.
Label-switched interface (LSI) statistics on the ingress direction of interfaces do not include the Layer 2 overhead bytes because this functionality of accounting Layer 2 overhead is not supported for such LSI interfaces.
Layer 2 overhead accounting is not supported for inline service (si) interfaces.
The total statistics of interfaces do not indicate the complete Layer 2 adjusted statistics. This behavior occurs because the total statistics count is the sum of transit and local statistics. Only the transit statistics are adjusted for Layer 2 and the local statistics are not adjusted for Layer 2.
Statistics on ae interfaces are calculated in the same manner as non-ae interfaces.
Adjustment bytes are applicable only for transit statistics that are displayed for logical interfaces.
For physical interfaces, the adjustment bytes for transit traffic and the non-adjusted bytes for local or protocol-specific traffic are combined and displayed in the output of the
show interfaces
command. (Segregation is not possible.)Layer 2 overhead accounting can be enabled at both PIC level and logical interface level.
When the
account-layer2-overhead
statement is configured, the Layer 2 overhead size in both input and output statistics is accounted for in Dense Port Concentrator (DPCs) and Modular Port Concentrator (MPCs).This
account-layer2-overhead
configuration now supports Layer 2 accounting for the Ethernet bridge encapsulation.The Layer 2 overhead bytes in interface statistics are saved across a unified ISSU or a graceful Routing Engine switchover (GRES) operation.
See Also
Configure Layer 2 Overhead Accounting in Interface Statistics
This topic contains sections that describe the configuration of Layer 2 overhead accounting for interface statistics at the PIC level and logical interface level.
Layer 2 overhead accounting can be enabled at both PIC level and logical interface level through configuration. By default, the physical interface and logical interface statistics do not account for Layer 2 overhead size (header and trailer) in both input and output statistics.
When the account-layer2-overhead
statement is configured,
the Layer 2 overhead size in both input and output statistics is accounted
for in the Dense Port Concentrator (DPCs) and the Modular Port Concentrator
(MPCs). This account-layer2-overhead
configuration now
supports Layer 2 accounting for the Ethernet bridge encapsulation.
Enable the Accounting of Layer 2 Overhead in Interface Statistics at the PIC Level
You can configure the account-layer2-overhead
statement
at the edit chassis fpc slot-number pic pic-number
hierarchy level to enable accounting
of Layer 2 overhead bytes in the ingress and egress interface statistics
at the PIC level.
If you modify the setting for accounting of Layer 2 overhead bytes at the PIC level, the PIC is rebooted, causing all of the physical and logical interfaces to be deleted and readded on the PIC. Due to this behavior, we recommend that you exercise caution while using this feature.
The computation method of Layer 2 overhead on different interface types is as follows:
For Ethernet interfaces, all the Layer 2 headers are counted.
For non-Ethernet interfaces, the Frame Relay, PPP, or Cisco HDLC headers are counted, while the bit or byte stuffing headers are excluded.
To enable accounting of Layer 2 overhead at the PIC level for ingress and egress traffic on interfaces:
See Also
Verify the Accounting of Layer 2 Overhead in Interface Statistics
Purpose
Display information about the Layer 2 overhead bytes that are counted in interface statistics for egress and ingress traffic on Ethernet interfaces.
Action
To display information about the Layer 2 overhead bytes that are counted in interface statistics:
For physical and logical interfaces, the values displayed for the
Input rate
andOutput rate
fields under the Traffic statistics section include the Layer 2 overhead of the packets.user@host> show interfaces ge-5/2/0 statistics detail
Physical interface: ge-5/2/0, Enabled, Physical link is Up Interface index: 146, SNMP ifIndex: 519, Generation: 149 Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Hold-times : Up 0 ms, Down 0 ms Current address: 00:1d:b5:61:d9:74, Hardware address: 00:1d:b5:61:d9:74 Last flapped : 2009-11-11 11:24:00 PST (09:23:08 ago) Statistics last cleared: 2009-11-11 17:50:58 PST (02:56:10 ago) Traffic statistics: Input bytes : 271524 0 bps Output bytes : 37769598 352 bps Input packets: 3664 0 pps Output packets: 885790 0 pps IPv6 transit statistics: Input bytes : 0 Output bytes : 16681118 Input packets: 0 Output packets: 362633 Multicast statistics: IPV4 multicast statistics: Input bytes : 112048 0 bps Output bytes : 20779920 0 bps Input packets: 1801 0 pps Output packets: 519498 0 pps IPV6 multicast statistics: Input bytes : 156500 0 bps Output bytes : 16681118 0 bps Input packets: 1818 0 pps Output packets: 362633 0 pps Input errors: Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Policed discards: 0, L3 incompletes: 0, L2 channel errors: 0, L2 mismatch timeouts: 0, FIFO errors: 0, Resource errors: 0 Output errors: Carrier transitions: 0, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0, FIFO errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0 Egress queues: 8 supported, 4 in use Queue counters: Queued packets Transmitted packets Dropped packets 0 best-effort 882558 882558 0 1 expedited-fo 0 0 0 2 assured-forw 0 0 0 3 network-cont 3232 3232 0 Active alarms : None Active defects : None Logical interface ge-5/2/0.0 (Index 71) (SNMP ifIndex 573) (Generation 135) Flags: SNMP-Traps 0x4000 Encapsulation: ENET2 Egress account overhead: 100 Ingress account overhead: 90 Traffic statistics: Input bytes : 271524 Output bytes : 37769598 Input packets: 3664 Output packets: 885790 IPv6 transit statistics: Input bytes : 0 Output bytes : 16681118 Input packets: 0 Output packets: 362633 Local statistics: Input bytes : 271524 Output bytes : 308560 Input packets: 3664 Output packets: 3659 Transit statistics: Input bytes : 0 0 bps Output bytes : 37461038 0 bps Input packets: 0 0 pps Output packets: 882131 0 pps IPv6 transit statistics: Input bytes : 0 Output bytes : 16681118 Input packets: 0 Output packets: 362633 Multicast statistics: IPV4 multicast statistics: Input bytes : 112048 0 bps Output bytes : 20779920 0 bps Input packets: 1801 0 pps Output packets: 519498 0 pps IPV6 multicast statistics: Input bytes : 156500 0 bps Output bytes : 16681118 0 bps Input packets: 1818 0 pps Output packets: 362633 0 pps Protocol inet, MTU: 1500, Generation: 151, Route table: 0 Addresses, Flags: Is-Preferred Is-Primary Destination: 40.40.40.0/30, Local: 40.40.40.2, Broadcast: 40.40.40.3, Generation: 167 Protocol inet6, MTU: 1500, Generation: 152, Route table: 0 Addresses, Flags: Is-Preferred Is-Primary Destination: ::40.40.40.0/126, Local: ::40.40.40.2 Generation: 169 Addresses, Flags: Is-Preferred Destination: fe80::/64, Local: fe80::21d:b5ff:fe61:d974 Protocol multiservice, MTU: Unlimited, Generation: 171 Generation: 153, Route table: 0 Policer: Input: __default_arp_policer__
See Also
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.
account-layer2-overhead
is not supported on MX Series routers with MPC3E (on both PIC and
logical interface levels).