Subject: [mpls] Doubt on PW info. length format

From: venkatesan mahalingam <[email-masked]>
Date: Sun, 19 Apr 2009 01:32:08 +0530

Hi All,Please help me in understanding the encoding of Gen FEC Id element,
PW info length is one byte length in FEC element format.
As per RFC-4447 standard, we need to store the length of AGI, SAII and
TAII length into this one byte PW info length.

If all are max length say 255.
then we are getting (255+255+255) => 765.
How can we accomadate this value in one byte length PW info length field?

For your reference I've attached the RFC contents,

5.3.2.  Encoding the Generalized ID FEC Element
   FEC element type 0x81 is used.  The FEC element is encoded as
   follows:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Gen PWid (0x81)|C|         PW Type             |PW info Length |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   AGI Type    |    Length     |      Value                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~                    AGI  Value (contd.)                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   AII Type    |    Length     |      Value                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~                   SAII  Value (contd.)                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   AII Type    |    Length     |      Value                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~                   TAII Value (contd.)                         ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This document does not specify the AII and AGI type field values;
   specification of the type field values to be used for a particular
   application is part of the specification of that application.  IANA
   has assigned these values using the method defined in the [IANA
<http://tools.ietf.org/html/rfc4447#ref-IANA>]
   document.

   The SAII, TAII, and AGI are simply carried as octet strings.  The
   length byte specifies the size of the Value field.  The null string
   can be sent by setting the length byte to 0.  If a particular
   application does not need all three of these sub-elements, it MUST
   send all the sub-elements but set the length to 0 for the unused
   sub-elements.

   The PW information length field contains the *length of the SAII,
   TAII, and AGI, combined in octets*.  If this value is 0, then it
   references all PWs using the specified grouping ID.  In this case,
   there are no other FEC element fields (AGI, SAII, etc.) present, nor
   any interface parameters TLVs.

---

From: "Shah, Himanshu" <[email-masked]>
Date: Sun, 19 Apr 2009 18:58:08 -0400

cumulative should not exceed 255.

AGI and AII max lengths are restricted by their respective
types which has to be approved by expert review and registered by IANA. 

Check out http://www.iana.org/assignments/pwe3-parameters

So far max AII len is 35 for AII type 4 and max AGI len is 8.

hope this helps..
himanshu

-----Original Message-----
From: [email-masked] on behalf of venkatesan mahalingam
Sent: Sat 4/18/2009 4:02 PM
To: [email-masked]; [email-masked]; [email-masked]
Subject: Doubt on PW info. length format

    0                   1                   2                   3