10-02-2023 08:23 PM - last edited on 10-31-2023 02:57 AM by Translator
Hello,
I would like you to help me with the question below:
I have BGP below with AS 65400;
neighbor 10.117.6.3
remote-as 65400
local-as 65401
address-family ipv4 unicast
I want the partner AS to know only one
/24
network using
route-map
How can I make a
route-map
allowing only this network?
Solved! Go to Solution.
10-02-2023 09:50 PM - last edited on 10-31-2023 03:00 AM by Translator
Hello @rdrigues,
First, create a Prefix List matching the
/24
to announce (outbound) :
ip prefix-list ALLOW_ONLY_24 permit 10.0.0.0/24
Then, create a
Route Map
references this Prefix List :
route-map ALLOW_ONLY_24_NETWORK permit 10
match ip address prefix-list ALLOW_ONLY_24
Finally, apply this
Route Map
to your neihgbor:
router bgp 65400
neighbor 10.117.6.3
route-map ALLOW_ONLY_24_NETWORK out
Note: you could use ACL instead of Prefix List, and in the same way call this ACL under your
Route Map
10-02-2023 09:55 PM - last edited on 10-31-2023 03:02 AM by Translator
Router(config)# ip prefix-list list-1 permit x.x.x.x/24
Router(config)# route-map map-1 permit 10
Router(config-route-map)# match ip addess prefix-list list-1
Router(config-route-map)#end
Router(config)# router bgp 65400
Router(config-router)# adddress-family ipv4 unicast
Router(config-router-af)#neighbor 10.117.6.x route-map map-1 out
Router(config-route-map)#end
Best regards
******* If This Helps, Please Rate *******
10-02-2023 09:50 PM - last edited on 10-31-2023 03:00 AM by Translator
Hello @rdrigues,
First, create a Prefix List matching the
/24
to announce (outbound) :
ip prefix-list ALLOW_ONLY_24 permit 10.0.0.0/24
Then, create a
Route Map
references this Prefix List :
route-map ALLOW_ONLY_24_NETWORK permit 10
match ip address prefix-list ALLOW_ONLY_24
Finally, apply this
Route Map
to your neihgbor:
router bgp 65400
neighbor 10.117.6.3
route-map ALLOW_ONLY_24_NETWORK out
Note: you could use ACL instead of Prefix List, and in the same way call this ACL under your
Route Map
10-02-2023 09:55 PM - last edited on 10-31-2023 03:02 AM by Translator
Router(config)# ip prefix-list list-1 permit x.x.x.x/24
Router(config)# route-map map-1 permit 10
Router(config-route-map)# match ip addess prefix-list list-1
Router(config-route-map)#end
Router(config)# router bgp 65400
Router(config-router)# adddress-family ipv4 unicast
Router(config-router-af)#neighbor 10.117.6.x route-map map-1 out
Router(config-route-map)#end
Best regards
******* If This Helps, Please Rate *******
10-03-2023 06:09 AM
wonderful, I'll do some tests
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