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

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 '16 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...
    – waza-ari
    Oct 27 '16 at 15:25
  • You are correct :) I can't delete the post because it was accepted.
    – John K.
    Jan 5 '17 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 '16 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.
    – waza-ari
    Oct 18 '16 at 14:10
  • No worries. If that answer answers your question, please consider marking it as helpful such that others have an indication.
    – waza-ari
    Oct 21 '16 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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