Re: [IPFIX] basicList clarification

Paul Aitken <[email protected]> Tue, 15 Dec 2015 23:24:52 +0000
Newsgroups gmane.ietf.ipfix
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============6806426357599815689==
Content-Type: multipart/alternative;
 boundary="------------010306040702000802010805"

This is a multi-part message in MIME format.
--------------010306040702000802010805
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Gerald,

> Hi Paul,
>
> Thanks for the responses. It clarifies for most part; while I would 
> also like to clarify few things on my question. (tagged [Gerald] inline)

See [PJ] inline...


> So it appears we would need to define Y as IE and mark X as basicList 
> of Y.

What you're proposing is possible if there's a good reason. However we 
want to avoid unnecessary duplication of existing IEs into new "list of" 
IEs as much as possible, so you should only create X if there's a strong 
justification (eg it models an existing object).


> Thanks again
>
> On Tue, Dec 15, 2015 at 6:44 PM, Paul Aitken <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Gerald,
>
>>     Hi all,
>>
>>     It is my understanding from the RFCs that basicList type is an
>>     encoding for list of IPFIX Information Elements.
>
>     Yes, where the list contains zero or more instances of a single IE.
>
>
>>     To create the template much more strongly typed, we have defined
>>     a custom (enterprise) Information Element with a new ID (say X),
>>     which is defined as a basicList of specific items (eg.,
>>     InterfaceName).
>>
>>     My question to you all is: Is it mandatory that we have a
>>     separate information element called InterfaceName (say ID Y) and
>>     define X as a basicList of Y ?
>
>     Yes, that's how the protocol is defined.
>
>
>>     For our need, it is enough for us, that we define X as a
>>     basicList of string (as X is already strongly defined). But
>>     string is a type, not info element.
>>
>>     We would like to retain X (instead of defining a template
>>     directly with a standard basicList). And we don't have any other
>>     need to define a new Information Element Y.
>
>     Y defines the list elements which tells the Collector that the
>     list contains strings, and it defines the semantics of those
>     strings - eg whether they contain interface names, user names, a
>     list of selectorNames, or a list of Application names. Then a
>     basicList of Y tells the Collector that you're exporting zero or
>     more of them.
>
> [Gerald] This is definitely a choice. However, as I mentioned, this 
> makes the template weakly typed (ie., the element is just #291 
> basicList). We would like to enforce stronger types at the template 
> itself (this was the motive behind defining X)

[PJ] This was an objection from the Collector side when we were writing 
the IPFIX Structured Data draft, because the collector can no longer 
tell what information it's going to receive ahead of time (just "a 
list"); it has to check each Data Record to know what information the 
list contains. On the other hand, since the basicList is essentially a 
wrapper around any other IE, it's not necessary to create new 
strongly-defined list IEs for each of the existing (and potentially all 
future) IEs.


>     Perhaps you should define Y as a single instance of X (so Y is
>     well defined), then redefine X as a basicList of Y. Or if you
>     don't want/need to define both X and Y, then use the basicList IE
>     #291 to export a basicList of (strongly defined) Y.
>
> [Gerald] Yes, this is also a choice; but we don't need Y for any other 
> reason except to fit into the basicList detail. So wanted to know if 
> that can be avoided. I got my answer: No (if strongly typed templates).

[PJ] Strongly typed templates would require a new "list of" IE for every 
existing (and future) IE that was to become a list, which is incredibly 
wasteful.


>>     I realize that the basicList encoding has a information-element
>>     ID of the item in payload -- is this mandatory?
>
>     Yes. The encoding would not be interoperable without it.
>

[PJ] Here I understood the question to be whether the IE ID field was 
required in the basicList encoding - ie, it seemed that you were 
proposing a new encoding where, since X is already strong defined as a 
basicList of Y, there's no need to include Y in the export.


>>     Or for a strongly typed item X, we could expect the IPFIX parser
>>     to be aware of contents (interface name) by contract?
>
>     No. Every collector which implements RFC 6313 (IPFIX Structured
>     Data) should be able to decode a basicList of Y. However, the
>     mechanism which you propose requires the collector to have special
>     knowledge of the internals of X, which is not scalable. In short,
>     such an Exporter would not be interoperable with all Collectors.
>
> [Gerald] X is not a different encoding. X is a basicList (sort of more 
> strongly typed. ie., X is a basicList of Y). So the encoding is just 
> the same as #291 standard basicList. But when the template declares a 
> element as X, it is clearly typed even without having to look into the 
> data (or it also doesn't let the exporter send X of Z on the same 
> template).

