Re: [Tofoo] VXLAN (UDP tunnel protocols) and non-zero checksums

Tom Herbert <> Thu, 01 May 2014 03:14 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 883181A085A for <>; Wed, 30 Apr 2014 20:14:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.029
X-Spam-Status: No, score=-2.029 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.651, SPF_PASS=-0.001] autolearn=unavailable
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id H69N1thV66ry for <>; Wed, 30 Apr 2014 20:14:29 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4001:c03::232]) by (Postfix) with ESMTP id 70EF21A0839 for <>; Wed, 30 Apr 2014 20:14:28 -0700 (PDT)
Received: by with SMTP id lx4so3012766iec.9 for <>; Wed, 30 Apr 2014 20:14:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NXNOp+3mYb5Ed2P07Mtgp8UUZZiBNYHCPDX3arqUUKM=; b=GsjyVrqB0ynE9wm1xix22ktYhKhT9e3LC2N/1/dH07tmX0EtXp+n99oE5RiokYgIIi Hv4OsEOOpb2N7b2574D6Pc9gKtYjWzupI7F0JO8oz/3y50m3YZOigbDHJ5qOkkDHbQCN EKA9ZVqhAojE/vCkgQ2N91nhq4SxuQi3VEdogFVfoZVqlBwibXAXTgtiV+M3Da1qZOJY NBqGOg5rjg5RoiQGatwSeyB6s5DHBxKskj3SwMei4zKDF2X+IR91rlYkDqkCpzbIzrTv aev/9OJhEL0HzNvcjPVnXs2xxpx5gDkfvlvzsj3jRlVjiYylqG5MoaRHk7q5qA6yqNnR PXDw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=NXNOp+3mYb5Ed2P07Mtgp8UUZZiBNYHCPDX3arqUUKM=; b=d/j46oDBKLVzFmyNPiHUSHTvfoFhc2N1FXf8uZT0Bxcki4raERbzWnwS9DWFby06e2 bLMqeXfRPe595gac3s40YtE+Xx9v1POgPaKpf1673QylnFgIwW7aWGDisyM0tjz9e9SM /0YgFQCI/n6d0XZFhBG/WzVvvFG5Fq6C394JYmSFkUjlyt8hju/uhyW0JkPKr+8tPJTb OkhQ0O3Ndw8swHlEgRHTpJLtvKCuiHL1BKYDr/hV/WVvRzsG0uwDkjTt/3CMUrqRcI4m j7Du2uPDYNXMihTL/xsyMPnIBzS3dD9MpqY/bqWsZWYcu+AvxaJ9UwkBfXi9z/+o5eXZ qqjQ==
X-Gm-Message-State: ALoCoQmFZsDs/8RHjld470upYIpX4O/nVUuCNH+cbUzVVMrmTJPTxNumnSJVFOARbNjR+BVj0aGG
MIME-Version: 1.0
X-Received: by with SMTP id hs2mr209969igb.29.1398914066806; Wed, 30 Apr 2014 20:14:26 -0700 (PDT)
Received: by with HTTP; Wed, 30 Apr 2014 20:14:26 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <>
Date: Wed, 30 Apr 2014 20:14:26 -0700
Message-ID: <>
From: Tom Herbert <>
To: "Larry Kreeger (kreeger)" <>
Content-Type: multipart/alternative; boundary=089e0111bc9a06139004f84e10c5
Cc: "" <>, "" <>, "" <>, "" <>
Subject: Re: [Tofoo] VXLAN (UDP tunnel protocols) and non-zero checksums
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussion list for Tunneling over Foo \(with\)in IP networks \(TOFOO\)." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 01 May 2014 03:14:33 -0000

On Wed, Apr 30, 2014 at 6:54 PM, Larry Kreeger (kreeger)

