Re: [Lsr] Enhancements on encoding of router IDs and DR IDs

Peter Psenak <ppsenak@cisco.com> Fri, 24 May 2019 09:36 UTC

Return-Path: <ppsenak@cisco.com>
X-Original-To: lsr@ietfa.amsl.com
Delivered-To: lsr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C135C120155 for <lsr@ietfa.amsl.com>; Fri, 24 May 2019 02:36:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Level:
X-Spam-Status: No, score=-14.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 26PzaNaq5we5 for <lsr@ietfa.amsl.com>; Fri, 24 May 2019 02:36:03 -0700 (PDT)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A466212008D for <lsr@ietf.org>; Fri, 24 May 2019 02:36:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7173; q=dns/txt; s=iport; t=1558690562; x=1559900162; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=6OY+b7byBjs+kMdx0kInVQ8ngFgFBte5tPXakcrEihA=; b=ixUVmf+wuw1yj9vcxsqvxcfs6tiKO6uzLBCn05daeN0sKSSKv4XlmJO2 iqOTIMxXanDvN2NueILlClPiHCJLiJIav9VNTAo/0wMk5H9GvQ5QhU0mw NdfaY2UQh1sbbzu1v6x4dp6iMJSfmf7eC4y1tQUkaIQebHMfMnpidXVCF Y=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0A6AAAfuudc/xbLJq1mHAEBAQQBAQc?= =?us-ascii?q?EAQGBUgYBAQsBgWGBGFEBMiiNDotwLZhXgXsJAQEBDhgLDAEBhEACgl81CA4?= =?us-ascii?q?BAwEBBAEBAgEEbRwMhUsBAQEDAQE2NhsLDgouJzAGAQwGAgEBgx4BggoPpwu?= =?us-ascii?q?FR4MtgUAGgTQBi2iBQD+BOII9Lj6CYQEBgWGFYgSTVZRuCYIPghKQdwYbjFa?= =?us-ascii?q?JZYxnlg6BUAE2gVczGggbFTuCbIIYGohhhUE9AzCOWwEB?=
X-IronPort-AV: E=Sophos;i="5.60,506,1549929600"; d="scan'208";a="12401943"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 24 May 2019 09:35:58 +0000
Received: from [10.147.24.41] ([10.147.24.41]) by aer-core-2.cisco.com (8.15.2/8.15.2) with ESMTP id x4O9ZvWS017555; Fri, 24 May 2019 09:35:58 GMT
To: Huaimo Chen <hchen@futurewei.com>, Tony Li <tony.li@tony.li>, "lsr@ietf.org" <lsr@ietf.org>
References: <MN2PR13MB34708672AA4CC7BB2AF61269A3010@MN2PR13MB3470.namprd13.prod.outlook.com>
From: Peter Psenak <ppsenak@cisco.com>
Message-ID: <20066aa5-f45b-26a9-3ae5-fbc9af16931d@cisco.com>
Date: Fri, 24 May 2019 11:35:57 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <MN2PR13MB34708672AA4CC7BB2AF61269A3010@MN2PR13MB3470.namprd13.prod.outlook.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Outbound-SMTP-Client: 10.147.24.41, [10.147.24.41]
X-Outbound-Node: aer-core-2.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/lsr/HCQyGvhCprFDu-neKWxkhXdXNZQ>
Subject: Re: [Lsr] Enhancements on encoding of router IDs and DR IDs
X-BeenThere: lsr@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Link State Routing Working Group <lsr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lsr>, <mailto:lsr-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lsr/>
List-Post: <mailto:lsr@ietf.org>
List-Help: <mailto:lsr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lsr>, <mailto:lsr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 24 May 2019 09:36:06 -0000

Hi Huaimo,

thanks for the suggestion, I think it's good one to include.

One side effect of your proposal is that when the new ID or DR ID is 
inserted, it may cause other IDs/DR IDs to change their index, as you 
can not assume you can simply add to the end of the list anymore.

thanks,
Peter