[PJ] What you're proposing is possible and may be useful in some 
circumstances. For example, for the MIB export draft, we've defined new 
IEs (#443, #444) which are subTemplateLists, in order to give strong 
typing information because the IE contains a row from a table.

(See https://tools.ietf.org/html/draft-ietf-ipfix-mib-variable-export-10 
and http://www.iana.org/assignments/ipfix/ipfix.xhtml)

P.

>
>>     Pls let me know if my question is unclear.
>>
>>     Thanks in advance.
>>     - Gerald Naveen
>
>
>     The custom IE which you've defined must contain meta-data about
>     the list such as an element count, element lengths, delimiters or
>     separators. It creates a new way of encoding list information
>     which the collector must also understand in addtion to the
>     basicList encoding, which is not useful. In short, you should not
>     create list type elements; instead, use the basicList mechanism.
>
> [Gerald] Agree. We aren't trying to redefine basicList encoding for sure.
>
>
>>
>>
>>     _______________________________________________
>>     IPFIX mailing list
>>     [email protected] <mailto:[email protected]>
>>     https://www.ietf.org/mailman/listinfo/ipfix
>
>


--------------010306040702000802010805
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Gerald,<br>
      <br>
    </div>
    <blockquote
cite="mid:CAJR=o+HycZ6nwgs_bB0pcJ1cwdHZXAem7EVYh2KBZWpOYx-ygw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hi Paul,<br>
            <br>
          </div>
          Thanks for the responses. It clarifies for most part; while I
          would also like to clarify few things on my question. (tagged
          [Gerald] inline)<br>
        </div>
      </div>
    </blockquote>
    <br>
    See [PJ] inline...<br>
    <br>
    <br>
    <blockquote
cite="mid:CAJR=o+HycZ6nwgs_bB0pcJ1cwdHZXAem7EVYh2KBZWpOYx-ygw@mail.gmail.com"
      type="cite">
      <div dir="ltr">So it appears we would need to define Y as IE and
        mark X as basicList of Y.<br>
      </div>
    </blockquote>
    <br>
    What you're proposing is possible if there's a good reason. However
    we want to avoid unnecessary duplication of existing IEs into new
    "list of" IEs as much as possible, so you should only create X if
    there's a strong justification (eg it models an existing object).<br>
    <br>
    <br>
    <blockquote
cite="mid:CAJR=o+HycZ6nwgs_bB0pcJ1cwdHZXAem7EVYh2KBZWpOYx-ygw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">Thanks again<br>
            <br>
          </div>
          <div class="gmail_extra">
            <div class="gmail_quote">On Tue, Dec 15, 2015 at 6:44 PM,
              Paul Aitken <span dir="ltr">&lt;<a moz-do-not-send="true"
                  href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;</span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"> Gerald,<span
                    class=""><br>
                    <div><br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <div>Hi all,<br>
                                    <br>
                                  </div>
                                  It is my understanding from the RFCs
                                  that basicList type is an encoding for
                                  list of IPFIX Information Elements.<br>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </span> Yes, where the list contains zero or more
                  instances of a single IE.<span class=""><br>
                    <br>
                    <br>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>
                          <div>
                            <div>
                              <div>To create the template much more
                                strongly typed, we have defined a custom
                                (enterprise) Information Element with a
                                new ID (say X), which is defined as a
                                basicList of specific items (eg.,
                                InterfaceName).<br>
                                <br>
                              </div>
                              My question to you all is: Is it mandatory
                              that we have a separate information
                              element called InterfaceName (say ID Y)
                              and define X as a basicList of Y ?</div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </span> Yes, that's how the protocol is defined.<span
                    class=""><br>
                    <br>
                    <br>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>
                          <div>
                            <div> For our need, it is enough for us,
                              that we define X as a basicList of string
                              (as X is already strongly defined). But
                              string is a type, not info element.<br>
                              <br>
                            </div>
                            We would like to retain X (instead of
                            defining a template directly with a standard
                            basicList). And we don't have any other need
                            to define a new Information Element Y.<br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </span> Y defines the list elements which tells the
                  Collector that the list contains strings, and it
                  defines the semantics of those strings - eg whether
                  they contain interface names, user names, a list of
                  selectorNames, or a list of Application names. Then a
                  basicList of Y tells the Collector that you're
                  exporting zero or more of them.<br>
                </div>
              </blockquote>
              <div>[Gerald] This is definitely a choice. However, as I
                mentioned, this makes the template weakly typed (ie.,
                the element is just #291 basicList). We would like to
                enforce stronger types at the template itself (this was
                the motive behind defining X) <br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    [PJ] This was an objection from the Collector side when we were
    writing the IPFIX Structured Data draft, because the collector can
    no longer tell what information it's going to receive ahead of time
    (just "a list"); it has to check each Data Record to know what
    information the list contains. On the other hand, since the
    basicList is essentially a wrapper around any other IE, it's not
    necessary to create new strongly-defined list IEs for each of the
    existing (and potentially all future) IEs.<br>
    <br>
    <br>
    <blockquote
cite="mid:CAJR=o+HycZ6nwgs_bB0pcJ1cwdHZXAem7EVYh2KBZWpOYx-ygw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"> Perhaps you
                  should define Y as a single instance of X (so Y is
                  well defined), then redefine X as a basicList of Y. Or
                  if you don't want/need to define both X and Y, then
                  use the basicList IE #291 to export a basicList of
                  (strongly defined) Y.<span class=""><br>
                  </span></div>
              </blockquote>
              <div>[Gerald] Yes, this is also a choice; but we don't
                need Y for any other reason except to fit into the
                basicList detail. So wanted to know if that can be
                avoided. I got my answer: No (if strongly typed
                templates).<br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    [PJ] Strongly typed templates would require a new "list of" IE for
    every existing (and future) IE that was to become a list, which is
    incredibly wasteful. <br>
    <br>
    <br>
    <blockquote
cite="mid:CAJR=o+HycZ6nwgs_bB0pcJ1cwdHZXAem7EVYh2KBZWpOYx-ygw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"><span class="">
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>
                          <div>I realize that the basicList encoding has
                            a information-element ID of the item in
                            payload -- is this mandatory?</div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </span> Yes. The encoding would not be interoperable
                  without it.<span class=""><br>
                  </span></div>
              </blockquote>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    [PJ] Here I understood the question to be whether the IE ID field
    was required in the basicList encoding - ie, it seemed that you were
    proposing a new encoding where, since X is already strong defined as
    a basicList of Y, there's no need to include Y in the export.<br>
    <br>
    <br>
    <blockquote
cite="mid:CAJR=o+HycZ6nwgs_bB0pcJ1cwdHZXAem7EVYh2KBZWpOYx-ygw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"><span class="">
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>
                          <div> Or for a strongly typed item X, we could
                            expect the IPFIX parser to be aware of
                            contents (interface name) by contract?</div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </span> No. Every collector which implements RFC 6313
                  (IPFIX Structured Data) should be able to decode a
                  basicList of Y. However, the mechanism which you
                  propose requires the collector to have special
                  knowledge of the internals of X, which is not
                  scalable. In short, such an Exporter would not be
                  interoperable with all Collectors.<br>
                </div>
              </blockquote>
              <div>[Gerald] X is not a different encoding. X is a
                basicList (sort of more strongly typed. ie., X is a
                basicList of Y). So the encoding is just the same as
                #291 standard basicList. But when the template declares
                a element as X, it is clearly typed even without having
                to look into the data (or it also doesn't let the
                exporter send X of Z on the same template).<br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    [PJ] What you're proposing is possible and may be useful in some
    circumstances. For example, for the MIB export draft, we've defined
    new IEs (#443, #444) which are subTemplateLists, in order to give
    strong typing information because the IE contains a row from a
    table.<br>
    <br>
    (See
    <a class="moz-txt-link-freetext" href="https://tools.ietf.org/html/draft-ietf-ipfix-mib-variable-export-10">https://tools.ietf.org/html/draft-ietf-ipfix-mib-variable-export-10</a>
    and <a class="moz-txt-link-freetext" href="http://www.iana.org/assignments/ipfix/ipfix.xhtml">http://www.iana.org/assignments/ipfix/ipfix.xhtml</a>)<br>
    <br>
    P.<br>
    <br>
    <blockquote
cite="mid:CAJR=o+HycZ6nwgs_bB0pcJ1cwdHZXAem7EVYh2KBZWpOYx-ygw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"> <span class=""><br>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>
                          <div>Pls let me know if my question is
                            unclear.<br>
                          </div>
                          <div><br>
                          </div>
                          Thanks in advance.<br>
                        </div>
                        - Gerald Naveen<br>
                      </div>
                    </blockquote>
                    <br>
                    <br>
                  </span> The custom IE which you've defined must
                  contain meta-data about the list such as an element
                  count, element lengths, delimiters or separators. It
                  creates a new way of encoding list information which
                  the collector must also understand in addtion to the
                  basicList encoding, which is not useful. In short, you
                  should not create list type elements; instead, use the
                  basicList mechanism.<br>
                </div>
              </blockquote>
              <div>[Gerald] Agree. We aren't trying to redefine
                basicList encoding for sure. <br>
              </div>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"> <br>
                  <blockquote type="cite"> <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
IPFIX mailing list
<a moz-do-not-send="true" href="mailto:[email protected]" target="_blank">[email protected]</a>
<a moz-do-not-send="true" href="https://www.ietf.org/mailman/listinfo/ipfix" target="_blank">https://www.ietf.org/mailman/listinfo/ipfix</a>
</pre>
                  </blockquote>
                  <br>
                </div>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------010306040702000802010805--


--===============6806426357599815689==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
IPFIX mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/ipfix

--===============6806426357599815689==--