[quagga-dev 16713] Re: IP Prefix-lists "ge" value

Siva Kesava sivakesava1 at gmail.com
Mon Mar 5 22:09:26 GMT 2018


Hi Paul,

The better way as per me is to fix the documentation rather than changing
the code base since prefix-list without ge and le would do an exact match,
unlike access-lists.


Do people /use/ the "/X ge X le X" form (and why)?
I was doing a conversion from general config language to Quagga language
and was just outputting ge and le irrespective of them being equal to
length so I was just curious why that would be an error even though
documentation mentions it.

Cisco config language has "eq" (equal) option also but Quagga does not
require it.

‌Thanks
Siva

On Mon, Mar 5, 2018 at 2:00 PM, Paul Jakma <paul at jakma.org> wrote:

> Hi Siva,
>
> On Sun, 4 Mar 2018, Siva Kesava wrote:
>
> The documentation specifies that in an IP-Prefix List "The prefix list
>> will be applied if the prefix length is greater than or equal to the ge
>> prefix length."
>>
>> For reference:
>> https://www.nongnu.org/quagga/docs/docs-multi/IP-Prefix-List.html
>>
>> But in practice, the following command :
>>
>> ip prefix-list 101 seq 5 permit 1.0.1.0/24 ge 24 le 24
>>
>> gives an error:
>>
>> Invalid prefix range for 1.0.1.0/24, make sure: len < ge-value <=
>> le-value.
>>
>
> That doesn't seem an reasonable condition either though. Is:
>
>  ip prefix-list 101 seq 5 permit  ..../X ge X le X
>
> not just a long-winded (and confusing?) way of saying:
>
>  ip prefix-list 101 seq 5 permit  ..../X
>
> ? (If ge/le are not specified, the prefix-length must be an exact match).
>
> Given "ip prefix-list ... ..../X ge X le X" would be a redundant way of
> just saying "ip prefix-list ... ..../X", there is value in not allowing
> other forms and having one form (it keeps some things simple).
>
> That said, do other systems allow the redundant form? Do people expect
> that to work? Do people /use/ the "/X ge X le X" form (and why)?
>
> I believe that the condition has to be len <= ge-value <= le-value as per
>> the documentation.
>>
>
> Or the documentation fixed. Though, if people expect ".../X ge X le X" to
> work (why use that? is it cause people are not sure of the behaviour of
> "prefix/X"?)?
>
> This difference is found in the lib/plist.c file in
>> "vty_prefix_list_install" function probably in line 754(quagga 1.2.4
>> version)
>>
>
> prefix_list_entry_match would have to be changed too.
>
> Also, we'd have to think whether "prefix/X ge X le X" should be normalised
> to just "prefix/X" internally (and so "show running-conf" would show that),
> or whether it should be kept distinct. Opinions?
>
> Also, want to supply the full patch?
>
> regards,
> --
> Paul Jakma | paul at jakma.org | @pjakma | Key ID: 0xD86BF79464A2FF6A
> Fortune:
> I look at life as being cruise director on the Titanic.  I may not get
> there, but I'm going first class.
>                 -- Art Buchwald
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20180305/faeba132/attachment.html>


More information about the Quagga-dev mailing list