>  See inline, marked with LK>. - Larry
>   From: Tom Herbert <>
> Date: Wednesday, April 30, 2014 6:48 PM
> To: Larry Kreeger <>
> Cc: "" <>rg>, "" <>rg>, "
>" <>om>, Dinesh Dutt <
> Subject: Re: [Tofoo] VXLAN (UDP tunnel protocols) and non-zero checksums
> On Wed, Apr 30, 2014 at 5:13 PM, Larry Kreeger (kreeger) <
>> wrote:
>> Hi Tom,
>> I'll give you my perspective on why I feel the behavior described in the
>> VXLAN draft is a good thing.  First, it is my assumption that some
>> implementations (e.g. many hardware implementations), will not implement
>> checksum generation, nor checksum validation.  I believe this is an
>> implementation reality.  If implementations are required to check a
>> non-zero checksum, but can't actually do it, what alternatives do they
>> have?
>  Barring that the implementations you're referring to only implement
> IPv6, these implementations must be already be doing checksum validation
> for IPv4 header-- so the checksum logic must have been implemented and I'm
> not sure the argument that this HW can't calculate the UDP csum would have
> much merit. A specific example implementation would be nice here, for
> instance in the case that the stack decapsulates the checksum can always be
> done in SW if verification is not provided by the device.
>  LK> I am referring to switching ASIC implementations.  There is no
> software nor traditional UDP stack involved.
> Are these implementations also ignoring IPv4 header checksum then?

>  Also, as I pointed out, the UDP checksum is *not* useless in VXLAN. In
> an L3 routed network there is nothing that protects the vni from corruption
> expect possibly the UDP checksum. Without any additional security
> mechanisms is VXLAN header (like a cookie), the only way I could deploy
> VXLAN is with checksums enabled. So in my opinion, the draft should be
> encouraging use of UDP checksums instead of discouraging them.
>  LK> Neither I nor the VXLAN draft claims that UDP checksums are useless,
> however I think it is an exaggeration to say "nothing" protects the VNI
> from corruption when the packet is being carried over Ethernet with a
> robust CRC32 protecting it.
> Assuming we are using Ethernet (I don't believe this can be a requirement
either) this only provides hop to hop protection, not end to end. I don't
have a completely error free network and checksum errors while low, are
non-zero. Sending a packet to the wrong VM is fundamentally bad and could
be quite costly,  so for me UDP checksums would be the minimum requirement.
This would need to apply to the case where the protocol is switched also.

In any case, the requirements and constraints for when it's acceptable to
ignore non-zero checksums for UDP should be specified in a more general way
if is being allowed.  Maybe an addendum to RFC 6935?


> Tom
>> One is to drop all packets with a non-zero checksum (because one
>> might be invalid and even one invalid one slipping through would be
>> unacceptable).  Another alternative is to accept all checksum values.  The
>> second option greatly enhances interoperability with implementations that
>> choose to generate a checksum and implementations that cannot validate the
>> checksum.  It allows a mixed environment where "better" implementations
>> (that can validate) can interoperate with "inferior" implementations that
>> are unable to validate the checksum.
>  BTW, VXLAN is not the only tunneling protocol to specify this behavior.
>> LISP (RFC 6830), specifies exactly the same behavior.
>   - Larry
>> On 4/30/14 12:01 PM, "Tom Herbert" <> wrote:
>> >Hi,
>> >
>> >I noticed that the VXLAN draft allows an implementation to potentially
>> >ignore a non-zero invalid UDP checksum.
>> >
>> >From:
>> >
>> >"When a decapsulating endpoint receives a packet with a non-zero
>> >checksum it MAY choose to verify the checksum"
>> >
>> >However, from RFC 1122:
>> >
>> >"If a UDP datagram is received with a checksum that is non-zero and
>> >invalid, UDP MUST silently discard the datagram."
>> >
>> >It doesn't seem like 1122 allows checksum verification to be optional,
>> >so these would seem to be a conflict. Presumably, ignoring the RX csum
>> >is included for performance but since the sender can already send zero
>> >checksums in UDP (they are optional in IPv4 and allowed for IPv6
>> >tunnels in RFC 6935) I'm not sure this is necessary. Besides that, the
>> >UDP checksum is potentially the only thing that protection of the vni
>> >against corruption end to end so allowing a receiver to ignore a bad
>> >checksum seems very risky.
>> >
>> >As a comparison, RFC 3931 (L2TP) has the following wording:
>> >
>> >"Thus, UDP checksums MAY be disabled in order to reduce the associated
>> >packet processing burden at the L2TP endpoints."
>> >
>> >This is somewhat ambiguous, but seems like the correct interpretation
>> >should be that zero checksums may be sent with L2TP/UDP, but on
>> >receive non-zero checksums should still be validated.
>> >
>> >Are these interpretations correct? Is there there a need to clarify
>> >the requirement for UDP tunnel protocols and checksums?
>> >
>> >Thanks,
>> >Tom
>> >
>>   >_______________________________________________
>> >Tofoo mailing list
>> >
>> >