10-18-2012 12:26 PM - edited 03-04-2019 05:54 PM
Hi all, I have a question on redistributing routes into bgp.. not limited to bgp either but the basic question is I have network routes 172.27.208-243 that I wanted to redistribute at the wan router into bgp in smallest statement possibile for a match and I thought I could do this easily with a prefix list, however, am not seeming to find a way.
so now I am putting them all in a prefix list with their exact statements 172.27.208.0/23 209.x, 210/23 etc tc up to 243 and sure there is more efficient way
any help appreciated
10-18-2012 12:35 PM
Hi George,
Would something like this work for you?
ip prefix-list PL deny 172.27.0.0/21 le 32
ip prefix-list PL deny 172.27.244.0/22 le 32
ip prefix-list PL deny 172.27.248.0/21 le 32
ip prefix-list PL permit 172.27.0.0/16 le 32
The first three entries deny the range 172.27.0.x-172.27.7.x, 172.27.244.x-172.27.247.x, 172.27.248.x-172.27.255.x. The last entry allows all subnets of the 172.27.0.x-172.27.255.x range that have not been denied earlier.
Best regards,
Peter
10-18-2012 01:12 PM
Hello George,
in most cases redistribution into BGP is not needed as the BGP network command is not limited to connected routes as it happens with IGPs, but it works for routes that are present in the IP routing table,
So to suggest something different from Peter's good post, I would consider the use of plain network commands, it may be less elegant but it is simpler.
With auto-summary disabled (now default) you would need an exact match for each prefix, so a network statement for each one.
The maximum number of network statements should be 200, so this should not be a problem.
Hope to help
Giuseppe
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