Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring Layer 2 Overhead Attribute in Interface Statistics

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. Use this topic to understand more 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,

Accounting of the Layer 2 Overhead Attribute in Interface Statistics

On MX Series and T Series routers, 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 MX Series routers. Starting with Junos OS Release 13.2, configuring the logical interface statistics to include Layer 2 is supported on 10-Gigabit Ethernet interfaces on MX Series routers with MPC4E. Starting with Junos OS Release 13.3, account-layer2-overhead is not supported on MX Series routers with MPC3E (on both PIC and logical interface levels).

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 T Series 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.

Table 1: Adjustment Bytes for Logical Interfaces over Ethernet Interfaces
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 for Configuring 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.

Configuring 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.

Enabling 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.

CAUTION:

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:

  1. Access a DPC or an MPC-occupied slot and the PIC where the interface is to be enabled.
  2. Specify the Layer 2 overhead value in bytes that is the octet adjustment per packet added to the total octet count for ingress and egress traffic on all the interfaces in the PIC.

Verifying 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:

    Note:

    For physical and logical interfaces, the values displayed for the Input rate and Output rate fields under the Traffic statistics section include the Layer 2 overhead of the packets.

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.

Release
Description
13.3
Starting with Junos OS Release 13.3, account-layer2-overhead is not supported on MX Series routers with MPC3E (on both PIC and logical interface levels).
13.2
Starting with Junos OS Release 13.2, configuring the logical interface statistics to include Layer 2 is supported on 10-Gigabit Ethernet interfaces on MX Series routers with MPC4E.