Page MenuHomeVyOS Platform

Add alias for "show ipv6 bgp"
Closed, WontfixPublicFEATURE REQUEST

Description

The command "show ip bgp" works but "show ipv6 bgp" doesnt.

The proper commands are "show bgp ipv4" and "show bgp ipv6".

Suggestion that "show ipv6 bgp" should be added as a static alias for "show bgp ipv6":

vyos@vyos:~$ show ip bgp
Default BGP instance not found
vyos@vyos:~$ show ipv6 bgp

  Invalid command: show ipv6 [bgp]

vyos@vyos:~$ show bgp ip
ipv4  ipv6  
vyos@vyos:~$ show bgp ipv4
Default BGP instance not found
vyos@vyos:~$ show bgp ipv6
Default BGP instance not found

Ref: https://forum.vyos.io/t/show-ipv6-bgp-invalid-command/11779

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)
Issue type
Improvement (missing useful functionality)

Event Timeline

show ip bgp is an old command, it comes from quagga ...So in my point of view , adding more command to do the same , could generate more confusion . show bgp address-family should be used.

But at the same time it would help others who migrate to VyOS from Cisco, Arista etc.

Example: https://www.arista.com/en/um-eos/eos-border-gateway-protocol-bgp#xx1117919

show ip bgp

The show ip bgp command displays Border Gateway Protocol (BGP) IPv4 routing table entries. The output format depends on the command parameters:

* data-block format displays comprehensive information for each specified BGP routing-table entry.
* tabular format displays routing-table entries for the specified IPv4 addresses.

Unfortunately this is "not that easy" as out CLI commands are passed down to FRR raw.

We would need to open up an entire new op-mode tree for this. Maybe we should discontinue the show ip bgp tree instead?

Its not possible to "symlink" it?

Which would add support for "command-aliasing" similar to how it was done on H3C / HPE Comware devices (to make life easier for people coming from using other vendors):

command-alias enable
command-alias mapping quit exit
command-alias mapping undo no
command-alias mapping display show
command-alias mapping reboot reload
command-alias mapping header banner
command-alias mapping reset clear
command-alias mapping acl access-list
command-alias mapping port switchport
command-alias mapping stp spanning-tree
command-alias mapping snmp-agent snmp-server
command-alias mapping user-interface line
command-alias mapping return end
command-alias mapping sysname hostname
command-alias mapping save write
command-alias mapping delete erase
command-alias mapping info-center logging

In the above example writing "no shutdown" would remap that to the real command "undo shutdown".

Adding comments : maybe discontinue show ip bgp gives some issues / problems with automation tools (ansible o some custom script)While thinking out loud, it can be useful for new users create to alias.

For now, commands are generated by XML to node.def
I don't see an easy way to add the alias feature. Some scripts expect the exact sequence of an argument and it could be broken with this feature.

Viacheslav claimed this task.

Commands now rely of FRR syntax