Re: [tcpm] Linux TCP Stack and Zero Window Probe

Neal Cardwell <ncardwell@google.com> Thu, 22 November 2018 18:22 UTC

Return-Path: <ncardwell@google.com>
X-Original-To: tcpm@ietfa.amsl.com
Delivered-To: tcpm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D77A8130FE4 for <tcpm@ietfa.amsl.com>; Thu, 22 Nov 2018 10:22:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -18.959
X-Spam-Level:
X-Spam-Status: No, score=-18.959 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 BPHMb-MI63yI for <tcpm@ietfa.amsl.com>; Thu, 22 Nov 2018 10:22:10 -0800 (PST)
Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (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 25700130F19 for <tcpm@ietf.org>; Thu, 22 Nov 2018 10:22:10 -0800 (PST)
Received: by mail-oi1-x22f.google.com with SMTP id v6so8132864oif.2 for <tcpm@ietf.org>; Thu, 22 Nov 2018 10:22:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bwaonNUKOkLl/IRo68JiiBpZyBmAYR9BXV9WnzI4JRo=; b=kClkaAlUfOj4sE9iZFDavE10rwjiT7HzkevpH8OhdA1gFz7jmHZy6iCzKjzUYqj0vE EY50wGRBc1zH5gc+GTHGM13XJB47GbPoCDeNzROiIJt6NfL80ZKY35wXrma0p77qQfU/ NTG9PsKwVC9OIO2DORZC+TUJoEM65fL+XAEOag1ONE5Po90M5aUIf/jTfs+BBenPr0Cf MyuyFZ0xKK7VasF0OmOzc4QgvtNwYXU40x+lL8ONxeIfzO5XVX6Ea6xxrxPKT7M8FhY3 QMviuaPTnjlrF5BbDc5KVrfLLl8+EnV+KzlXW3a5bNPhnmw6JUunYbf8ndXPyH500bQ2 XzwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bwaonNUKOkLl/IRo68JiiBpZyBmAYR9BXV9WnzI4JRo=; b=KUfxZDbzVHCaci2fkhUB3m3AK9QaNlJNof3iHjcBaCV5BBiCAFMiUYEs8L606iAYh6 4cfHZLloV/J/faBBWcLGrhUoZHutc4XwI3UP+kfQpvbMYR4YBOyygzYX9FccEyTDwIQT yfVmEpDZsngHDo+yy56TLPhZA1wy8QMGM/Kv4pQ+CvHtNa9YR0zktR2JXg1F8CLYrkrx w6k4pi66bwAJ4X5vfHeokP4oqR3vFZ65ZmEU3rkNS7BCDtUCygAnn7Au+d/wYKIjCzOB 5moYL5S6MMSKwDtbC3HeJndah3mzSX6WhsMGrOKr0P/SmuB1L2gYy4O8aN6rJ1bLLG1l ZxUQ==
X-Gm-Message-State: AGRZ1gJ0QC+FXvbwnlnD5CoKnS9LsNfhnMoWYBzTRPSXxKc968Difdbt L7mibHuLiLjfj/4osBnUJ+ZV9mLOpceYYlZmkcWRKA==
X-Google-Smtp-Source: AJdET5d8PZoDTFvJoMy5hbJpPmAgsZlud/LQdu7GGNuZfGA/bGiLoYA/tlH12m/uK/enIPq01CzHWDLCA936FYpYBz0=
X-Received: by 2002:aca:52d4:: with SMTP id g203mr6960473oib.14.1542910929215; Thu, 22 Nov 2018 10:22:09 -0800 (PST)
MIME-Version: 1.0
References: <246bdcf112bb4ebe875df662e3467ab5@HICGWSMB01.ad.harman.com>
In-Reply-To: <246bdcf112bb4ebe875df662e3467ab5@HICGWSMB01.ad.harman.com>
From: Neal Cardwell <ncardwell@google.com>
Date: Thu, 22 Nov 2018 13:21:52 -0500
Message-ID: <CADVnQym0O1CRBTwvwQbMgisNirXRcX+j87XdoO4UDQKbZ9c+Cg@mail.gmail.com>
To: Kiruthika.Varadarajan@harman.com
Cc: "tcpm@ietf.org" <tcpm@ietf.org>, John Heffner <johnwheffner@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/ioKa6csjs06eJiRcOG_5fM6bqW4>
Subject: Re: [tcpm] Linux TCP Stack and Zero Window Probe
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpm/>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Nov 2018 18:22:13 -0000

Hi,

This is expected. Linux TCP uses the same code to generate keepalive
probes and zero window probes. (Note that the comment for
tcp_write_wakeup() is "Initiate keepalive or window probe from
timer"). So, on the wire and divorced from context, the two kinds of
packets can look the same.

Given the context in your trace, with the receiver just having
advertised a receive window of 0 bytes, and with the probes starting
in the range of a plausible RTO, and exponentially backing off, those
look like zero window probes to me.

best,
neal

ps: this is a condensed version of the trace, with tcpdump -ttt
relative timestamps:

00:00:00.025099 cli > srv: S 3878781099:3878781099(0) win 65535
00:00:00.000506 srv > cli: S. 936571641:936571641(0) ack 3878781100
win 29200 <mss 1460>
00:00:00.012473 cli > srv: . 3878781100:3878781100(0) ack 936571642 win 65535
00:00:01.003173 srv > cli: P. 936571642:936571643(1) ack 3878781100 win 29200
00:00:00.013407 cli > srv: . 3878781100:3878781100(0) ack 936571643 win 0
00:00:01.208250 srv > cli: . 936571642:936571642(0) ack 3878781100 win 29200
00:00:00.431995 srv > cli: . 936571642:936571642(0) ack 3878781100 win 29200
00:00:00.887970 srv > cli: . 936571642:936571642(0) ack 3878781100 win 29200
00:00:01.728002 srv > cli: . 936571642:936571642(0) ack 3878781100 win 29200

On Wed, Nov 21, 2018 at 1:21 PM Varadarajan, Kiruthika
<Kiruthika.Varadarajan@harman.com> wrote:
>
> Hi Team,
>
> I have a question in Zero Window Probe in TCP.
>
> If the client sends Zero Window, according to RFC spec is it mandatory for the Linux TCP stack to send Zero Window Probe.
>
> In my stack I am not getting Zero Window Probe instead I am getting Keep Alive.
>
> I have attached my wireshark traces. Can you please confirm if this is the expected behavior from TCP stack.
>
>
>
> Thanks & Regards
>
> Kiruthika
>
>
>
> _______________________________________________
> tcpm mailing list
> tcpm@ietf.org
> https://www.ietf.org/mailman/listinfo/tcpm