Page MenuHomeVyOS Platform

Unable to list all available routes
Closed, ResolvedPublic

Description

Here are examples:

r6:~$ show ip route 1.1.1.1 
Possible completions:
  <Enter>       Execute the current command
  longer-prefixes
                Show longer prefixes of routes for specified IP address or prefix

      
r6:~$ show ip route 1.1.1.1 longer-prefixes 
% Unknown command: show ip route 1.1.1.1 longer-prefixes

same for ipv6

r6:~$ show ipv6 route 2600:: 
Possible completions:
  <Enter>       Execute the current command
  longer-prefixes
                Show longer prefixes of routes for given address or prefix

      
r6:~$ show ipv6 route 2600:: longer-prefixes 
% Unknown command: show ipv6 route 2600:: longer-prefixes

and the version

Version:          VyOS 1.3-rolling-202105011026
Release Train:    equuleus

Built by:         [email protected]
Built on:         Sun 02 May 2021 03:42 UTC
Build UUID:       3edf864c-5285-41d4-a7a8-edb2a42c4975
Build Commit ID:  4174b1309a64f8

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    4e4038df-97f2-4dea-8a4b-c44a3f0ff46a

Copyright:        VyOS maintainers and contributors

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Related Objects

Mentioned In
1.3.5

Event Timeline

dtoux created this object in space S1 VyOS Public.

Frr itself doesn't allow to set longer-prefixes without "prefix"

r4-1.3# show ip route 1.1.1.1 
  <cr>           
  json           JavaScript Object Notation
  nexthop-group  Nexthop Group Information


r4-1.3# show ip route 1.1.1.1/24 
  <cr>             
  json             JavaScript Object Notation
  longer-prefixes  Show route matching the specified Network/Mask pair only
  nexthop-group    Nexthop Group Information

Maybe need to add additional checks
https://github.com/vyos/vyos-1x/blob/fe12810cc65f8db51d8dbadd00835828e8e410c8/op-mode-definitions/show-ip-route.xml.in#L154-L159

Yes the point of "longer-prefixes" is to find smaller routes within a bigger netmask, so if you're leaving out prefix, it doesn't make sense.

However, while we are at it, it would be great to have "show ip route x/x json" keyword. It can be nice to expose json to Netmiko and such scripts :)

@olofl Add please a separate task for JSON.

syncer triaged this task as Normal priority.Oct 17 2021, 3:09 PM
syncer moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
Viacheslav claimed this task.