Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had 2 C class IP's: xx.xx.xx.0/23.

I must advertise it on BGP protocol. My config is:

ip route xx.xx.xx.0 255.255.254.0 Null0
! access-list 50 permit xx.xx.xx.0 0.0.1.255
!
route-map RIPE permit 10
match ip address 50
set origin igp
!
router bgp YYYYY
network xx.xx.xx.0 mask 255.255.254.0
redistribute static route-map RIPE
....
no auto-summary

OK, that works, but I need to move subnet of my prefix to gateway into my network:

ip route xx.xx.xx.8 255.255.255.248 xx.xx.xx.123
ip route xx.xx.xx.16 255.255.255.240 xx.xx.xx.122

How I can prevent distribute /29 and /28 ? I should distribute only /23

RO: sh ip bgp route-map RIPE


BGP table version is 9203492, local router ID is 192.168.14.1
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
*> xx.xx.xx.0/23 0.0.0.0 0 32768 i
*> xx.xx.xx.8/29 xx.xx.xx.123 0 32768 i
*> xx.xx.xx.16/28 xx.xx.xx.132 0 32768 i


share|improve this question

closed as too localized by Jim B, mdpc, Ward, Ladadadada, Cakemox Jun 7 '13 at 12:43

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

Use a prefix-list instead of the straight ACL. Check out this description, set it to an exact-match of the /23 and then match on it in your route-map. The longer prefixes won't be permitted.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.