allow odd prefixes x.0/24 x<7

lab scenario
R13(AS13)-----R2(AS2)

1.requirement

R13 generates the following BGP routes.

202.202.1.0
202.202.2.0
202.202.3.0
202.202.4.0
202.202.5.0
202.202.6.0
202.202.7.0
202.202.8.0
202.202.9.0
202.202.10.0

R13 only advertises to R2 odd networks 202.202.x.0 where x<7

2.solution

using the following ACLs:

access-list 1 deny 202.202.0.0 0.0.254.255
access-list 1 deny 202.202.7.0 0.0.0.255
access-list 1 permit 202.202.1.0 0.0.7.255

apply outbound distribute list on R13
router bgp 13
neighbor R2 distribuilt-list 1 out

3.Verification

R13#sh ip bgp
BGP table version is 13, local router ID is 6.6.13.13
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 6.6.13.13/32 0.0.0.0 0 32768 ?
*> 6.6.134.0/24 0.0.0.0 0 32768 ?
*> 202.202.1.0 0.0.0.0 0 32768 ?
*> 202.202.2.0 0.0.0.0 0 32768 ?
*> 202.202.3.0 0.0.0.0 0 32768 ?
*> 202.202.4.0 0.0.0.0 0 32768 ?
*> 202.202.5.0 0.0.0.0 0 32768 ?
*> 202.202.6.0 0.0.0.0 0 32768 ?
*> 202.202.7.0 0.0.0.0 0 32768 ?
*> 202.202.8.0 0.0.0.0 0 32768 ?
*> 202.202.9.0 0.0.0.0 0 32768 ?
*> 202.202.10.0 0.0.0.0 0 32768 ?
R13#

R2#sh ip bgp
BGP table version is 6, local router ID is 6.6.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 202.202.1.0 6.6.132.13 0 0 13 ?
*> 202.202.3.0 6.6.132.13 0 0 13 ?
*> 202.202.5.0 6.6.132.13 0 0 13 ?
R2#

0 Comments:

Post a Comment

<< Home