Skip to content

Commit

Permalink
bgpd: Display default local preference and local AS for BGP show comm…
Browse files Browse the repository at this point in the history
…ands

1. "show bgp ipv4/ipv6 [json]"
2. "show bgp ipv4/ipv6 neighbor <peer> routes [json]"
3. "show bgp ipv4/ipv6 neighbors <peer> advertised-routes [json]"

In the above show commands, when a BGP path is displayed, we do not display the
local preference if it is EBGP route. Route calculation assumes the default
local preference. But, we can change the default local preference using
configuration in FRR. In this case, user should know the default local
preference value that is being used in the route calculation. Thus, adding a
new field 'default local preferece' in the show commands where a BGP path is
displayed.

When a BGP path is displayed in the above show commands, as-path does not
include the local AS. So, user has to execute another show command to display
the local-AS. To avoid this, adding a new field local-AS to above show commands.

Signed-off-by: Ameya Dharkar <[email protected]>
  • Loading branch information
Ameya Dharkar committed Nov 13, 2018
1 parent 1da43a0 commit e9f28ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -8434,7 +8434,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
? VRF_DEFAULT_NAME
: bgp->name,
table->version, inet_ntoa(bgp->router_id),
bgp->default_local_pref, bgp->as);
bgp->default_local_pref, bgp->as);
*json_header_depth = 2;
if (rd) {
vty_out(vty, " \"routeDistinguishers\" : {");
Expand Down

0 comments on commit e9f28ce

Please sign in to comment.