Skip to content

Commit

Permalink
bgpd: display label as part of the PMSI tunnel attribute
Browse files Browse the repository at this point in the history
root@TORS1:~# net show bgp l2vpn evpn route rd 27.0.0.15:4 type multicast
EVPN type-2 prefix: [2]:[ESI]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[ESI]:[EthTag]:[IPlen]:[IP]

BGP routing table entry for 27.0.0.15:4:[3]:[0]:[32]:[27.0.0.15]
Paths: (1 available, best #1)
  Advertised to non peer-group peers:
  MSP1(uplink-1) MSP2(uplink-2)
  Route [3]:[0]:[32]:[27.0.0.15] VNI 1003
  Local
    27.0.0.15 from 0.0.0.0 (27.0.0.15)
      Origin IGP, weight 32768, valid, sourced, local, bestpath-from-AS Local, best
      Extended Community: ET:8 RT:5550:1003
      AddPath ID: RX 0, TX 10
      Last update: Thu Feb  7 00:17:24 2019
      PMSI Tunnel Type: Ingress Replication, label: 1003 >>>>>>>>>>>>>

Displayed 1 prefixes (1 paths) with this RD (of requested type)
root@TORS1:~#

Ticket: CM-23790

Signed-off-by: Anuradha Karuppiah <[email protected]>
  • Loading branch information
AnuradhaKaruppiah authored and donaldsharp committed Feb 19, 2019
1 parent e1a5abe commit 089cd1a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -8382,11 +8382,15 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct prefix *p,
json_pmsi = json_object_new_object();
json_object_string_add(json_pmsi,
"tunnelType", str);
json_object_int_add(json_pmsi,
"label",
label2vni(&attr->label));
json_object_object_add(json_path, "pmsi",
json_pmsi);
} else
vty_out(vty, " PMSI Tunnel Type: %s\n",
str);
vty_out(vty,
" PMSI Tunnel Type: %s, label: %d\n",
str, label2vni(&attr->label));
}

}
Expand Down

0 comments on commit 089cd1a

Please sign in to comment.