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

Huaimo Chen <hchen@futurewei.com> Thu, 23 May 2019 18:47 UTC

Return-Path: <hchen@futurewei.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 101E11200EA for <lsr@ietfa.amsl.com>; Thu, 23 May 2019 11:47:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=futurewei.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 pH3QaoQ-TH_o for <lsr@ietfa.amsl.com>; Thu, 23 May 2019 11:47:09 -0700 (PDT)
Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-eopbgr780107.outbound.protection.outlook.com [40.107.78.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7B5F21200CC for <lsr@ietf.org>; Thu, 23 May 2019 11:47:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Futurewei.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GwO60uYzigv8CRdZuBwqzejAn1MmL2C5YgRu8zwyPS4=; b=VbdlBenZYp56hOyEqbF38HMO52xZmvlTL7ptnF5Z9Ckz4HN7dQXSuPXSpqLBGMXn8oj0jjj2AB9ytUTBjZUQyZQrBAEZ9oNahnySr5BJztCd/0Ewe0VdOW8Ix1qSJPCndfuqAeaCJj/VoM9GvUncHjb0BxcxK84/oAJbSJuEP9w=
Received: from MN2PR13MB3470.namprd13.prod.outlook.com (10.255.237.83) by MN2PR13MB3150.namprd13.prod.outlook.com (20.179.150.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.10; Thu, 23 May 2019 18:47:06 +0000
Received: from MN2PR13MB3470.namprd13.prod.outlook.com ([fe80::2528:ed2a:12eb:38df]) by MN2PR13MB3470.namprd13.prod.outlook.com ([fe80::2528:ed2a:12eb:38df%4]) with mapi id 15.20.1922.016; Thu, 23 May 2019 18:47:06 +0000
From: Huaimo Chen <hchen@futurewei.com>
To: Tony Li <tony.li@tony.li>, "lsr@ietf.org" <lsr@ietf.org>
Thread-Topic: Enhancements on encoding of router IDs and DR IDs
Thread-Index: AQHVEZagizwHqkR6U0+FYJpmt4hA+Q==
Date: Thu, 23 May 2019 18:47:06 +0000
Message-ID: <MN2PR13MB34708672AA4CC7BB2AF61269A3010@MN2PR13MB3470.namprd13.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=hchen@futurewei.com;
x-originating-ip: [206.16.17.232]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 1e1a2daf-8068-4b12-5583-08d6dfaf0ddb
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(49563074)(7193020); SRVR:MN2PR13MB3150;
x-ms-traffictypediagnostic: MN2PR13MB3150:
x-microsoft-antispam-prvs: <MN2PR13MB3150CB74DD4868E6964AA53FA3010@MN2PR13MB3150.namprd13.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 00462943DE
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(346002)(396003)(39850400004)(376002)(366004)(189003)(199004)(5024004)(86362001)(3846002)(14454004)(8676002)(52536014)(6116002)(6506007)(76116006)(73956011)(66616009)(476003)(53936002)(256004)(6606003)(508600001)(99286004)(66066001)(81166006)(5660300002)(81156014)(66946007)(2501003)(102836004)(74316002)(53946003)(66476007)(7736002)(316002)(6436002)(64756008)(66446008)(25786009)(19627405001)(9686003)(33656002)(66556008)(99936001)(66574012)(7696005)(186003)(54896002)(68736007)(26005)(8936002)(55016002)(486006)(91956017)(71200400001)(71190400001)(2906002)(110136005); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR13MB3150; H:MN2PR13MB3470.namprd13.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: futurewei.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: PZM3wHfXkAryQtb5idgnVcHOsEUBgPFQbIrAMepBIGU+2H9GWipeeqppxLLFYLk906pICzFXEPer0xNkw6W9jQK3AVA3YtBsCmd5Ujbl9WZAYg4cVFPpNzw9DaUezcDUwkqqY9B/rlASczMcvC/cmZi6zc0JEU2SWGMW5oqpxtDYeTyK6t0MuFvfDocTZRZpSYOUlVDy1nZp54AzgTYN/eMitDAVlIvpgo9qt2bA9V5lauzTj0KJQFivo7Sdx2SIbYFZqnz2e8rk8VQKQ9wQdv3kjg0C/1scANndXn5jnlopTr1nLl95Qd8UbKEFoyqO58wosP45L0UK1EkldxXURt4b+TB++jZ/SSq+gKyqpuN2W14vMG9nFaUcun86CJBVNeL7FwO70WF+SITO/kbTX0RAAf2byL4tFgNbPVwTUXg=
Content-Type: multipart/mixed; boundary="_004_MN2PR13MB34708672AA4CC7BB2AF61269A3010MN2PR13MB3470namp_"
MIME-Version: 1.0
X-OriginatorOrg: Futurewei.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 1e1a2daf-8068-4b12-5583-08d6dfaf0ddb
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2019 18:47:06.3442 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 0fee8ff2-a3b2-4018-9c75-3a1d5591fedc
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: hchen@futurewei.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3150
Archived-At: <https://mailarchive.ietf.org/arch/msg/lsr/wodemnKrT1wjf-qy4MhaOsInmQM>
Subject: [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: Thu, 23 May 2019 18:47:13 -0000

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