Subject: Re: [Idr] RFC7752 : Decoding clarification of BGP-LS Link Protection Type TLV (1093) for OSPFv2

From: "Adrian Farrel" <[email-masked]>
Date: Thu, 6 Oct 2016 23:25:58 +0100

Sorry that I lost this in the blizzard of emails on large communities.
Thanks for stepping up to answer, Jakob.
 
I agree with Jakob that all the relevant link protection type data from OSPF fits into the field. The extra reserved bytes are simply padding and can be ignored (unless you are using them as a covert channel ;-)
 
Cheers,
Adrian
 
From: Idr [mailto:[email-masked]] On Behalf Of Jakob Heitz (jheitz)
Sent: 24 September 2016 22:09
To: Mamud Hasan; [email-masked]
Subject: Re: [Idr] RFC7752 : Decoding clarification of BGP-LS Link Protection Type TLV (1093) for OSPFv2
 
It is formatted according to the ISIS formatting, that is 2 octets.
You will need to make OSPF conform by truncating the excess octets.
 
Thanks,
Jakob.
 
From: Idr [mailto:[email-masked]] On Behalf Of Mamud Hasan
Sent: Saturday, September 24, 2016 10:12 AM
To: [email-masked]
Subject: [Idr] RFC7752 : Decoding clarification of BGP-LS Link Protection Type TLV (1093) for OSPFv2
 
Hi,
This is regarding doubt about decoding of BGP-LS "Link Protection Type TLV (1093)" for carrying OSPFv2 Link Protection Type value.
 
According to this RFC7752,
3.3.2.  Link Attribute TLVs
   Link Attribute TLVs are TLVs that may be encoded in the BGP-LS
   attribute with a Link NLRI.  Each 'Link Attribute' is a Type/Length/
   Value (TLV) triplet formatted as defined in Section 3.1.  The format
   and semantics of the Value fields in some Link Attribute TLVs
   correspond to the format and semantics of the Value fields in IS-IS
   Extended IS Reachability sub-TLVs, defined in [RFC5305] and
   [RFC5307].  Other Link Attribute TLVs are defined in this document.
   Although the encodings for Link Attribute TLVs were originally
   defined for IS-IS, the TLVs can carry data sourced by either IS-IS or
   OSPF.
 
BGP-LS Link Protection Type TLV
+++++++++++++++++++++++++++++++++++
   +-----------+---------------------+--------------+------------------------------+
   |  TLV Code | Description         |  IS-IS TLV     | Reference            |
   |   Point       |                               |   /Sub-TLV   | (RFC/Section)      |
   +-----------+---------------------+--------------+-------------------------------+
   |1093       | Link Protection     |    22/20     | [RFC5307]/1.2         |
   |                 | Type                      |                    |                                    |
   ------------------------------------------------------------------------------------
We can see above that For BGP-LS Link Protection Type (1093), it follows references of ISIS (RFC 5307) only. But Link Protection decoding for ISIS and OSPF is not same (as shown below). For OSPFv2 there are extra 3 octet reserved field.
 
ISIS Link Protection Type Decoding: (rfc5307)
+++++++++++++++++++++++++++++++++++
   0                   1
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |Protection Cap |    Reserved     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 OSPF Link Protection Type Decoding: (rfc4203)
+++++++++++++++++++++++++++++++++++
     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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Protection Cap |                    Reserved                                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
So my question is, what could be the coding of BGP-LS Link Protection Type TLV (1093) for OSPFv2 ? Should it consider the extra 3 octet reserved field and carry these reserved field value in this TLV ?
I will be grateful if receive response. 
 
Thanks,
Mamud

---

From: Mamud Hasan <[email-masked]>
Date: Fri, 7 Oct 2016 09:41:00 +0530

Thanks Jakob, Adrian for clarification.

Thanks,
Mamud

On Fri, Oct 7, 2016 at 3:55 AM, Adrian Farrel <[email-masked]> wrote:

> I agree with Jakob that all the relevant link protection type data from
> OSPF fits into the field. The extra reserved bytes are simply padding and
> can be ignored (unless you are using them as a covert channel ;-)
>
>
>
> Cheers,
>
> Adrian
>
>
>
> *From:* Idr [mailto:[email-masked]] *On Behalf Of *Jakob Heitz
> (jheitz)
> *Sent:* 24 September 2016 22:09
> *To:* Mamud Hasan; [email-masked]
> *Subject:* Re: [Idr] RFC7752 : Decoding clarification of BGP-LS Link
> Protection Type TLV (1093) for OSPFv2
>
>
>
> *From:* Idr [mailto:[email-masked]] *On Behalf Of *Mamud Hasan
> *Sent:* Saturday, September 24, 2016 10:12 AM
> *To:* [email-masked]
> *Subject:* [Idr] RFC7752 : Decoding clarification of BGP-LS Link
> Protection Type TLV (1093) for OSPFv2
>
>
>
> Hi,
>
> This is regarding doubt about decoding of BGP-LS "Link Protection Type
> TLV (1093)" for carrying OSPFv2 Link Protection Type value.
>
>
>
> *According to this RFC7752,*
>
>    [RFC5307].  *Other Link Attribute TLVs are defined in this document.*
>
> *   Although the encodings for Link Attribute TLVs were originally*
>
> *   defined for IS-IS, the TLVs can carry data sourced by either IS-IS or*
>
> *   OSPF.*
>
>
>
> We can see above that For BGP-LS Link Protection Type (1093), it follows references of *ISIS (RFC 5307) only*. But Link Protection decoding for ISIS and OSPF is not same (as shown below). For OSPFv2 there are extra 3 octet reserved field.
>
>
>

---

From: "Acee Lindem (acee)" <[email-masked]>
Date: Fri, 7 Oct 2016 13:59:47 +0000

One of the objectives of BGP-LS is to provide a normalized representation of the IGP link-state information independent of whether the origin is OSPF or IS-IS. For the most part, we’ve succeeded.
Thanks,
Acee

From: Idr <[email-masked]<mailto:[email-masked]>> on behalf of Adrian Farrel <[email-masked]<mailto:[email-masked]>>
Reply-To: Adrian Farrel <[email-masked]<mailto:[email-masked]>>
Date: Thursday, October 6, 2016 at 3:25 PM
To: "Jakob Heitz (jheitz)" <[email-masked]<mailto:[email-masked]>>, 'Mamud Hasan' <[email-masked]<mailto:[email-masked]>>, IDR List <[email-masked]<mailto:[email-masked]>>
Subject: Re: [Idr] RFC7752 : Decoding clarification of BGP-LS Link Protection Type TLV (1093) for OSPFv2

Cheers,
Adrian

From: Idr [mailto:[email-masked]] On Behalf Of Jakob Heitz (jheitz)
Sent: 24 September 2016 22:09
To: Mamud Hasan; [email-masked]<mailto:[email-masked]>
Subject: Re: [Idr] RFC7752 : Decoding clarification of BGP-LS Link Protection Type TLV (1093) for OSPFv2

Thanks,
Jakob.

From: Idr [mailto:[email-masked]] On Behalf Of Mamud Hasan
Sent: Saturday, September 24, 2016 10:12 AM
To: [email-masked]<mailto:[email-masked]>
Subject: [Idr] RFC7752 : Decoding clarification of BGP-LS Link Protection Type TLV (1093) for OSPFv2

Hi,

   OSPF.

   |                 | Type                      |                    |                                    |

   0                   1

     0                       1                                 2                                3

Thanks,

Mamud