from web site
™
Cisco CCNP / BSCI Exam Tutorial: Filtering BGP Updates With Prefix Lists
An important section of one's BSCI and CCNP Examination good results is mastering BGP, and that includes filtering BGP routing updates. Within this tutorial, we’ll Check out the best way to filter BGP updates with prefix lists.
R4 is promoting a few networks by way of BGP. The downstream router R3 sees these routes and locations them into its BGP desk as revealed under. R3 has two downstream BGP friends, R1 and R2, and is particularly promotion alone as the following-hop IP tackle for all BGP routes despatched to People two routers.
R4(config)#router bgp four
R4(config-router)#community 21.0.0.0 mask 255.0.0.0
R4(config-router)#community 22.0.0.0 mask 255.0.0.0
R4(config-router)#network 23.0.0.0 mask 255.0.0.0
R3#show ip bgp
BGP desk Model is four, local router ID is 3.three.3.3
Standing codes: s suppressed, d damped, h historical past, * valid, > greatest, i
Inner
Origin codes: i – IGP, e – EGP, ? incomplete
Community Next Hop Metric LocPrf Bodyweight Route
*> 21.0.0.0 ten.2.2.four 0 0 four I
*> 22.0.0.0 ten.2.two.four 0 0 4 I
*> 23.0.0.0 10.two.two.four 0 0 4 I
R3(config)#router bgp 123
R3(config-router)#neighbor 172.twelve.123.1 upcoming-hop-self
R3(config-router)#neighbor 172.twelve.123.two subsequent-hop-self
Subsequently, both of those R1 and R2 have these 3 routes within their respective BGP tables.
R2#demonstrate ip bgp
BGP table Edition is 4, nearby router ID is two.two.2.two
*>i21.0.0.0 172.12.123.three 0 one hundred 0 4 I
*>i22.0.0.0 172.twelve.123.three 0 a hundred 0 4 I
*>i23.0.0.0 172.twelve.123.three 0 one hundred 0 4 I
R1#present ip bgp
BGP desk version is four, local router ID is 19.1.1.one
Community Following Hop Metric LocPrf Bodyweight Route
*>i21.0.0.0 172.12.123.3 0 one hundred 0 four I
*>i22.0.0.0 172.12.123.three 0 one hundred 0 4 I
*>i23.0.0.0 172.twelve.123.3 0 one hundred 0 four I
If we needed R3 to get all three of those routes from R4 although not publicize all of them to R2 and R1, we’ve received a couple of options on how to block these routes. Cisco’s suggestion is the use of prefix-lists, and when you finally get used to the syntax (which you must do in advance of getting and passing the BSCI), you’ll see they are actually simpler to use than access-lists.
In such a case, we’re likely to configure R3 to ship only the route to 21.0.0.0 to R1 and 23.0.0.0 to R2. Having said that, we do want both of these routers to get any long term routes that R4 advertises into BGP.
Considering the fact that R1 and R2 will find out about these routes from an iBGP neighbor, they will not market the routes to each other.
On R3, we’ll compose a prefix-list that denies 22.0.0.0/eight and 23.0.0.0/eight, but permits all other routes. Soon after applying the prefix list as proven, R1 sees only the 21.0.0.0 /8 route.
R3(config)#ip prefix-record FILTER_R1 deny 22.0.0.0/8
R3(config)#ip prefix-checklist FILTER_R1 deny 23.0.0.0/eight
R3(config)#ip prefix-record FILTER_R1 allow 0.0.0.0/0 le 32
R3(config-router)#neighbor 172.12.123.one prefix-record FILTER_R1 out
R3#distinct ip bgp https://socialhattori.com/ * delicate
BGP table Edition is 6, regional router ID is 19.1.1.1
Community Next Hop Metric LocPrf Pounds Path
The paths to 22.0.0.0/8 and 23.0.0.0/eight are efficiently filtered.
We’ll do the same for R2, apart from the route not staying expressly blocked is 23.0.0.0/8. The line “ip prefix-checklist permit 0.0.0.0/0 le 32” would be the prefix list equivalent of the “permit any” statement within an ACL.
R3(config)#ip prefix-record FILTER_R2 deny 21.0.0.0/8
R3(config)#ip prefix-checklist FILTER_R2 deny 22.0.0.0/8
R3(config)#ip prefix-record FILTER_R2 allow 0.0.0.0/0 le 32
R3(config-router)#neighbor 172.twelve.123.2 prefix-list FILTER_R2 out
R3#obvious ip bgp * smooth
BGP desk Model is 6, local router ID is two.two.two.two
Inside
Network Subsequent Hop Metric LocPrf Weight Path
*>i23.0.0.0 172.12.123.3 0 one hundred 0 four I
The paths to 21.0.0.0/8 and 22.0.0.0/8 are already correctly filtered.
To see the prefix lists configured on the route along with the buy with the statements in each listing, operate demonstrate ip prefix-record.
R3#exhibit ip prefix-list
ip prefix-listing FILTER_R1: 3 entries
seq five deny 22.0.0.0/8
seq 10 deny 23.0.0.0/8
seq 15 allow 0.0.0.0/0 le 32
ip prefix-listing FILTER_R2: 3 entries
seq 5 deny 21.0.0.0/eight
seq 10 deny 22.0.0.0/eight
Get some fingers-on exercise with prefix lists so you’ll immediately master them. Prefix lists are a vital part of dealing with BGP from the exam place and creation networks, so it’s vital that you'll be comfy working with them.