[spring] H.Encaps pseudocode (was Re: Question about SRv6 Insert function)

"Pablo Camarillo (pcamaril)" <pcamaril@cisco.com> Fri, 20 December 2019 17:28 UTC

Return-Path: <pcamaril@cisco.com>
X-Original-To: spring@ietfa.amsl.com
Delivered-To: spring@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 688D812086F for <spring@ietfa.amsl.com>; Fri, 20 Dec 2019 09:28:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.498
X-Spam-Level:
X-Spam-Status: No, score=-14.498 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, 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 header.b=DqvkYuNZ; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=Pbg2euJh
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 4-mCDZt3IN5c for <spring@ietfa.amsl.com>; Fri, 20 Dec 2019 09:28:36 -0800 (PST)
Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 42681120856 for <spring@ietf.org>; Fri, 20 Dec 2019 09:28:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=8318; q=dns/txt; s=iport; t=1576862916; x=1578072516; h=from:to:cc:subject:date:message-id:content-id: content-transfer-encoding:mime-version; bh=4fAZv5XgBYV5n7wW3DtNBWQGZAYMCu6tlTeqPqN1dCQ=; b=DqvkYuNZS7fvwBmLORy/3HDianzpp0tgri8KOl+vUvvj39K+2hy6iqvk b1v/0XSKu28A9B3HYz49664tjSrgkHxpMk1g3I9cPIZvcQOVNI0STcUGc HiCWdCnvbtnHWFk8oNxP6bWNIMxEYfKiWgNKKansi+efgYFVedB1PMDpX E=;
IronPort-PHdr: 9a23:k8MNchOwK0jN8LV4fNYl6mtXPHoupqn0MwgJ65Eul7NJdOG58o//OFDEu6w/l0fHCIPc7f8My/HbtaztQyQh2d6AqzhDFf4ETBoZkYMTlg0kDtSCDBjjJ/fvZjY7GOxJVURu+DewNk0GUMs=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0DWCABWBP1d/5ldJa1lHQEBAQkBEQUFAYF8gU0pJwWBRCAECyoKg32DRgOKc4I6JYlejiqCUgNUCQEBAQwBAS0CAQGEQAIXggUkOBMCAw0BAQQBAQECAQUEbYU3DIVeAQEBAQITEREMAQE3AQsGARkDAQEBAwImAgQfERUICgQOBSKDAIJHAw4gAaEIAoE4iGF1gTKCfgEBBYJKgkwNC4IMCYEOKIp7gR4agUE/gTgMFIF8gQ6CG4IILRAjglYyggoijUeCcYV7mBtDCoI0jG2FBYQmG4JEh3uEQYtVkBeJKI9mAgQCBAUCDgEBBYFpIoFYcBU7KgGCQVAYDY0SDBeBBAEOgj2KU3SBKI96gTABgQ8BAQ
X-IronPort-AV: E=Sophos;i="5.69,336,1571702400"; d="scan'208";a="689220825"
Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 20 Dec 2019 17:28:35 +0000
Received: from XCH-ALN-010.cisco.com (xch-aln-010.cisco.com [173.36.7.20]) by rcdn-core-2.cisco.com (8.15.2/8.15.2) with ESMTPS id xBKHSY9J010486 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 20 Dec 2019 17:28:35 GMT
Received: from xhs-rcd-001.cisco.com (173.37.227.246) by XCH-ALN-010.cisco.com (173.36.7.20) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 20 Dec 2019 11:28:34 -0600
Received: from xhs-rtp-002.cisco.com (64.101.210.229) by xhs-rcd-001.cisco.com (173.37.227.246) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 20 Dec 2019 11:28:33 -0600
Received: from NAM10-MW2-obe.outbound.protection.outlook.com (64.101.32.56) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 20 Dec 2019 12:28:32 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FspMExaIg7xsVjIJkjXOTrVgRvC0qQsCDRyihP/MMAKSupyzGrwNFdqlSFculjHqTsQ7S3aZR8EG1Zfk2C4vuzmsnJPDgtByG40bvdTlSKk+tk4N2I46fDc57CjO9MyEwh6Ykt2CVJ+Y785yInremDqzYz16H9ozuuxQaN+cQepSPDGExogRzmn5HZmWJFHDGJ9n2ku9AgptvWlesFz2GzLA3S38XDzcFUJI+LWR/MBCF3wt909f+0PZSmb3Dx39JPaKWZ2f4rOLVkxWxUefXg8Q/+hvtHCS9BiXLKz/0DDn9M+VFrvdvSENugT2M0z/oLt7w6chYnsQiH+BYoer+A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4fAZv5XgBYV5n7wW3DtNBWQGZAYMCu6tlTeqPqN1dCQ=; b=lDYZ+j6xX3eGwdW2ahhCwx7/sKeIbz1qKV8GQajviseILlsfISTj4p84ccUxfCWV1/rnplNvI2Z0laok2sBlhxb3zUY1KcrU6TlujpupJj6CVRi6/WrYePmyjMtau1KrRoJpNQN8Zm2nBlPO9VAs7OSLNkoIzM7YnP4fZ4s/R41TZqhLkCrS2Fk7HCkNwKO4nDm2t6rdav5pzzUCBDa+y5/Y2Mm0nAeFNe3qn9/kFF3YAxo8LTKtskV/gR7J6DDQolb5xHw9AM9c6q8ZqD5kf7XDoC1K8EDn8Zow0erDORRRrjz5FRoZ6pF+fHYoWkwQa+OwuBVzzbifSrc6vs0ZWQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4fAZv5XgBYV5n7wW3DtNBWQGZAYMCu6tlTeqPqN1dCQ=; b=Pbg2euJh4om9nb+4+2OieoOCBIAzw640Amgp3iCm80ZOQRhVJ1wikKcY0aRyBSsHMapaUcOQciJfiho+ZC/Lxma2fDC9/r8WnYNYIO1dTbbbLLUcBtXQYJ2pighrZ5UpvprIgmHcKpvNqAl4Cb2oEZdbMsTPOTSIjuPrLd3LojU=
Received: from MWHPR11MB1374.namprd11.prod.outlook.com (10.169.234.8) by MWHPR11MB1597.namprd11.prod.outlook.com (10.172.54.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.15; Fri, 20 Dec 2019 17:28:31 +0000
Received: from MWHPR11MB1374.namprd11.prod.outlook.com ([fe80::b04b:c9bb:2378:7a8d]) by MWHPR11MB1374.namprd11.prod.outlook.com ([fe80::b04b:c9bb:2378:7a8d%11]) with mapi id 15.20.2559.016; Fri, 20 Dec 2019 17:28:31 +0000
From: "Pablo Camarillo (pcamaril)" <pcamaril@cisco.com>
To: Alexandre Petrescu <alexandre.petrescu@gmail.com>
CC: "spring@ietf.org" <spring@ietf.org>, "Pablo Camarillo (pcamaril)" <pcamaril@cisco.com>
Thread-Topic: H.Encaps pseudocode (was Re: [spring] Question about SRv6 Insert function)
Thread-Index: AQHVt1rm0v1w16PvuE6pPRNCSa7eGw==
Date: Fri, 20 Dec 2019 17:28:31 +0000
Message-ID: <45DDD98C-E642-4817-83EB-BB0B031C0BD0@cisco.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.20.0.191208
authentication-results: spf=none (sender IP is ) smtp.mailfrom=pcamaril@cisco.com;
x-originating-ip: [173.38.220.35]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: b24f177a-0891-4e08-5e57-08d7857208b8
x-ms-traffictypediagnostic: MWHPR11MB1597:
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <MWHPR11MB1597447FA0FAAE9FB5FFE900C92D0@MWHPR11MB1597.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 025796F161
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(136003)(376002)(346002)(39860400002)(199004)(189003)(13464003)(107886003)(2906002)(8676002)(186003)(81166006)(2616005)(71200400001)(6916009)(6486002)(66574012)(5660300002)(6506007)(86362001)(91956017)(76116006)(53546011)(4326008)(478600001)(33656002)(66946007)(66476007)(66556008)(66446008)(8936002)(54906003)(64756008)(36756003)(316002)(6512007)(81156014)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1597; H:MWHPR11MB1374.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: zFGJflEzGZrJtD15Ow+zVrJpNEksNl+e8pmPnwImOjQ3G3IiMXm+UvB30KP+qdlKeV73S5O4cfS41yQW4ggIQjDUCjIWheDIrJ9P9MFWw/SPB6pFwE19RZNICvc3zt3J+4eCDnGyIrwKfn2/F6utfcmOSHK5WEYAtN1XqwnUo/NDzVjfXb8R3ZUUyOhIMOU9N/7dFzQc7NqoTkBAK4qjtPvvE6JwjpiFnyq7iN0ulz1Q2qIp8hZoK8tpjNuM58DFKerCS+3tytQxsMRAmy+9IIMe6vIvuwyNEOqnuBPff8nq7hb/nqTscDH1TytiqtcFsnw99mhhn1UAdf436enDiVv0U/LtoZH9R3GdTdG/GA8KjYiQmE0W5xO9+TA/zDf+tjmf0ygpi4rQ9FiGULosyI16hZmg6XmHV2M8WLq3HzNNexaUcEZxSlU+3S4jJf7VMRyXczYYBjdoEoxcEcGveRXzYUF0HKGE+z3FK14mGfVyrrnSg+bx082OwMj8Ho1p
Content-Type: text/plain; charset="utf-8"
Content-ID: <87EF0786558A5F4D8199589C670B8BCD@namprd11.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: b24f177a-0891-4e08-5e57-08d7857208b8
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2019 17:28:31.4621 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: XjnQr1N5EbrSxDeuokcyreLymSuipVPjQ0AMUXS+eLqvVahJbEYU0Ie86lN5fbWHTXW+m7Yf6YZSpqEQFCo+0Q==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1597
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.20, xch-aln-010.cisco.com
X-Outbound-Node: rcdn-core-2.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/spring/ViohSSO0yOlw5dT9bA-o8AxGCZQ>
Subject: [spring] H.Encaps pseudocode (was Re: Question about SRv6 Insert function)
X-BeenThere: spring@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Source Packet Routing in NetworkinG \(SPRING\)" <spring.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spring>, <mailto:spring-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spring/>
List-Post: <mailto:spring@ietf.org>
List-Help: <mailto:spring-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spring>, <mailto:spring-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2019 17:28:38 -0000

Alex,

I will update the line 04 as suggested to clarify that it refers to the outer IPv6 header. Thank you.
More inline.

Happy Holidays,
Pablo.

-----Original Message-----
From: Alexandre Petrescu <alexandre.petrescu@gmail.com>
Date: Thursday, 19 December 2019 at 14:33
To: "Pablo Camarillo (pcamaril)" <pcamaril@cisco.com>, "spring@ietf.org" <spring@ietf.org>
Subject: Re: [spring] Question about SRv6 Insert function

    
    
    Le 19/12/2019 à 12:52, Pablo Camarillo (pcamaril) a écrit :
    > Hi Alex.
    > 
    > Please see inline.
    > 
    > Many thanks,
    > 
    > Pablo.
    > 
    > ------------------------------------------------------------------------
    >
    >
    > 
    *From:*Alexandre Petrescu <alexandre.petrescu@gmail.com> *Sent:*
    > Monday, December 16, 2019 3:31 PM *To:* Pablo Camarillo (pcamaril) 
    > <pcamaril@cisco.com>; ipv6@ietf.org <ipv6@ietf.org> *Subject:* Re: 
    > [spring] Question about SRv6 Insert function
    > 
    > Hi, SPRINGers,
    > 
    > This is my first post to this list.
    > 
    > This is about draft-ietf-spring-srv6-network-programming-06 more 
    > precisely the T.Encaps section 5.2.
    > 
    > Le 11/12/2019 à 21:05, Pablo Camarillo (pcamaril) a écrit :
    >> Alex,
    >> 
    >> The precise definition T.Encaps is done in section 5.1 [5.2 now] of
    >> draft-ietf-spring-srv6-network-programming-06. If you have any 
    >> comment on such definition please let me know -on a separate thread
    >> and directed to SPRING mailer-.
    > 
    > Thank you for the reply.
    > 
    > Please make the T.Encaps part of the draft easier for me to read, 
    > e.g.: -expand what it means 'S01'; is it 'Step 01', like in BASIC 
    > programming language?
    > 
    > PC: Same format as in other documents (e.g. SRH).
    
    What is the other document SRH?

PC: draft-ietf-6man-segment-routing-header-26
    
    > -clarify that the original packet in transit is not modified upon 
    > transition (modulo the Hop Limit field and the Segments Left field if
    > present); new packet is created to carry the original packet - yes.
    > 
    > PC: I have added a paragraph in the latest version of the draft to 
    > capture your point. See rev07. Many thanks.
    
    I think you mean that you added this paragraph:
    > The T.Encaps received packet is encapsulated unmodified (with the
    > exception of the TTL or Hop Limit that is decremented as described in
    > [RFC2473]).
    
    I think it is good to say the packet is encapsulated unmodified.
    
    Indeed the Hop Limit is the sole exception.  I think the TTL should not
    be mentioned.  (side note: each IPv4 occurence should be dropped from
    everywhere in the document now :-)
    
    > -clarify what it means 'a packet (A, S2)(S3, S2, S1; SL=1)'; because 
    > it is confusing in several ways; (A,S2) invites to think it is src 
    > and dst addresses, but their place is switched (the normal order is 
    > Source, Destination).  S in 'S2' might mean a Source Address but
    > also might mean a Segment ID, or a Destination address.  Confusion
    > should be avoided, at least in my mind.
    > 
    > PC: This is explained in the terminology section of the draft (with
    > a detailed example).
    
    It is indeed in the terminology section.
    
    It clarifies many things to me.
    
    I am still left with the question: is a Segment Identifier an IPv6 
    address?  (all the 128bits of it).  I cant find an answer neither in 
    this I-D neither in its reference RFC8402 "Segment Routing" terminology 
    section.

PC: See the first paragraph of section 3.
    
    This is important to know, because in below the text says a destination 
    address is an S1 (DA=S1) and it also says that S1 is part of a segment list.
    
    In a destination address field one cant have something else than an IPv6 
    address.  But a segment identifier could be something else than an IPv6 
    address, if so it wanted.  (somewhere else people talk about 'locator' 
    being a 64bit value, I am not sure).

PC: Read section 3.1.
    
    About my initial worry - now T.Encaps cahnged its name into H.Encaps, right?

PC: Yes. 
    
    It seems to not modify packets in transit, but to encapsulate them, 
    which is ok.

PC: Indeed.
    
    >    Node N receives two packets P1=(A, B2) and P2=(A,B2)(B3, B2, B1;
    >    SL=1).  B2 is neither a local address nor SID of N.
    > 
    >    N steers the transit packets P1 and P2 into an SR Policy with a
    >    Source Address T and a Segment list <S1, S2, S3>.
    > 
    >    The H.Encaps transit encapsulation behavior is defined as follows:
    > 
    >    S01.   Push an IPv6 header with its own SRH (S3, S2, S1; SL=2)
    >    S02.   Set outer IPv6 SA = T and outer IPv6 DA = S1
    >    S03.   Set outer payload length, traffic class and flow label
    >    S04.   Update the Next-Header value
    
    'Update' or rather 'create'?  I hope it is the next-header value of the 
    outer IPv6 header; this is the first time to put something inside, so it 
    is rather a creation.
    
    'Updating' makes think that maybe the next header value of the inner 
    (original) packet is updated from value x to y.
    
    Or?
    
    >    S05.   Decrement inner Hop Limit or TTL
    >    S06.   Submit the packet to the IPv6 module for transmission to S1
    > 
    >    After the H.Encaps behavior, P1 and P2 respectively look like:
    > 
    >    - (T, S1) (S3, S2, S1; SL=2) (A, B2)
    > 
    >    - (T, S1) (S3, S2, S1; SL=2) (A, B2) (B3, B2, B1; SL=1)
    
    It looks ok - the P1 and P2 packets have not been modified in transit, 
    but encapsulated.
    
    I wonder though about the 1 value for SL (SL=1) in P2 original and P2 
    transited.  I wonder whether it should be decremented or not.  I think 
    it might complicated but I do not mind.
    
    Alex