Layer 2 overhead accounting can be enabled at both PIC (Physical Interface Card) level and IFL (Logical Interface Level). In some cases 'account-layer2-overhead' may show inaccurate values if it is enabled only on IFL. To fix this issue, 'account-layer2-overhead' should be configured with "overhead-value” option as below:
'account-layer2-overhead'
set interfaces xe-0/1/0.0 account-layer2-overhead <overhead-value>
By default, the physical interface and logical interface statistics do not account for Layer 2 overhead in input or output statistics.
To calculate and display all the Layer 2 header sized for ingress and egress interfaces, the 'account-layer2-overhead' knob needs to be configured.
In some cases, account-layer2-overhead shows inaccurate values when enabled only on IFL level.
Test Topology:
MX480------(xe-0/1/0)MX204(xe-0/0/0)------Destination (10.0.0.1)
Use case 1: Default behavior
The physical interface and logical interface statistics do not account Layer 2 overhead in input or output statistics.
Send traffic:
user@mx480# run ping 10.0.0.1 size 972 count 100 rapid
Results:
user@mx204# run show interfaces xe-0/1/0.0 extensive | no-more
~snip Traffic statistics: Input bytes : 100060 0 bps Output bytes : 100048 0 bps~snip Transit statistics: Input bytes : 100000 0 bps <<<<< Output bytes : 100000 0 bps <<<<<
Conclusion: Counters show only L3 Packets display 1000B (IP header : 20B + ICMP header 8B + payload 972B) both on physical and logical interface level.
Use case 2: Enable 'account-layer2-overhead' on PIC Level only
In order to take into account Layer 2 header details for ingress and egress interfaces, the following PIC level command can be configured:
set chassis fpc 0 pic 1 account-layer2-overhead
Note: After committing this command, PIC will be automatically restarted.
user@mx204# run show interfaces xe-0/1/0.0 extensive | no-more ~snip Traffic statistics: Input bytes : 101800 0 bps Output bytes : 101800 0 bps~snip Logical interface xe-0/1/0.0 (Index 76) (SNMP ifIndex 551) (Generation 159) Flags: Up SNMP-Traps 0x4004000 Encapsulation: ENET2 Traffic statistics: Input bytes : 101800 Output bytes : 101800~snip
Conclusion: Statistics is correct. L3+L2 packets (L3 Packets:1000B + L2 Header:14B + FCS:4B)
Use case 3: Enable 'account-layer2-overhead' on IFL Level only
Configuration:
set interfaces xe-0/1/0.0 account-layer2-overhead
Send traffic
Result:
user@mx204# run show interfaces xe-0/1/0 extensive | no-more ~snip Logical interface xe-0/1/0.0 (Index 77) (SNMP ifIndex 551) (Generation 162) Flags: Up SNMP-Traps 0x4004000 Encapsulation: ENET2 Traffic statistics: Input bytes : 100060 Output bytes : 100042~snip Transit statistics: Input bytes : 100000 0 bps <<< Output bytes : 100000 0 bps <<< ~snip
Conclusion: Only L3 packets size is taking into account.
To take into account L2 headers when 'account-layer2-overhead' is configured only on IFL Level "overhead-value" option is needed.
Use case 4: Enable 'account-layer2-overhead' on IFL Level only with configured overhead-value
Add 18B L2 packet in this example.
set interfaces xe-0/1/0.0 account-layer2-overhead 18
Send Traffic:
user@mx204# run show interfaces xe-0/1/0.0 extensive | no-more ~snip Traffic statistics: Input bytes : 101860 Output bytes : 101842 ~snip Transit statistics: Input bytes : 101800 0 bps <<< Output bytes : 101800 0 bps ~snip
Conclusion: Statistics take into account both L3 packet size (1000B) and configured L2 overhead (18B).
NOTE:
account-layer2-overhead