diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-04-21 21:34:12 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-05-05 15:37:00 +0200 |
commit | ed0e57e3f079352714c3a3a8a5b0dddf4aadfe1d (patch) | |
tree | 8c9cc817cb849107898633eb5d1d3201135fba10 /bgpd/bgp_vty.h | |
parent | Merge pull request #8619 from donaldsharp/sharp_redistribute (diff) | |
download | frr-ed0e57e3f079352714c3a3a8a5b0dddf4aadfe1d.tar.xz frr-ed0e57e3f079352714c3a3a8a5b0dddf4aadfe1d.zip |
bgpd: Create BGP alias names for community/large-community
Show alias name instead of numerical value in `show bgp <prefix>. E.g.:
```
root@exit1-debian-9:~/frr# vtysh -c 'sh run' | grep 'bgp community alias'
bgp community alias 65001:123 community-1
bgp community alias 65001:123:1 lcommunity-1
root@exit1-debian-9:~/frr#
```
```
exit1-debian-9# sh ip bgp 172.16.16.1/32
BGP routing table entry for 172.16.16.1/32, version 21
Paths: (2 available, best #2, table default)
Advertised to non peer-group peers:
65030
192.168.0.2 from home-spine1.donatas.net(192.168.0.2) (172.16.16.1)
Origin incomplete, metric 0, valid, external, best (Neighbor IP)
Community: 65001:12 65001:13 community-1 65001:65534
Large Community: lcommunity-1 65001:123:2
Last update: Fri Apr 16 12:51:27 2021
exit1-debian-9#
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_vty.h')
-rw-r--r-- | bgpd/bgp_vty.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index 251bdc3fe..051b2e958 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -154,6 +154,7 @@ struct bgp; } while (0) extern void bgp_vty_init(void); +extern void community_alias_vty(void); extern const char *get_afi_safi_str(afi_t afi, safi_t safi, bool for_json); extern int bgp_get_vty(struct bgp **bgp, as_t *as, const char *name, enum bgp_instance_type inst_type); |