This is useful to go back in the past and check when was that prefix appeared,
changed, etc.
```
exit1-debian-9# show ip bgp 172.16.16.1/32
BGP routing table entry for 172.16.16.1/32, version 6
Paths: (2 available, best #2, table default)
Advertised to non peer-group peers:
home-spine1.donatas.net(192.168.0.2) home-spine1.donatas.net(2a02:bbd::2)
65030
192.168.0.2 from home-spine1.donatas.net(2a02:bbd::2) (172.16.16.1)
Origin incomplete, metric 0, valid, external
Last update: Thu Apr 8 20:15:25 2021
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)
Last update: Thu Apr 8 20:15:25 2021
exit1-debian-9#
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
}
} else {
if (!json) {
- vty_out(vty, "BGP routing table entry for %s%s%pFX\n",
+ vty_out(vty,
+ "BGP routing table entry for %s%s%pFX, version %" PRIu64
+ "\n",
((safi == SAFI_MPLS_VPN || safi == SAFI_ENCAP)
? prefix_rd2str(prd, buf1,
sizeof(buf1))
: ""),
- safi == SAFI_MPLS_VPN ? ":" : "", p);
+ safi == SAFI_MPLS_VPN ? ":" : "", p,
+ dest->version);
- } else
+ } else {
json_object_string_add(json, "prefix",
prefix2str(p, prefix_str, sizeof(prefix_str)));
+ json_object_int_add(json, "version", dest->version);
+
+ }
}
if (has_valid_label) {