Re: [trill] Order of bits in TRILL bitmaps
Petr Hroudný <petr.hroudny@gmail.com> Thu, 21 August 2014 11:38 UTC
Return-Path: <petr.hroudny@gmail.com>
X-Original-To: trill@ietfa.amsl.com
Delivered-To: trill@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 236461A0197 for <trill@ietfa.amsl.com>; Thu, 21 Aug 2014 04:38:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.699
X-Spam-Level:
X-Spam-Status: No, score=-1.699 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, MIME_8BIT_HEADER=0.3, SPF_PASS=-0.001] autolearn=no
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 QariJq1yLfOq for <trill@ietfa.amsl.com>; Thu, 21 Aug 2014 04:38:46 -0700 (PDT)
Received: from mail-we0-x229.google.com (mail-we0-x229.google.com [IPv6:2a00:1450:400c:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9EE531A00D7 for <trill@ietf.org>; Thu, 21 Aug 2014 04:38:45 -0700 (PDT)
Received: by mail-we0-f169.google.com with SMTP id u56so9143921wes.14 for <trill@ietf.org>; Thu, 21 Aug 2014 04:38:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zwiisgU1zdfdYviT+5JBnQc+HOhK0suZN4ZV6a0W7r4=; b=srxFnE1eryoh7HAGisJYt42+k7vs0sTURbv2x5e3xrKtlASHP1V/Buz8MCdfrV88N4 QecpE3gQw8v1FAjzOCgTy9YnDasIVwCGqsWenT/u3Hrh35dGvrCUJzVl1captPSv1WCJ vYiTVK9gAB9CDVhgkgbG4WQ9l9Bk17krE0r/bmKxYD3+kUUXK4dYH5kxYKZH7/Smoc1H mvPuFptNKIsWMa3KETp/iDFpmb7FQacl0WmA8ZaiBTffrvGWe7EUespinFjRU5vRF2m/ RDXyqIooJWKk+Yh97dl/Y4Jiod49+lce66v9XndOcgnYMRLKkP0V69WXp3gjpU+dxfBc ed+g==
MIME-Version: 1.0
X-Received: by 10.180.96.33 with SMTP id dp1mr4075303wib.20.1408621124200; Thu, 21 Aug 2014 04:38:44 -0700 (PDT)
Received: by 10.180.21.101 with HTTP; Thu, 21 Aug 2014 04:38:44 -0700 (PDT)
In-Reply-To: <4552F0907735844E9204A62BBDD325E76AAAE6BB@nkgeml512-mbx.china.huawei.com>
References: <CANi4_5fGtOVvC0nwqdoWXEv5AraQR_UY4NmYuaUYvpt5xjvQyQ@mail.gmail.com> <4552F0907735844E9204A62BBDD325E76AAAE6BB@nkgeml512-mbx.china.huawei.com>
Date: Thu, 21 Aug 2014 13:38:44 +0200
Message-ID: <CANi4_5fhMfUKLhuAy5gqe4jguBiw8DNYW=yL+LgFLpk=CPAuAA@mail.gmail.com>
From: Petr Hroudný <petr.hroudny@gmail.com>
To: Mingui Zhang <zhangmingui@huawei.com>
Content-Type: multipart/alternative; boundary="f46d044481cdbb309f05012229a2"
Archived-At: http://mailarchive.ietf.org/arch/msg/trill/Rdy7QYg-01fgWMj7KDFMkPCV43I
Cc: "trill@ietf.org" <trill@ietf.org>
Subject: Re: [trill] Order of bits in TRILL bitmaps
X-BeenThere: trill@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Developing a hybrid router/bridge." <trill.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/trill>, <mailto:trill-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/trill/>
List-Post: <mailto:trill@ietf.org>
List-Help: <mailto:trill-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/trill>, <mailto:trill-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Aug 2014 11:38:48 -0000
Hi Mingui, thanks for your answer. I forgot to mention that I'm looking at ISIS packets on the wire using tcpdump. Here are the raw captures: TRILL-Version SubTLV: 0d 05 01 00 00 00 40 So the capabilities bitmap is probably byte-wise reversed here? Enabled-VLANs SubTLV: 02 03 00 0a 01 - only VLAN 10 enabled Enabled-VLANs SubTLV: 02 03 00 01 0b - VLANs 1,2 and 4 enabled Regarding the Enabled-VLANs: as the bitmap has to be at least 1 byte long, the RBridge needs to fill at least 8 bits in the bitmap, right? So if the highest-order bit is the left most bit, the last byte of the SubTLV should be: 10000000 -> 0x80 with only VLAN 10 enabled 11010000 -> 0xD0 with VLANs 1,2 and 4 enabled The actual values seen on the wire have the highest-order bit in the right most bit, so we see 0x01 and 0x0b in the SubTLV. Which order is the correct one? Thanks, Petr 2014-08-21 10:20 GMT+02:00 Mingui Zhang <zhangmingui@huawei.com>: > Hi Petr, > > This is an interesting issue! > > For the second two, > > from the figures in sections 2.2.4 & 2.3.1, we can see the bit Vector is > encoded as the Most Significant Bit is the right most bit. So, the right > value for FGL-safe is 0x40, 0x00, 0x00, 0x00. (It's strange that the > implementation does not read as 0x00 0x00 0x00 0x02.) > > For the first two, > > In the RFC, the bitmap is defined to have a variable length. If only the > start VLAN ID is enabled, the bitmap always reads as 0x1 no matter it is > encoded as the Most Significant Bit is the right most bit or the left most > bit. So this example doesn't tell the difference. Let me use another > example: suppose we need to encode a VLAN list 1, 2, 4. There are two > possibilities: > 1. If the highest-order bit is the left most bit, we have 1101->0xD > 2. If the highest-order bit is the right most bit, we have 1011->0xB > > The RFC does not explicitly point out the bitmap is encoded in a network > order, so it should be encoded by default as that the highest order is the > left most bit. So 0xD is the right answer. > > My 2 cents, > Mingui > > >-----Original Message----- > >From: trill [mailto:trill-bounces@ietf.org] On Behalf Of Petr Hroudny > >Sent: Thursday, August 21, 2014 2:38 PM > >To: trill@ietf.org > >Subject: [trill] Order of bits in TRILL bitmaps > > > >Hi all, > > > > > >I'm looking for the WG opinion about the correct order of bits in bitmaps > >specified in RFC7176 sections 2.2.2 & 2.2.5 and 2.2.4 & 2.3.1. > > > > > >For the first two, the RFC says: > > > > > > o VLAN bit-map: The highest-order bit indicates the VLAN equal to > > the start VLAN ID, the next highest bit indicates the VLAN equal > > to start VLAN ID + 1, continuing to the end of the VLAN bit-map > > field. > > > >I understand this as follows: if only the start VLAN ID is enabled, the > bitmap > >should have a value of 0x80. > >Nevertheless, I've seen an implementation, where the bitmap reads 0x01. > > > >Which one is correct? > > > > > >For the second two, the RFC says: > > > > o Capabilities and Header Flags Supported: A bit vector of 32 bits > > numbered 0 through 31 in network order. > > > >I understand this as follows: if I want to set the FGL-safe bit (bit 1), > the bitmap > >should read 0x40 0x00 0x00 0x00. > > > >Nevertheless, I've seen an implementation, where the bitmap reads 0x00, > 0x00, > >0x00, 0x40 > > > >Which one is correct? > > > > > >As this might create a serious interop issues, I'm seeking for WG opinion > on this. > > > > > > Thanks, Petr > > > > > >
- [trill] Order of bits in TRILL bitmaps Petr Hroudný
- Re: [trill] Order of bits in TRILL bitmaps Mingui Zhang
- Re: [trill] Order of bits in TRILL bitmaps Petr Hroudný
- Re: [trill] Order of bits in TRILL bitmaps Tissa Senevirathne (tsenevir)
- Re: [trill] Order of bits in TRILL bitmaps Donald Eastlake
- Re: [trill] Order of bits in TRILL bitmaps Mingui Zhang