cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2640
Views
0
Helpful
7
Replies

IP Prefix-list

s.kanth
Level 1
Level 1

Hi All,

I have route-map configured under BGP and added prefix list in rotuer-map for AS prepend.

---------------

router bgp 100

neighbor 10.10.10.10 route-map prepend_as out

route-map prepend_as permit 10

match ip address prefix-list ROUTES

set as-path prepend 65111 65111 65111

route-map prepend_as permit 20

ip prefix-list ROUTES seq 5 permit 10.60.36.0/22

-----------------

Here my requrements is NOT to advertise 10.60.37.0/24 OUT from my BPG neighbour 10.10.10.10.

Does it works ? or have to deny it in ROUTES prefix list .. Please advise.

----------------------

route-map prepend_as deny 5

match ip address prefix-list NOTADV

ip prefix list NOTADV seq 10 permit 10.60.37.0/24

---------------------------

Thanks

Sri

2 Accepted Solutions

Accepted Solutions

Hi,

This should work like this but if you are using aggregate-address to advertise the /22 and this /24 is part of the /22 then you'd be better off using a suppress-map  with the aggregate-address command

ip prefix list NOTADV seq 10 deny 10.60.37.0/24

route-map prepend_as permit 10

match ip address prefix-list ROUTES

set as-path prepend 65111 65111 65111

route-map prepend_as permit 20

match ip address prefixNOTADV

route-map prepend_as permit 30

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

Hi,

No it will only match the /22 so if you advertsie the /22 and the /24,only the /22 will be prepended.

if you are not ussing aggregate-address,you redistribute static route to nuul0  I suppose ?

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

7 Replies 7

de1denta
Level 3
Level 3

Hi Sri,

Are you advertising the exact 10.60.36.0/22 prefix into BGP or the component subnets 10.60.36.0/24, 10.60.37.0/24 etc?

cadet alain
VIP Alumni
VIP Alumni

Hi,

route-map prepend_as permit 20 will let you advertise all other prefixes without altering the AS_PATH so the component subnet 10.60.37.0/24 if advertised will still be with the AS_PATH prepending route-map.

If you want not to advertise this prefix you can filter it out with a route-map or if you are aggregating and advertising all component subnets with aggregate-address command you can use a  suppress-map to selectively suppress this prefix from being advertised. Or you can set a community of local-as or no-advertise for this prefix.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Thanks Alain.

So I have to use same route-map which is pointing to outside.

Can you please help me how to achieve with the route-map...

"NOT to advertise 10.60.37.0/24 OUT from my BPG neighbour 10.10.10.10"

Thanks

Sri

Hi,

This should work like this but if you are using aggregate-address to advertise the /22 and this /24 is part of the /22 then you'd be better off using a suppress-map  with the aggregate-address command

ip prefix list NOTADV seq 10 deny 10.60.37.0/24

route-map prepend_as permit 10

match ip address prefix-list ROUTES

set as-path prepend 65111 65111 65111

route-map prepend_as permit 20

match ip address prefixNOTADV

route-map prepend_as permit 30

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Alain,

Thanks for posting the config.

But entire subnet /22 allowed with "AS prepend" at permit 10.  --- ( it allows entired network including /24).

so does "permit 20" work here ? Please help me.

Note: Not using aggregate-address command to advetise the /22 subnet here. so we are good to go for route-map :-) .

Thanks

Sri

Hi,

No it will only match the /22 so if you advertsie the /22 and the /24,only the /22 will be prepended.

if you are not ussing aggregate-address,you redistribute static route to nuul0  I suppose ?

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Thanks Alain for your help - Sri