diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-04-09 08:33:41 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-04-12 09:43:53 +0200 |
commit | 7d3cae70b22ee6124a403b179db7b4fbab70dff6 (patch) | |
tree | 47deed1aec0f1871a20841543f89eb4b1a461e92 /doc/user/bgp.rst | |
parent | bgpd: Show BGP table version which was used for a particular prefix (diff) | |
download | frr-7d3cae70b22ee6124a403b179db7b4fbab70dff6.tar.xz frr-7d3cae70b22ee6124a403b179db7b4fbab70dff6.zip |
bgpd: Filter BGP routes by prefix version
The idea is to find out prefixes including specific BGP table version and
above.
Let's say I have a converged network and suddently I noticed a couple of
prefixes seems hijacked.
I want to look what new prefixes arrived with a specific BGP table version.
```
exit1-debian-9# show ip bgp version 8
BGP table version is 9, local router ID is 192.168.100.1, vrf id 0
Default local pref 100, local AS 65534
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 192.168.2.0/24 192.168.0.2 0 0 65030 ?
*> 192.168.0.2 0 0 65030 ?
* 192.168.3.0/24 192.168.0.2 0 0 65030 ?
*> 192.168.0.2 0 0 65030 ?
Displayed 2 routes and 18 total paths
exit1-debian-9#
```
```
exit1-debian-9# show ip bgp version 8 json
{
"vrfId": 0,
"vrfName": "default",
"tableVersion": 9,
"routerId": "192.168.100.1",
"defaultLocPrf": 100,
"localAS": 65534,
"routes": { "192.168.2.0/24": [
{
"valid":true,
"pathFrom":"external",
"prefix":"192.168.2.0",
"prefixLen":24,
"network":"192.168.2.0\/24",
"version":8,
"metric":0,
"weight":0,
"peerId":"2a02:bbd::2",
"path":"65030",
"origin":"incomplete",
"nexthops":[
{
"ip":"192.168.0.2",
"hostname":"home-spine1.donatas.net",
"afi":"ipv4",
"used":true
}
]
},
{
"valid":true,
"bestpath":true,
"selectionReason":"Neighbor IP",
"pathFrom":"external",
"prefix":"192.168.2.0",
"prefixLen":24,
"network":"192.168.2.0\/24",
"version":8,
"metric":0,
"weight":0,
"peerId":"192.168.0.2",
"path":"65030",
"origin":"incomplete",
"nexthops":[
{
"ip":"192.168.0.2",
"hostname":"home-spine1.donatas.net",
"afi":"ipv4",
"used":true
}
]
}
],"192.168.3.0/24": [
{
"valid":true,
"pathFrom":"external",
"prefix":"192.168.3.0",
"prefixLen":24,
"network":"192.168.3.0\/24",
"version":9,
"metric":0,
"weight":0,
"peerId":"2a02:bbd::2",
"path":"65030",
"origin":"incomplete",
"nexthops":[
{
"ip":"192.168.0.2",
"hostname":"home-spine1.donatas.net",
"afi":"ipv4",
"used":true
}
]
},
{
"valid":true,
"bestpath":true,
"selectionReason":"Neighbor IP",
"pathFrom":"external",
"prefix":"192.168.3.0",
"prefixLen":24,
"network":"192.168.3.0\/24",
"version":9,
"metric":0,
"weight":0,
"peerId":"192.168.0.2",
"path":"65030",
"origin":"incomplete",
"nexthops":[
{
"ip":"192.168.0.2",
"hostname":"home-spine1.donatas.net",
"afi":"ipv4",
"used":true
}
]
}
] } }
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'doc/user/bgp.rst')
0 files changed, 0 insertions, 0 deletions