bgp ip prefix-list

Answered Question
Jul 21st, 2010
User Badges:

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"

Correct Answer by Jon Marshall about 6 years 9 months ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
Tharak Abraham Wed, 07/21/2010 - 09:33
User Badges:
  • Bronze, 100 points or more

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

lkadlik Wed, 07/21/2010 - 09:35
User Badges:

Hi,


Thank you. I will try that and let you know

Correct Answer
Jon Marshall Wed, 07/21/2010 - 09:55
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

lkadlik Wed, 07/21/2010 - 10:45
User Badges:

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 Wed, 07/21/2010 - 10:57
User Badges:
  • Green, 3000 points or more

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

Actions

This Discussion