cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3889
Views
15
Helpful
5
Replies

bgp ip prefix-list

lkadlik
Level 1
Level 1

I want to have a prefix list that will permit a /16 address block as well as any networks within the /16.  In other words the network could have networks

172.20.10.0/24

172.20.21.0/24

instead of allowing the individual networks I wanted to all the whole /16 in one line in the prefix list

Can i do this using the ge command ?

ip prefix-list XXX permit 172.20.0.0/16 ge ?

I tried to do " ge 16" and got a message saying "% Invalid prefix range for 172.20.0.0/16, make sure: len < ge-value <= le-value"

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

If you want to include 172.16.0.0/16 and any subnets of that then you should use -

172.16.0.0/16 le 32

which means the first 2 octets must match 172.16. and then you can have combination of subnet mask after that ie. 17, 18, 19 -> 32.

Jon

View solution in original post

5 Replies 5

Tharak Abraham
Level 3
Level 3

please try:-

ip prefix-list XXX permit 172.20.0.0/16 le 24

This means check the first 16 bits in the mask and it should be less than 24 !

If you want more precise over teh networks to be advertised, you may need to put lesser bits instead of 24, say 19.

Hope to help

Hi,


Thank you. I will try that and let you know

Jon Marshall
Hall of Fame
Hall of Fame

If you want to include 172.16.0.0/16 and any subnets of that then you should use -

172.16.0.0/16 le 32

which means the first 2 octets must match 172.16. and then you can have combination of subnet mask after that ie. 17, 18, 19 -> 32.

Jon

So if i want to include the /24 for 172.16.3.0  and any subnets within it I would do


ip prefix-list x permit 172.16.3.0/24 le 24

correct ?

royalblues
Level 10
Level 10

As Jon said in his earlier post, the prefix list should be

ip prefix-list BEACON_MUTUAL_WARWICK permit 172.16.3.0/24 le 32

This will include subnet 172.16.3.0/24 and also subnets within it

172.16.3.0/27,

172.16.3.32/28 etc  etc

HTH

Narayan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card