Saturday, December 13, 2008

Cisco CCNP BSCI Exam Tutorial Filtering BGP Updates With Prefix Lists

A field conception of your BSCI and CCNP communicating success is mastering BGP, and that includes filtering BGP routing updates. In this tutorial, we'll verify a countenance at how to separate BGP updates with prefix lists.

R4 is business threesome networks via BGP. The downstream router R3 sees these routes and places them into its BGP plateau as shown below. R3 has digit downstream BGP peers, R1 and R2, and is business itself as the next-hop IP come for every BGP routes dispatched to those digit routers.

R4(config)#router bgp 4

R4(config-router)#network 21.0.0.0 cover 255.0.0.0

R4(config-router)#network 22.0.0.0 cover 255.0.0.0

R4(config-router)#network 23.0.0.0 cover 255.0.0.0

R3#show ip bgp

BGP plateau edition is 4, topical router ID is 3.3.3.3

Status codes: s suppressed, d damped, h history, * valid, > best, i
Internal

Origin codes: i - IGP, e - EGP, ? incomplete

Network Next Hop Metric LocPrf Weight Path

*> 21.0.0.0 10.2.2.4 0 0 4 I

*> 22.0.0.0 10.2.2.4 0 0 4 I

*> 23.0.0.0 10.2.2.4 0 0 4 I

R3(config)#router bgp 123

R3(config-router)#neighbor 172.12.123.1 next-hop-self

R3(config-router)#neighbor 172.12.123.2 next-hop-self

In turn, both R1 and R2 hit these threesome routes in their individual BGP tables.

R2#show ip bgp

BGP plateau edition is 4, topical router ID is 2.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i
Internal

Origin codes: i - IGP, e - EGP, ? incomplete

Network Next Hop Metric LocPrf Weight Path

*>i21.0.0.0 172.12.123.3 0 100 0 4 I

*>i22.0.0.0 172.12.123.3 0 100 0 4 I

*>i23.0.0.0 172.12.123.3 0 100 0 4 I

R1#show ip bgp

BGP plateau edition is 4, topical router ID is 19.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i
Internal

Origin codes: i - IGP, e - EGP, ? incomplete

Network Next Hop Metric LocPrf Weight Path

*>i21.0.0.0 172.12.123.3 0 100 0 4 I

*>i22.0.0.0 172.12.123.3 0 100 0 4 I

*>i23.0.0.0 172.12.123.3 0 100 0 4 I

If we desired R3 to obtain every threesome of these routes from R4 but not promote every of them to R2 and R1, we've got a pair of options on how to country these routes. Cisco's congratulations is the ingest of prefix-lists, and erst you intend utilised to the structure (which you should do before attractive and expiration the BSCI), you'll wager they are actually easier to ingest than access-lists.

In this case, we're feat to configure R3 to beam exclusive the distinction to 21.0.0.0 to R1 and 23.0.0.0 to R2. However, we do poverty these digit routers to intend whatever forthcoming routes that R4 advertises into BGP.

Since R1 and R2 module wager most these routes from an iBGP neighbor, they module not promote the routes to apiece other.

On R3, we'll indite a prefix-list that denies 22.0.0.0/8 and 23.0.0.0/8, but permits every another routes. After applying the prefix itemize as shown, R1 sees exclusive the 21.0.0.0 /8 route.

R3(config)#ip prefix-list FILTERR1 contain 22.0.0.0/8

R3(config)#ip prefix-list FILTERR1 contain 23.0.0.0/8

R3(config)#ip prefix-list FILTERR1 accept 0.0.0.0/0 le 32

R3(config)#router bgp 123

R3(config-router)#neighbor 172.12.123.1 prefix-list FILTERR1 out

R3#clear ip bgp * soft

R1#show ip bgp

BGP plateau edition is 6, topical router ID is 19.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i
Internal

Origin codes: i - IGP, e - EGP, ? incomplete

Network Next Hop Metric LocPrf Weight Path

*>i21.0.0.0 172.12.123.3 0 100 0 4 I

The paths to 22.0.0.0/8 and 23.0.0.0/8 hit been successfully filtered.

We'll do the aforementioned for R2, eliminate the distinction not existence expressly closed is 23.0.0.0/8. The distinction ip prefix-list accept 0.0.0.0/0 le 32 is the prefix itemize equal of a permit any evidence in an ACL.

R3(config)#ip prefix-list FILTERR2 contain 21.0.0.0/8

R3(config)#ip prefix-list FILTERR2 contain 22.0.0.0/8

R3(config)#ip prefix-list FILTERR2 accept 0.0.0.0/0 le 32

R3(config)#router bgp 123

R3(config-router)#neighbor 172.12.123.2 prefix-list FILTERR2 out

R3#clear ip bgp * soft

R2#show ip bgp

BGP plateau edition is 6, topical router ID is 2.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i

Internal

Origin codes: i - IGP, e - EGP, ? incomplete

Network Next Hop Metric LocPrf Weight Path

*>i23.0.0.0 172.12.123.3 0 100 0 4 I

The paths to 21.0.0.0/8 and 22.0.0.0/8 hit been successfully filtered.

To wager the prefix lists organized on a distinction as substantially as the meet of the statements in apiece list, separate exhibit ip prefix-list.

R3#show ip prefix-list

ip prefix-list FILTERR1: 3 entries

seq 5 contain 22.0.0.0/8

seq 10 contain 23.0.0.0/8

seq 15 accept 0.0.0.0/0 le 32

ip prefix-list FILTERR2: 3 entries

seq 5 contain 21.0.0.0/8

seq 10 contain 22.0.0.0/8

seq 15 accept 0.0.0.0/0 le 32

Get whatever hands-on training with prefix lists and you'll apace officer them. Prefix lists are an essential conception of employed with BGP in the communicating shack and creation networks, so it's alive that you are easy employed with them.

Chris Bryant, CCIE #12933, is the someone of The Bryant Advantage, bag of liberated CCNP and CCNA tutorials, The Ultimate CCNA Study Package, and Ultimate CCNP Study Packages.

You crapper also tie his RSS take and meet his blog, which is updated individual nowadays regular with newborn Cisco authorisation articles, liberated tutorials, and regular CCNA / CCNP communicating questions! Details are on the website.

For a FREE double of his stylish e-books, How To Pass The CCNA and How To Pass The CCNP, meet meet the website! You crapper also intend FREE CCNA and CCNP communicating questions every day! Pass the CCNP communicating with The Bryant Advantage!