mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-16 07:03:20 +00:00
bgpd: EVPN route type-5 gateway IP show command
Display gateway IP attribute in show command "show bgp l2vpn evpn route type prefix [json]" dev# sh bgp l2vpn evpn 100.0.0.21 BGP routing table entry for 10.100.0.2:1000:[5]:[0]:[32]:[100.0.0.21] Paths: (1 available, best #1) Advertised to non peer-group peers: 10.0.1.1 Route [5]:[0]:[32]:[100.0.0.21] VNI 1000 Gateway IP 50.0.2.21 203 10.100.0.2 from 0.0.0.0 (10.100.0.2) Origin IGP, metric 0, valid, sourced, local, best (First path received) Extended Community: ET:8 RT:102:1000 Rmac:72:48:54:da:7f:13 Last update: Mon Jun 29 12:29:05 2020 Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
This commit is contained in:
parent
6c995628c1
commit
8304dabfab
@ -9647,6 +9647,11 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
|
|||||||
json_nexthop_global = json_object_new_object();
|
json_nexthop_global = json_object_new_object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (safi == SAFI_EVPN) {
|
||||||
|
if (!json_paths)
|
||||||
|
vty_out(vty, " Route %pRN", bn);
|
||||||
|
}
|
||||||
|
|
||||||
if (path->extra) {
|
if (path->extra) {
|
||||||
char tag_buf[30];
|
char tag_buf[30];
|
||||||
|
|
||||||
@ -9658,12 +9663,8 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
|
|||||||
}
|
}
|
||||||
if (safi == SAFI_EVPN) {
|
if (safi == SAFI_EVPN) {
|
||||||
if (!json_paths) {
|
if (!json_paths) {
|
||||||
vty_out(vty, " Route %pFX",
|
|
||||||
(struct prefix_evpn *)
|
|
||||||
bgp_dest_get_prefix(bn));
|
|
||||||
if (tag_buf[0] != '\0')
|
if (tag_buf[0] != '\0')
|
||||||
vty_out(vty, " VNI %s", tag_buf);
|
vty_out(vty, " VNI %s", tag_buf);
|
||||||
vty_out(vty, "\n");
|
|
||||||
} else {
|
} else {
|
||||||
if (tag_buf[0])
|
if (tag_buf[0])
|
||||||
json_object_string_add(json_path, "VNI",
|
json_object_string_add(json_path, "VNI",
|
||||||
@ -9710,6 +9711,27 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (safi == SAFI_EVPN
|
||||||
|
&& attr->evpn_overlay.type == OVERLAY_INDEX_GATEWAY_IP) {
|
||||||
|
char gwip_buf[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
|
if (is_evpn_prefix_ipaddr_v4((struct prefix_evpn *)&bn->p))
|
||||||
|
inet_ntop(AF_INET, &attr->evpn_overlay.gw_ip.ipv4,
|
||||||
|
gwip_buf, sizeof(gwip_buf));
|
||||||
|
else
|
||||||
|
inet_ntop(AF_INET6, &attr->evpn_overlay.gw_ip.ipv6,
|
||||||
|
gwip_buf, sizeof(gwip_buf));
|
||||||
|
|
||||||
|
if (json_paths)
|
||||||
|
json_object_string_add(json_path, "gatewayIP",
|
||||||
|
gwip_buf);
|
||||||
|
else
|
||||||
|
vty_out(vty, " Gateway IP %s", gwip_buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (safi == SAFI_EVPN)
|
||||||
|
vty_out(vty, "\n");
|
||||||
|
|
||||||
/* Line1 display AS-path, Aggregator */
|
/* Line1 display AS-path, Aggregator */
|
||||||
if (attr->aspath) {
|
if (attr->aspath) {
|
||||||
if (json_paths) {
|
if (json_paths) {
|
||||||
|
Loading…
Reference in New Issue
Block a user