1

Can someone please let me know if the prefix ip prefix-list emea seq 30 permit 10.9.1.0/24 ge 25 will include 10.9.1.0/24 network, or just 10.9.1.0./25, 10.9.1.0./26 etc if they existed?

Regards

2 Answers 2

0

You can use two statements to allow /24 and greater

prefix-list emea seq 30 permit 10.9.1.0/24
prefix-list emea seq 31 permit 10.9.1.0/24 ge 25
3
  • John K, that is what I used in the end. Cheers
    – Carltonp
    Oct 27, 2016 at 11:43
  • You can easily do the same with 1 statement: emea seq 30 permit 10.9.1.0/24 le 32. And this does not answer the original question...
    – Daniel
    Oct 27, 2016 at 15:25
  • You are correct :) I can't delete the post because it was accepted.
    – John K.
    Jan 5, 2017 at 14:56
4

The ge 25 suffix basically requires the prefix length to be 25 or higher (ge = greater than or equal).

In other words, the entry could be rephrased to: permit any network which is inside the network 10.9.1.0/24 and has a prefix length of 25 or higher. This would include 10.9.1.0/25, 10.9.1.0/26 as you have indicated (up to /32 as the le n attribute is omitted) but not 10.9.1.0/24.

It would however also include things like 10.9.1.128/25 or 10.9.1.200/30, as all those networks are within the 10.9.1.0/24 network having a subnet mask greater than or equal to 25.

Another example would be prefix-list emea seq 30 permit 10.9.1.0/24 ge 25 le 25.

This would exactly match the following two prefixes:

10.9.1.0/25 and 10.9.1.128/25

As the logic now is: permit any networks within the 10.9.1.0/24 range which prefix length is greater than or equal 25 and lower than or equal 25, in other words, exactly 25.

3
  • Hi @waza-ari, I got most of your last statement apart from 'exactly 25'. The key is that the prefix will include 10.9.1.0/24, /25, /26 etc.
    – Carltonp
    Oct 18, 2016 at 13:52
  • In my second example with ge 25 le 25 the key is that the prefix length must be exactly /25 in order to be matched. Consider it that way: the prefix length has to be both greater than or equal to 25 and lower than or equal to 25 at the same time, which leaves us with an exact match of 25.
    – Daniel
    Oct 18, 2016 at 14:10
  • No worries. If that answer answers your question, please consider marking it as helpful such that others have an indication.
    – Daniel
    Oct 21, 2016 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.