Re: [MBONED] mboned: UDP port conflict mtrace/traceroute

Warren Kumari <warren@kumari.net> Thu, 12 September 2019 20:05 UTC

Return-Path: <warren@kumari.net>
X-Original-To: mboned@ietfa.amsl.com
Delivered-To: mboned@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F02CF120048 for <mboned@ietfa.amsl.com>; Thu, 12 Sep 2019 13:05:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=kumari-net.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 3Nz_ILiLu5Tt for <mboned@ietfa.amsl.com>; Thu, 12 Sep 2019 13:05:02 -0700 (PDT)
Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (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 BFE1E12001B for <mboned@ietf.org>; Thu, 12 Sep 2019 13:05:01 -0700 (PDT)
Received: by mail-qk1-x743.google.com with SMTP id i78so25739825qke.11 for <mboned@ietf.org>; Thu, 12 Sep 2019 13:05:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kumari-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=0aYbmpI3Q0wHStIXaTQzpOK1LKMn41qYTQf+20jTp2o=; b=pfgHXvvrMn7N1kM8BbkNZRMT7lxQhIsnR8Wa0xOEqhCkEFrdACuykV39InGhmcgZz6 BCgsV+JCb2M7I/faN7RRTlqh7JZSvGTFHTIwXia9Bu7ASQEg7wRXf5E2cpomkz7Zr76v hDkhednnYHLJNZGu05DVzFVxPfYiSRoL29YALcN4ISF74XQbD6ZB+iVtidaZzxCCbIq1 HXSKx35LN0z/XOBX2/Ed+35TiJpdu8OWw+efqQcvDbrciMg2lVGyVRZ/00FHC9dN5BgC qeog6gCvcL1/5xlNNRQAYTPfhw1qRWBGE66MEVdbFGP4FMsTBxQQgeh4+eJYPjoW9KFM SfBQ==
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:content-transfer-encoding; bh=0aYbmpI3Q0wHStIXaTQzpOK1LKMn41qYTQf+20jTp2o=; b=RZEThSJ3MxajIJcTOblJw4NgbHguU9rOsH98RW3kaEQ7OxAhAPWjKcH3hldRk/16vp Qq7W6hOVDVGQupsHp+AsjCuDG473tTLR4nv38mYJRpv219YQeU1pP7Qst1+kTXPNldwm GtMe2NeNhjRoxjGR6TDN1Wi9cRYlXMSeWY3jsBRRUEaUtS1bpOWwse8zMmBhlYfWnCjS hya+z5S52uIx2GZnGW0ahFx90ZHsSwtCNGDvKcMWL6DyILbI6n0vg9/xinz20HPtv0fl XNRJf2d7sn08YUzKUnEhJfw4yzsPuGa8UF6nGcEkLQbpk8vdDFB23MPrPi0UdEWLY7/4 z71g==
X-Gm-Message-State: APjAAAXr0lwjWCn6rohh+xqA7S8CGOaTvAVjetq2pMlTZrNyvpYVnLMv MFgIkJSJkfraQsy/0P0mgt2UgEMzfFxPYkXpLQZVIQ==
X-Google-Smtp-Source: APXvYqysT0gaiOMUWsxBa8/YeI4ZVHlXVcTBXsuGmaAEcuJ+k8+TFwudE/d667oWLbS/yq4uRkqqIva+osnIhy+dJnY=
X-Received: by 2002:a05:620a:753:: with SMTP id i19mr5798748qki.192.1568318700071; Thu, 12 Sep 2019 13:05:00 -0700 (PDT)
MIME-Version: 1.0
References: <CAH8Jh6DSMMyjtzTn5yKqWdsio40nMjkreUMyMkc8mJGAFdYK4Q@mail.gmail.com> <BA0AA020-AE9D-441A-9AF2-DF847F1D9597@strayalpha.com> <CAHw9_iJCk6ym_CoXca8zgSsN7qCx-iAzsTg2-hV+SWHRz2D17g@mail.gmail.com> <2ba7bbf42e6d007b83d024ef11c24070@strayalpha.com> <CAHw9_iJsHGyttCw6UCQYzc2gEy4Rf+v=dTa9OyKOTaoZxEFtPQ@mail.gmail.com> <aec642641abccd91e5bd39deba049e39@strayalpha.com>
In-Reply-To: <aec642641abccd91e5bd39deba049e39@strayalpha.com>
From: Warren Kumari <warren@kumari.net>
Date: Thu, 12 Sep 2019 16:04:23 -0400
Message-ID: <CAHw9_iKf25RTQuESdyW9a1U1n3EnR54yOo42+0nbW922Yxj8-g@mail.gmail.com>
To: Joe Touch <touch@strayalpha.com>, Hitoshi Asaeda <asaeda@ieee.org>
Cc: "James A. (Jim) Stevens" <james.a.stevens=40collins.com@dmarc.ietf.org>, MBONED WG <mboned@ietf.org>, Leonard Giuliano <lenny@juniper.net>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/mboned/e5jCLUFdjXUxm3MSSEP6SApD3cc>
Subject: Re: [MBONED] mboned: UDP port conflict mtrace/traceroute
X-BeenThere: mboned@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Mail List for the Mboned Working Group <mboned.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mboned>, <mailto:mboned-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mboned/>
List-Post: <mailto:mboned@ietf.org>
List-Help: <mailto:mboned-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mboned>, <mailto:mboned-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Sep 2019 20:05:05 -0000

Hitoshi / MBONED,

Can you please explain in baby words (small enough that even I can
understand!) how the failures actually occur.

I keep going through it step by step, and it all makes sense... and
then suddenly I confuse myself and it all escapes... <insert confused
baby meme here>

Let's use this as the scenario (I'm using RFC1918 space because the
documentation prefix isn't really big enough for this).

I'm 10.0.0.1, and I'm running traceroute (from Linux / BSD box) to a
destination machine of 10.0.4.1. There are routers numbered 10.0.1.1,
10.0.2.1 and 10.0.3.1

Step 1: I send 3 packets with TTL=1, Dst 10.0.5.1, ports 33435,33436,33437.
The first hop router, 10.0.1.1 decrements the TTL, realizes that the
packet has now expired, and sends me back (Src 10.0.1.1, Dst 10.0.0.1)
3 ICMP TTL expired messages.
Traceroute draws:
traceroute to 10.0.4.1, 64 hops max, 52 byte packets
 1  10.0.1.1 (10.0.1.1)  2 ms  1 ms  0.8 ms

2: I now send 3 packets, with TTL=2,  Dst 10.0.5.1, ports 33438,33439,33440.
Router1 decrements the TTL and forwards it to Router2, which
decrements the TTL and sends back  (Src 10.0.2.1, Dst 10.0.0.1) 3 ICMP
TTL expired messages.
I see:
traceroute to 10.0.4.1, 64 hops max, 52 byte packets
 1  10.0.1.1 (10.0.1.1)  2 ms  1 ms  0.8 ms
 2  10.0.2.1 (10.0.2.1)  3ms  2 ms 5ms

3: I send 3 packets with TTL3, Dst 10.0.5.1, ports 33441,33442,33443
Router1 and router2 forward the packet, router3 expires it, I get a
TTL expired from 10.0.3.1, and now I see:
traceroute to 10.0.4.1, 64 hops max, 52 byte packets
 1  10.0.1.1 (10.0.1.1)  2 ms  1 ms  0.8 ms
 2  10.0.2.1 (10.0.2.1)  3ms  2 ms 5ms
 3  10.0.3.1 (10.0.3.1)  4 ms 5ms 3ms.

4: I send 3 packets with TTL=43, Dst 10.0.5.1, ports 33444,33445,33446.
The TTL is now high enough that it makes it to the end host. There is
nothing listening on the end host on ports 33444, 33445, 33446, and so
I get back (from 10.0.4.1) ICMP port unreachables for 33444, 33445,
33446. I know I've reached my destination, and I'm happy.
traceroute to 10.0.4.1, 64 hops max, 52 byte packets
 1  10.0.1.1 (10.0.1.1)  2 ms  1 ms  0.8 ms
 2  10.0.2.1 (10.0.2.1)  3ms  2 ms 5ms
 3  10.0.3.1 (10.0.3.1)  4 ms 5ms 3ms
 4  10.0.4.1 (10.0.4.1) 5ms 3ms 4ms



In all of the above steps the destination address of the traceroute
packet is the target of the traceroute.
A transit router decrements the TTL, and if is cannot forward the
packet it generates an ICMP unreachable -- but it doesn't care about
the destination port or IP. When the TTL is high enough that it
reaches the end host, the port number *is* important, because we don't
want the end host to actually accept the packet, we want it to instead
return an ICMP Port Unreachable (or admin prohibited, or something
else useful).

As far as I can see then, the only case where there might be an issue is:
1: the router running mtrace2 is the target of the traceroute (so it
is actually listening on the port) and
2: the router is the very first hop (that's the only case where the
port number will be 33435).

In this case, we would get an output showing:
traceroute to 10.0.1.1, 64 hops max, 52 byte packets
 1  10.0.1.1 (10.0.1.1)  *  1 ms  0.8 ms

(the first packet (port 33435) gets eaten by the mtrace2 process, but
the 2nd and 3rd packets will have ports 33436, 33437).

It was reported that enabling this protocol on routers where the
traffic ransites (e.g router1) breaks traceroute, but I've
sufficiently managed to confuse myself that I'm having a hard time
understanding *why* -- the packet isn't destined to the router, it is
destined for the target of the traceroute...

I'm sure I'm missing something obvious here, so, again, slowly and in
baby words please...

W


On Wed, Sep 11, 2019 at 12:29 PM Joe Touch <touch@strayalpha.com> wrote:
>
> Hi, Warren,
>
> On 2019-09-11 08:27, Warren Kumari wrote:
>
> On Mon, Jul 29, 2019 at 1:36 PM Joe Touch <touch@strayalpha.com> wrote:
>
>
> On 2019-07-29 10:09, Warren Kumari wrote:
>
> ...
>
> Just FYI, I sent email to IANA letting them know that ports 33435 -
> 33534 should probably be listed it as "Known Unauthorized Use".
> From some archaeology, 33434 is apparently 2^15 + 666, and the
> "standard" traceroutes use up to 100 ports.
> I based this on the Van Jacobson (van@ee.lbl.gov) - 1988 which he
> "stole" (credited) from Steve Deering -- easiest location of code is:
> https://github.com/freebsd/freebsd/blob/master/contrib/traceroute/traceroute.c
>
> I don't much like referring to it as "Known Unauthorized Use" but
> that's technically what it is -- the important bit to me seems to be
> that we make in some way so they don't get handed out, exactly what
> they should be called is a less pressing problem.
>
>
> Although that's helpful to those seeing traffic on those ports, it does not prevent IANA from assigning those values when requested.
>
> The only way to do that would be to make them ASSIGNED. That happens by the process indicated in RFCs 6335 and 7605 and notably is not driven by this sort of "squatting".
>
> NOTE: at the time that code was originally developed (1988), that range was OK for such uses without registration, but times changed in 1992.
>
> That code ought to be fixed.
>
>
> Yes, that is true -- that code ought to be fixed; however, it doesn't
> change the fact that mtrace cannot realistically be deployed using
> this port -- enabling it on a router breaks traceroutes through that
> router, leading to asterisks (I'd thought that we'd agreed on that,
> but while looking back through my mail on this topic, it's possible
> I'd misunderstood, and you don't actually agree that this port isn't
> fit *for this particular purpose*).
>
>
>
> No, I don't. I don't understand the issue. On machines where traceroute is deployed, I would assume it is already possible to acquire those ports (bind to them) as needed, at which point the only components that don't play nice are those where mtrace isn't deployed yet.
>
> Now if you are saying you don't WANT to do that because you WANT to support traceroute's use of squatted ports, that's not IANA's business IMO - and, more importantly, it's not justification for changing a port. IANA's policies on this are that squatter's use of ports are simply not a factor at all. They can't be, otherwise there's no point in having an assignment process.
>
>
> Just wanting to make sure we are all on the same page, and they MBONED
> will be publishing a -bis, deprecating this RFC and publishing a new
> one with a different port...
>
>
> At best, that would requires releasing the current assignment, which requires a statement as to the extent of the current deployment using that assignment since 2012 and a plan for changing that codebase - all this is described in RFC 6335.
>
> Joe



-- 
I don't think the execution is relevant when it was obviously a bad
idea in the first place.
This is like putting rabid weasels in your pants, and later expressing
regret at having chosen those particular rabid weasels and that pair
of pants.
   ---maf