Re: L4 Checksum and draft-ietf-6man-segment-routing-header

Tom Herbert <tom@herbertland.com> Tue, 17 May 2016 16:09 UTC

Return-Path: <tom@herbertland.com>
X-Original-To: ipv6@ietfa.amsl.com
Delivered-To: ipv6@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1BD0E12DA66 for <ipv6@ietfa.amsl.com>; Tue, 17 May 2016 09:09:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=herbertland-com.20150623.gappssmtp.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 7Bl3L06bCyoy for <ipv6@ietfa.amsl.com>; Tue, 17 May 2016 09:09:00 -0700 (PDT)
Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (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 7F05012DA65 for <ipv6@ietf.org>; Tue, 17 May 2016 09:09:00 -0700 (PDT)
Received: by mail-io0-x233.google.com with SMTP id d62so29569117iof.2 for <ipv6@ietf.org>; Tue, 17 May 2016 09:09:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=herbertland-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-transfer-encoding; bh=/yTOA7cQpyNI4vByAYE+tRKpV2SY1hE5PhWWeFJaBv8=; b=oGvMvNz1N3kfwDgLjg75P9k5rBHBk7S+3cgSmPs3Umzy4sN82ZTVees4kvDJMxYZaP xgJywfQai2wI/jnifvly+CyDBi+Hd5iZzNR1hubCUhiGQijAAj5+xoEyggld7UOrPjdD sDjSOmi6rQ0p6mHJUBXqihVXy8JPfaU4iw4nyckADPApFf+ImIeJtV9E9a2Zh/vO1/cY KNtxxppka3r1EDwgwRF8euA657FA38Mb+8pYmZ4TIzS6YgUzQNF8gV9FSMnmG0RWJRkA ysq2rRrIAHEYhfvVKJ0VLF9wl8BUAT8iWwFbmTXnMWszxaCulkBQ4WrOb6MBpd2H94Ki QR0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=/yTOA7cQpyNI4vByAYE+tRKpV2SY1hE5PhWWeFJaBv8=; b=cXFd8lLI4f6rSZbPnPx3efrppKEt//X5P4owCJahtSQ/sWg1Oly1qX8yu9hKQg5Hxl FkxLQNke4JnoJ2waEajtMHSGHmUdKYfhTZ4Iflbo191E+FtJFkgV+wUn+/c1bMD+/VpA HRJM8ZngZgAmXHUKt7mQwBzf9svqFBdluRnGQf4apuxoD2U2/qQ10abO5CqbBXjVBYLw msW/LrQETrUBaZn+JebiYe0s5xw7K0P/GTRNcGksWYYZ+huIgvi2ryX3Tt8eft47KIPp WJ08bNah7oPtMB5k8h96gD9PM7hHnwIwsR/3BzUW7txiXoPX/ITCOOvrnAZla+Sqb6C1 p1rQ==
X-Gm-Message-State: AOPr4FVnHVARsBpMBL0qPX/HlZsejTBOZ0+n34y2kZqHM1n3II7RgPTfSgK7EMPN/jO/DtR5F7C/FgL6Ztd+Cg==
MIME-Version: 1.0
X-Received: by 10.36.33.131 with SMTP id e125mr1850001ita.37.1463501339811; Tue, 17 May 2016 09:08:59 -0700 (PDT)
Received: by 10.107.56.67 with HTTP; Tue, 17 May 2016 09:08:59 -0700 (PDT)
In-Reply-To: <CAO42Z2y3To1R+fYKv6uwbEFh26A5cgpihTbBAFFuDNmYKHTnNA@mail.gmail.com>
References: <eaf5cad817624c7a8758758aa058399b@IL-EXCH02.marvell.com> <2f6e0e6e-0e5e-0b3b-10ce-09768e8b3791@gmail.com> <CAO42Z2y3To1R+fYKv6uwbEFh26A5cgpihTbBAFFuDNmYKHTnNA@mail.gmail.com>
Date: Tue, 17 May 2016 09:08:59 -0700
Message-ID: <CALx6S35sQP8Z98ZWqfmkjchVvZMH2X4gow68LayphshQ4QUafw@mail.gmail.com>
Subject: Re: L4 Checksum and draft-ietf-6man-segment-routing-header
From: Tom Herbert <tom@herbertland.com>
To: Mark Smith <markzzzsmith@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/ipv6/SGzM1k7kWAiqemY0Owkyuf4W6ik>
Cc: Alexandre Petrescu <alexandre.petrescu@gmail.com>, 6man WG <ipv6@ietf.org>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipv6/>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 17 May 2016 16:09:02 -0000

On Tue, May 17, 2016 at 4:49 AM, Mark Smith <markzzzsmith@gmail.com> wrote:
> On 17 May 2016 at 21:23, Alexandre Petrescu
> <alexandre.petrescu@gmail.com> wrote:
>>
>>
>> Le 15/05/2016 à 12:04, Tal Mizrahi a écrit :
>>>
>>> Hi,
>>>
>>>
>>>
>>> [Apologies if this issue has been discussed before.]
>>>
>>>
>>>
>>> According to draft-ietf-6man-segment-routing-header, an ‘SR Segment
>>> Endpoint Node’ updates the Destination IP address.
>>>
>>>
>>> Therefore, it must also update the Layer 4 Checksum, right?
>>
>>
>> I guess yes.  I guess the draft assumes that only the end nodes create
>> and verify the checksum value.
>>
>
> It isn't an assumption, it is the way IPv6 works.
>
> End-to-end checksums like the TCP or UDP ones are only calculated or
> verified at the ends.
>
There are some host optimizations like checksum offload and
segmentation offload that are performed before the stack would set the
final address in the destination. If the checksum is not correct on
the wire for the addresses in the packet these optimizations can't be
used (but packets should not be dropped). In ILA we do a checksum
neutral translation that keeps the checksum correct and does not
require middelboxes to update L4 checksum fields.

Tom

> If the packet is mis-delivered to an upper layer TCP or UDP for one of
> the intermediary DA hops, the packet will be thrown away because the
> upper layer checksum validation should. If it was changed as the
> intermediary DAs were swapped, then the packet could be considered
> legitimate by intermediate TCP or UDP, and the could then payload
> handed up to an application that wasn't expecting it at all.
>
> Briefly looking at the SR draft, the SRH processing looks to be the
> same or similar to the original IPv6 routing header.
>
> https://tools.ietf.org/html/rfc2460#section-4.4
>
>
>
>
>> (whether that is done correctly it is another matter;
>> draft-ietf-6man-segment-routing-header-01 tells that there are two
>> different ways of inserting an SRH: by the end nodes _or_ by
>> intermediary nodes; if it is done by the intermediary nodes there is a
>> need to make sure that overall the SRH concept makes sense).
>>
>>> I wonder if there is an upper bound on the size of the SRH.
>>
>>
>> I think that size can be deduced from the length of the Hdr Ext Len
>> field of draft-ietf-6man-segment-routing-header-01: 8 bits would mean
>> the max size is 256 bytes (plus 1 by its definition).
>>
>> One may wonder though whether there can be multiple SRHs in a packet?
>>
>>> Otherwise, the L4 Checksum may be located in a pretty deep location.
>>>
>>> Speaking from a chip vendor’s perspective this may be a problem.
>>
>
> Which is why EHs are not intended to be examined or processed by
> intermediate nodes, with exception to one of them, and that one is
> always the first EH if present. Required processing of that is being
> loosened a bit in:
>
>
> IPv6 Hop-by-Hop Options Extension Header
> https://tools.ietf.org/html/draft-ietf-6man-hbh-header-handling-03
>
>
> Regards,
> Mark.
>
>
>>
>> I think that is understandable.
>>
>> Alex
>>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Tal Mizrahi.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --------------------------------------------------------------------
>>>  IETF IPv6 working group mailing list ipv6@ietf.org Administrative
>>> Requests: https://www.ietf.org/mailman/listinfo/ipv6
>>> --------------------------------------------------------------------
>>>
>>
>> --------------------------------------------------------------------
>> IETF IPv6 working group mailing list
>> ipv6@ietf.org
>> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
>> --------------------------------------------------------------------
>
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> ipv6@ietf.org
> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
> --------------------------------------------------------------------