CLI command "show pfe vxlan nh-usage" can be used to check VxLAN next-hop usage on PFE.
This article describes calculation of “Current Usage” and “Expected Usage” in command output and why sometimes their values does not match.
Example output:
Root@QFX5120-48YM> show pfe vxlan nh-usage
Slot 0
------------------OVERLAY NH------------------
Overlay bank size : 45056
Current usage :
Reserved entries : 1
ARP NDP/Type-5 tunnel NH entries : 9191 <<<<<<<<<<
Available entries : 35864
Expected usage :
ARP NDP/Type-5 tunnel NH entries : 2022 <<<<<<<<<<
Available entries : 43033
-----------------UNDERLAY NH-----------------
Underlay bank size : 20480
Reserved entries : 5
Underlay NH entries : 221
Available entries : 20254
NHs to CPU (IRB + L3 intf) entries : 62
NH ARPs of underlay L3 intfs : 124
Total tagged and access ports : 40
VTEP Flood NHs : 62
Available entries : 20187
Regarding how “Current” and “Expected” usage is being calculated in output of command “show pfe vxlan nh-usage”.
>>> “Current Usage” of Overlay nexthop, amount of entries showed for “ARP NDP/Type-5 tunnel NH entries”, is being calculated from HW NH table called EGR_L3_NEXT_HOP.
We can count it from output of shell command “cprod -A fpc0 -c 'set dcb bc "l3 egress show"'”. L3 egress table displayed in the output is divided into two parts, one for Overlay VxLAN nexthop and the other for Underlay one.
VxLAN next-hop is being configured in "forwarding-options" as 45056 so Overlay next-hop starts at 400002 and stopped at (1)45056.
“set forwarding-options vxlan-routing next-hop 45056”
Thus, count of overlay nexthops is 9191.
Example output of "l3 egress show":
% cprod -A fpc0 -c 'set dcb bc "l3 egress show"'
HW (unit 0)
Entry Mac Vlan INTF PORT MOD MPLS_LABEL ToCpu Drop RefCount L3MC
400002 <MAC address> 0 3 6845 0 -1 no no 1 no
<Output truncated>
>>> “Expected Usage” of Overlay nexthop, amount of entries showed for “ARP NDP/Type-5 tunnel NH entries”, is being calculated by adding number of ARP/NDP entries and Type-5 tunnels.
Number of ARP/NDP entries can be counted in output of shell command “cprod -A fpc0 -c "show shim virtual arp_ndp"”, which is 607.
Number of T5 tunnels installed on PFE can be counted in output of shell command “cprod -A fpc0 -c "show shim virtual tunnel-nh"”, which is first part of the output except ECMP/comp nexthops, which is 8584.
Thus, “Expected Usage” on this node should be 607+8584=9191, which matches the value of “Current Usage”.
This is a display issue with no service impact as per PR#1692596 (link for customer view is https://prsearch.juniper.net/problemreport/PR1692596).
PR fix is removing misleading counter “Expected Usage”. However, given that this is a display issue, my suggestion is to ignore value of “Expected Usage” but refer to “Current Usage”.