Re: [mpls] Label encoding in LDP

Ramakrishna Rao Desetti <ramakrishnadtv@gmail.com> Fri, 21 June 2019 11:50 UTC

Return-Path: <ramakrishnadtv@gmail.com>
X-Original-To: mpls@ietfa.amsl.com
Delivered-To: mpls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4F39D12016B for <mpls@ietfa.amsl.com>; Fri, 21 Jun 2019 04:50:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LECnb6rQQ5BE for <mpls@ietfa.amsl.com>; Fri, 21 Jun 2019 04:50:44 -0700 (PDT)
Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AED311200D8 for <mpls@ietf.org>; Fri, 21 Jun 2019 04:50:44 -0700 (PDT)
Received: by mail-oi1-x236.google.com with SMTP id w7so4448113oic.3 for <mpls@ietf.org>; Fri, 21 Jun 2019 04:50:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=l41TMB/NhJC1rbEh/2sghyC9zRY51mHW6yQuAvGrDkw=; b=uauD3KuKnjvcrX07k8mIC3ryMB0ufAsKVF/OYcZWCeAkldK3aw7RyH34CFdC/VNKbL ZE4CgPNmuwPsF4NKijwTJGprd9MdXgEygMLcLgQnbJrBls2MBzKIq4vrIHjVI9MUxZFM umFqvzNHGueqbILhQOvgZ7SVJQZHlEzDGvPDKNDRXXcZzjjceWnEkJTcQyDmX9DQSVed VOiRVj5I5Y/sw0uvijyQr3hAfAw4fe+cF1h+gjSEaMXyTDOwUpg8Mt9qgdnxU5L0QZg+ 6avjZZAFPC9yJflQBDN2sbnkAkKc7d9HFZ+Ac/EROi3KxLZvbtJIImkBmstNGXhKXS0V pO/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=l41TMB/NhJC1rbEh/2sghyC9zRY51mHW6yQuAvGrDkw=; b=ajK32odDPbgJThrY20nSUyXkdo7fkC0n0MdUUsOwRV5eQx0N/+/XuF7yw6yMqXziWZ 2KpUFVDhuldQ22pUpVvR4IV4hyreXMtMAP3kJzw06gjywY8EgG4LpEeFnWpGiUTsTnW8 x5VJXSROpttjGfHwLKhOI7iRkofPoaFvfXS1RZGyA+A7wZcbYyEvaaT2dsPSBm1II9sG 0L4S32CEnDPoelwF0bLxqYiLpuyn1gpmLVp6x7jBKzRzs6pl+cDhuqJ110T4zEEvKJlG ukwsr4CeJRPZmEqWXF2SUePlR/vYRHWqJU1j7stjG6CzL7xMdSJ4GGOdmxlo+8KfHJUS F02A==
X-Gm-Message-State: APjAAAWyNU2ZsF6FBVULTpyL7kLDE93U7o5S/DFCcn25NjO6nxuq5led QO3McCdwoIwWRLxP28gSd0EPkvjsMQ01yfPYGrQ=
X-Google-Smtp-Source: APXvYqwlBEzNmkasf3/wSyiI/Kn3Adh3i4au9f/rS/3Z5SXM/3nsuddaz8Ol6PjJyHVHFWgbo/07QGEUDFU70oMMvl8=
X-Received: by 2002:aca:ac4d:: with SMTP id v74mr2313985oie.66.1561117844058; Fri, 21 Jun 2019 04:50:44 -0700 (PDT)
MIME-Version: 1.0
References: <CAEh1p17W5V=VZHvHdxYEN8x1dYVXdKCTNuDyEuhDND0bNJEL0A@mail.gmail.com> <81DCFE10-1966-4DD0-B6A2-FC199D6478A6@gmail.com>
In-Reply-To: <81DCFE10-1966-4DD0-B6A2-FC199D6478A6@gmail.com>
From: Ramakrishna Rao Desetti <ramakrishnadtv@gmail.com>
Date: Fri, 21 Jun 2019 17:20:32 +0530
Message-ID: <CAEh1p15S8WD_f1e4pQzRNh1W88sZQifo+_2wfXhzzDLFwhpZew@mail.gmail.com>
To: Alexander Okonnikov <alexander.okonnikov@gmail.com>, mpls@ietf.org
Content-Type: multipart/alternative; boundary="0000000000008c345b058bd4122c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/mpls/_l7dEy8Zn8STOjhe4Uip8sStHHs>
X-Mailman-Approved-At: Fri, 21 Jun 2019 09:04:13 -0700
Subject: Re: [mpls] Label encoding in LDP
X-BeenThere: mpls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Multi-Protocol Label Switching WG <mpls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mpls>, <mailto:mpls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mpls/>
List-Post: <mailto:mpls@ietf.org>
List-Help: <mailto:mpls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mpls>, <mailto:mpls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Jun 2019 11:50:47 -0000

Hi Alexander,

My impression is that RFC 5036 and RFC 3036 do not differ in terms of
intended label encoding.
However, RFC 5036 does add more material to clarify the intended encoding.

Thanks,
Ramakrishna.

On Thu, Jun 20, 2019 at 9:30 PM Alexander Okonnikov <
alexander.okonnikov@gmail.com> wrote:

> Hi Ramakrishna,
>
> It seems that many of implementations follow RFC 3036 in part of General
> Label TLV encoding, while claim support of RFC 5036. RFC 5036 specifies
> another format of encoding, as you mentioned, though it doesn't notice that
> difference in section 7.
>
> 20 июня 2019 г., в 13:45, Ramakrishna Rao Desetti <
> ramakrishnadtv@gmail.com> написал(а):
>
> Hi,
>
> I request a clarification on label encoding in LDP.
> The reason is it appears implementations do not seem to follow what is
> specified
> in the LDP standard.
>
> I have reproduced the relevant text from RFC 5036:
>
> "
> 3.4.2.1.  Generic Label TLV
>
>    An LSR uses Generic Label TLVs to encode labels for use on links for
>    which label values are independent of the underlying link technology.
>    Examples of such links are PPP and Ethernet.
>
>     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
>    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>    |0|0| Generic Label (0x0200)    |      Length                   |
>    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>    |     Label                                                     |
>    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>    Label
>       This is a 20-bit label value represented as a 20-bit number in a 4
>       octet field 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
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |     Label                             |                       |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       For further information, see [RFC3032].
> "
>
> I have tested with 3 systems: Netbsd, wireshark, and a popular commercial
> vendor.
>
> In all these cases, the label is encoded as shown below:
>
>    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>    |     Label                                                     |
>    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
> But from the RFC, it should be encoded as shown below:
>
>       This is a 20-bit label value represented as a 20-bit number in a 4
>       octet field 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
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |     Label                             |                       |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
> Note that these two representations are not same.
>
> For example, suppose label is 3. Then in the first representation, it is
> sent
> on the wire as:
>
> 0x00, 0x00, 0x00, 0x03.
>
> Where as, in the 2nd representation, it is sent on the wire as:
>
> 0x00, 0x00, 0x30, 0x00.
>
> Am I missing something?
>
> I request your comments.
>
> Thanks and regards,
> Ramakrishna DTV.
> _______________________________________________
> mpls mailing list
> mpls@ietf.org
> https://www.ietf.org/mailman/listinfo/mpls
>
>
>