Skip to content

Conversation

@deepak-singhal0408
Copy link

@deepak-singhal0408 deepak-singhal0408 commented Dec 29, 2025

Why I did it

To catch/dump failed routes, during periodic route_check, Need a new show command to display only failed routes, instead of displaying the whole routing table and then filtering failed routes). Display of whole routing table on scaled setups causes high memory spikes, and is not suitable for a periodic route_check on failed routes

How I did it

Added a new additional option parameter and in the implementation, filter routes early if the ROUTE_INSTALL_FAILED flag is not set.

How to verify it

Loaded the image on the chassis, and could verify that the device is stable.
the new command is available. the output is as expected.

admin@svcstr-7800-lc3-1:~$ vtysh -n 0

Hello, this is FRRouting (version 8.5.4).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

svcstr-7800-lc3-1# show ip route 
  <cr>            
  A.B.C.D         Network in the IP routing table to display
  A.B.C.D/M       IP prefix <network>/<length>, e.g., 35.0.0.0/8
  babel           Babel routing protocol (Babel)
  bgp             Border Gateway Protocol (BGP)
  connected       Connected routes (directly attached subnet or host)
  eigrp           Enhanced Interior Gateway Routing Protocol (EIGRP)
  failed          Show only failed routes
  isis            Intermediate System to Intermediate System (IS-IS)
  json            JavaScript Object Notation
  kernel          Kernel routes (not installed via the zebra RIB)
  nexthop-group   Nexthop Group Information
  nhrp            Next Hop Resolution Protocol (NHRP)
  openfabric      OpenFabric Routing Protocol
  ospf            Open Shortest Path First (OSPFv2)
  rip             Routing Information Protocol (RIP)
  static          Statically configured routes
  summary         Summary of all routes
  supernets-only  Show supernet entries only
  table           Table to display
  tag             Show only routes with tag
  vnc             Virtual Network Control (VNC)
  vrf             Specify the VRF
svcstr-7800-lc3-1# show ip route failed 
  <cr>  
svcstr-7800-lc3-1# show ip route failed 
svcstr-7800-lc3-1# show ip route json   
  <cr>    
  failed  Show only failed routes
svcstr-7800-lc3-1# show ip route json failed
{
}
svcstr-7800-lc3-1# 

svcstr-7800-lc3-1# show ipv6 route 
  <cr>           
  X:X::X:X       IPv6 Address
  X:X::X:X/M     IPv6 prefix
  babel          Babel routing protocol (Babel)
  bgp            Border Gateway Protocol (BGP)
  connected      Connected routes (directly attached subnet or host)
  failed         Show only failed routes
  isis           Intermediate System to Intermediate System (IS-IS)
  json           JavaScript Object Notation
  kernel         Kernel routes (not installed via the zebra RIB)
  nexthop-group  Nexthop Group Information
  nhrp           Next Hop Resolution Protocol (NHRP)
  openfabric     OpenFabric Routing Protocol
  ospf6          Open Shortest Path First (IPv6) (OSPFv3)
  ripng          Routing Information Protocol next-generation (IPv6) (RIPng)
  static         Statically configured routes
  summary        Summary of all routes
  table          Table to display
  tag            Show only routes with tag
  vnc            Virtual Network Control (VNC)
  vrf            Specify the VRF
svcstr-7800-lc3-1# show ipv6 route failed 
  <cr>  
svcstr-7800-lc3-1# show ipv6 route failed 
svcstr-7800-lc3-1# show ipv6 route json   
  <cr>    
  failed  Show only failed routes
svcstr-7800-lc3-1# show ipv6 route json failed 
{
}
svcstr-7800-lc3-1# 

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

signed-off by: Deepak Singhal [deepsinghal@microsoft.com]

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks fine ... needs a documentation change?

@deepak-singhal0408
Copy link
Author

code looks fine ... needs a documentation change?

Thanks @riw777 . modified the documentation.

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the commits to comply with our contribution guidelines.

[" FRR_IP6_REDIST_STR_ZEBRA "$type_str]\
>\
[nexthop-group$ng [summary$ng_summary [ecmp-count <gt$ecmp_gt|lt$ecmp_lt|eq$ecmp_eq> (1-256)$ecmp_count]]] [json$json]",
[nexthop-group$ng [summary$ng_summary [ecmp-count <gt$ecmp_gt|lt$ecmp_lt|eq$ecmp_eq> (1-256)$ecmp_count]]] [json$json] [failed$failed]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't want the failed modifier to be after the json command. I believe it belongs before the json sub-command.

Additionally this new change needs a topotest to show that the code is working properly. Please add one.

@riw777
Copy link
Member

riw777 commented Jan 6, 2026

can you add "signed off by" in each commit? I don't think the other lints need to be fixed (depfy).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants