11-18-2013 11:43 AM - edited 03-04-2019 09:36 PM
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
Solved! Go to Solution.
11-19-2013 05:19 AM
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.
11-19-2013 05:57 AM
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.
11-18-2013 02:47 PM
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?
11-19-2013 12:55 AM
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.
11-19-2013 05:07 AM
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
11-19-2013 05:19 AM
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.
11-19-2013 05:29 AM
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
11-19-2013 05:57 AM
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.
11-20-2013 05:46 AM
Thanks Alain for your help - Sri
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide