Skip to content

Commit 1d1c1bc

Browse files
doc: Add documentation for nexthop-group summary and ECMP filtering
Documentation for nexthop-group summary and ECMP filtering in show ip route nexthop-group cmd Signed-off-by: Rajasekar Raja <[email protected]>
1 parent a5210d8 commit 1d1c1bc

File tree

1 file changed

+69
-2
lines changed

1 file changed

+69
-2
lines changed

doc/user/zebra.rst

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ zebra Terminal Mode Commands
15941594
Display detailed information about a route. If [nexthop-group] is
15951595
included, it will display the nexthop group ID the route is using as well.
15961596

1597-
.. clicmd:: show [ip|ipv6] route [vrf NAME|all|table TABLENO] [A.B.C.D|A.B.C.D/M|X:X::X:X|X:X::X:X/M] [json] [nexthop-group]
1597+
.. clicmd:: show [ip|ipv6] route [vrf NAME|all|table TABLENO] [A.B.C.D|A.B.C.D/M|X:X::X:X|X:X::X:X/M] [json] [nexthop-group [summary [ecmp-count <gt|lt|eq> (1-256)]]]
15981598

15991599
Display detailed information about routes in the routing table. This command provides comprehensive information about specific routes, including their attributes, nexthops, and other routing details.
16001600

@@ -1604,8 +1604,13 @@ zebra Terminal Mode Commands
16041604
- ``table TABLENO``: Display routes from a specific routing table (1-4294967295)
16051605
- ``A.B.C.D|A.B.C.D/M``: Display detailed information for a specific IPv4 address or prefix
16061606
- ``X:X::X:X|X:X::X:X/M``: Display detailed information for a specific IPv6 address or prefix
1607-
- ``json``: Display output in JSON format
16081607
- ``nexthop-group``: Include nexthop group information in the output
1608+
- ``nexthop-group summary``: Display a concise summary view with ECMP counts and nexthop group IDs instead of full nexthop details
1609+
- ``ecmp-count <gt|lt|eq> N``: Filter routes by ECMP count (requires summary option)
1610+
- ``gt``: Show routes with ECMP count greater than N
1611+
- ``lt``: Show routes with ECMP count less than N
1612+
- ``eq``: Show routes with ECMP count equal to N
1613+
- ``json``: Display output in JSON format
16091614

16101615
The detailed output includes:
16111616

@@ -1638,6 +1643,68 @@ zebra Terminal Mode Commands
16381643

16391644
When using the JSON output format, the information is structured in a hierarchical JSON object containing all the route details in a machine-readable format.
16401645

1646+
**Nexthop Group Summary View**
1647+
1648+
When using the ``nexthop-group summary`` option, instead of showing all individual nexthops for each route, this displays a concise view showing ECMP counts, nexthop group IDs, and status flags.
1649+
1650+
The summary output includes:
1651+
1652+
- Route prefix and protocol
1653+
- Received/Installed NHG ID: The nexthop group IDs (received from protocol / installed in kernel)
1654+
- ECMP/FIB count: Number of ECMP paths / Number of paths installed in FIB
1655+
- Status: Route installation status (Installed, Queued, Failed)
1656+
- Flags: Nexthop group flags (Valid, Installed, Recursive, etc.)
1657+
1658+
Example showing routes with exactly 2 ECMP paths:
1659+
1660+
::
1661+
1662+
Router# show ip route bgp nexthop-group summary ecmp-count eq 2
1663+
B> 192.168.1.0/24 [20/0] Rcv/Ins NHG ID: 100/100 ECMP/FIB count: 2/2 Status: Installed Flags: Valid, Installed
1664+
B>* 192.168.2.0/24 [20/0] Rcv/Ins NHG ID: 101/101 ECMP/FIB count: 2/2 Status: Installed Flags: Valid, Installed
1665+
B> 192.168.3.0/24 [20/0] Rcv/Ins NHG ID: 102/102 ECMP/FIB count: 2/2 Status: Installed Flags: Valid, Installed
1666+
B> 192.168.4.0/24 [20/0] Rcv/Ins NHG ID: 103/103 ECMP/FIB count: 2/2 Status: Installed Flags: Valid, Installed
1667+
1668+
Example showing routes with less than 2 ECMP paths:
1669+
1670+
::
1671+
1672+
Router# show ip route ospf nexthop-group summary ecmp-count lt 2
1673+
O> 192.168.10.0/24 [110/20] Rcv/Ins NHG ID: 150/151 ECMP/FIB count: 1/1 Status: Installed Flags: Valid, Recursive
1674+
1675+
JSON output example:
1676+
1677+
::
1678+
1679+
Router# show ip route bgp nexthop-group summary ecmp-count eq 1 json
1680+
{"192.168.10.0/24":[{
1681+
"prefix":"192.168.10.0/24",
1682+
"prefixLen":24,
1683+
"protocol":"bgp",
1684+
"vrfId":0,
1685+
"vrfName":"default",
1686+
"selected":true,
1687+
"destSelected":true,
1688+
"distance":20,
1689+
"metric":0,
1690+
"installed":true,
1691+
"table":254,
1692+
"nexthopGroupId":200,
1693+
"ecmpCount":1,
1694+
"fibInstalledCount":1,
1695+
"installedNexthopGroupId":200,
1696+
"receivedNexthopGroupId":200,
1697+
"nexthopGroupFlags":9,
1698+
"nexthopGroupValid":"true"
1699+
}]}
1700+
1701+
The summary view is particularly useful for:
1702+
1703+
- Quickly identifying routes with specific ECMP configurations
1704+
- Troubleshooting nexthop group installation issues
1705+
- Monitoring ECMP load-balancing configurations
1706+
- Verifying routes have the expected number of paths
1707+
16411708
.. clicmd:: show [ip|ipv6] route summary
16421709

16431710
Display summary information about routes received from each protocol.

0 commit comments

Comments
 (0)