diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2022-11-03 21:17:57 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2023-02-10 10:27:23 +0100 |
commit | e55b08839914a3b94f361ee909ee63d265d07845 (patch) | |
tree | 258aa3c96dfaefebaca81283ed35a2c2b7456684 /bgpd/bgp_vty.h | |
parent | lib, bgp: add initial support for asdot format (diff) | |
download | frr-e55b08839914a3b94f361ee909ee63d265d07845.tar.xz frr-e55b08839914a3b94f361ee909ee63d265d07845.zip |
bgpd: add as-notation keyword to 'router bgp' vty command
A new keyword permits changing the BGP as-notation output:
- [no] router bgp <> [vrf BLABLA] [as-notation [<dot|plain|dot+>]]
At the BGP instance creation, the output will inherit the way the
BGP instance is declared. For instance, the 'router bgp 1.1'
command will configure the output in the dot format. However, if
the client wants to choose an alternate output, he will have to
add the extra command: 'router bgp 1.1 as-notation dot+'.
Also, if the user wants to have plain format, even if the BGP
instance is declared in dot format, the keyword can also be used
for that.
The as-notation output is only taken into account at the BGP
instance creation. In the case where VPN instances are used,
a separate instance may be dynamically created. In that case,
the real as-notation format will be taken into acccount at the
first configuration.
Linking the as-notation format with the BGP instance makes sense,
as the operators want to keep consistency of what they configure.
One technical reason why to link the as-notation output with the
BGP instance creation is that the as-path segment lists stored
in the BGP updates use a string representation to handle aspath
operations (by using regexp for instance). Changing on the fly
the output needs to regenerate this string representation to the
correct format. Linking the configuration to the BGP instance
creation avoids refreshing the BGP updates. A similar mechanism
is put in place in junos too.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_vty.h')
-rw-r--r-- | bgpd/bgp_vty.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index 8ed7c965e..d75eed2dd 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -150,7 +150,8 @@ 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, const char *as_pretty); + enum bgp_instance_type inst_type, const char *as_pretty, + enum asnotation_mode asnotation); extern void bgp_config_write_update_delay(struct vty *vty, struct bgp *bgp); extern void bgp_config_write_wpkt_quanta(struct vty *vty, struct bgp *bgp); extern void bgp_config_write_rpkt_quanta(struct vty *vty, struct bgp *bgp); |