On 23/05/2019 20:47 , Huaimo Chen wrote:
> Hi Tony,
>
>
>     Enhancements on encoding the IDs are described below for
> discussions.  A .pdf file is attached in the case that the formats below
> are messed up.
>
>
> Currently for OSPFv2, OSPFv2 Area Router IDs TLVs are used to represent
> a sequence of router IDs or DR IDs (addresses). Each of IDs is encoded
> as an OSPFv2 Router IDs TLV Entry of 8 bytes.
>
>         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
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>        |  Conn Type    |                Reserved                       |
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>        |     Originating Router ID/DR Address (4 bytes)                |
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>                      (Current) OSPFv2 Router IDs TLV Entry
>
>
>
> To represent N router IDs or DR addresses, we need N entries, which
> occupies 8*N bytes in the OSPFv2 Area Router IDs TLVs.  Each entry
> represents just only one router ID or DR address.
>
>
>
> An enhancement below is to allow one entry to represent a number of
> router IDs or a number of DR addresses. This can be achieved by using
> two bytes of the Reserved field to indicate the number M of router IDs
> or a number of DR addresses contained in the entry.  The value of the
> two bytes can be the number of IDs/Addresses (i.e., M) or the number of
> octets used (i.e., 4*M). The former is preferred.
>
>
>
>         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
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>        |  Conn Type    |      NumberOfIDs (M)          |   Reserved    |
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>        |   1st Originating Router ID/DR Address (4 bytes)              |
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>        |   2nd Originating Router ID/DR Address (4 bytes)              |
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>        |                                                               |
>
>        ~    . . . . . .                                                ~
>
>        |                                                               |
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>        |   M-th Originating Router ID/DR Address (4 bytes)             |
>
>        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>                       (Enhanced) OSPFv2 Router IDs TLV Entry
>
>
>
> To represent N router IDs or N DR addresses using the enhanced entry, we
> need just one or a few entries. Using X entries occupies 4*(N + X) bytes
> in the OSPFv2 Area Router IDs TLVs.
>
>
>
> Consider the case where there are 1000 routers in an area. To represent
> 1000 router IDs,
>
> Using the current OSPFv2 Router IDs TLV Entries occupies 8*1000 = 8000
> bytes;
>
> Using the enhanced OSPFv2 Router IDs TLV Entries occupies 4*(1000 + 1) =
> 4004 bytes.
>
> 8000/4004 = 1..998. The saving on space is about 50% in this case.
>
>
>
> Similarly for OSPFv3, OSPFv3 Area Router IDs TLVs are used to represent
> a sequence of router IDs or DR IDs. Each of router IDs is encoded as an
> OSPFv3 Router IDs TLV Entry of 8 bytes.  Each of DR IDs is encoded as an
> OSPFv3 Router IDs TLV Entry of 12 bytes.
>
>
>
>        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
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |  Conn Type    |          Reserved                             |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |    Originating Router ID (always present)                     |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |    Interface ID (present for DRs)                             |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>                      (Current) OSPFv3 Router IDs TLV Entry
>
>
>
> An enhancement below is to allow one entry to represent a number of
> router IDs or a number of DR IDs. This can be achieved by using two
> bytes of the Reserved field to indicate the number M of router IDs or a
> number of DR IDs contained in the entry.  The value of the two bytes can
> be the number of IDs (i.e., M) or the number of octets used (i.e., 4*M
> for M router IDs or 8*M for M DR IDs). The former is preferred.
>
>
>
>        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
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |  Conn Type    |      NumberOfIDs (M)          |   Reserved    |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |  1st  Originating Router ID (always present)                  |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |  1st  Interface ID (present for DRs)                          |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |  2nd  Originating Router ID (always present)                  |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |  2nd  Interface ID (present for DRs)                          |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |                                                               |
>
>       ~    . . . . .. .                                                ~
>
>       |                                                               |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |  M-th  Originating Router ID (always present)                 |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>       |  M-th  Interface ID (present for DRs)                         |
>
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>                      (Enhanced) OSPFv3 Router IDs TLV Entry
>
>
>
>
> Best Regards,
>
> Huaimo
>
>
>
> _______________________________________________
> Lsr mailing list
> Lsr@ietf.org
> https://www.ietf.org/mailman/listinfo/lsr
>