Subject: [BEHAVE] Relationship between TCP and UDP

From: "David Barrett" <[email-masked]>
Date: Sat, 7 Jul 2007 15:59:44 -0700

I apologize if this is specified in one of the drafts, but I looked around a
bit and couldn't find it:

When a client opens both a UDP and TCP port on the same endpoint (ie, same
IP:port), can the TCP port receive incoming connections via a NAT mapping
established using UDP?

So let's say I use STUN and UDP to open an external port on a NAT.  And
let's also say that I've bound a listening TCP socket to the same IP:port as
the UDP socket:

1)       Should I be able to receive incoming TCP connections on that
external NAT host?

2)       In practice, does anybody have real-world data showing how often
this works?

You could argue that a NAT SHOULD NOT allow incoming TCP connections via the
mapping established via UDP due to a potential violation of the NAT's
filtering properties.  Or you could argue that it SHOULD in order to
effectively use UDP as a way to setting up a TCP port forward.  Both
arguments have merit (though, being an application developer, I favor the
latter).

But separate from what should or should not be the case, I'm wondering to
what degree NATs actually do in practice.  Anybody know?

Thanks!

-david

_______________________________________________
Behave mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/behave

---

From: Saikat Guha <[email-masked]>
Date: Mon, 9 Jul 2007 03:15:39 -0700

On Sat, 2007-07-07 at 15:59 -0700, David Barrett wrote:
> When a client opens both a UDP and TCP port on the same endpoint (ie,
> same IP:port), can the TCP port receive incoming connections via a NAT
> mapping established using UDP?

UDP ports and TCP ports are separate namespaces; endpoints are
identified by the 3-tuple (proto, ip, port) so it's not the "same
endpoint" per se.

By my understanding of the documents, a UDP hole CANNOT be used by TCP
and vice versa, but I don't think it is explicitly mentioned anywhere.

ICE does mention that each TCP or UDP candidate (regardless of same or
different port) must perform a separate STUN binding discovery.

> But separate from what should or should not be the case, I’m wondering
> to what degree NATs actually do in practice.  Anybody know?

I have never tested whether opening a UDP (or TCP) hole implicitly opens
up a TCP (or UDP) hole for that port, so I do not know the answer, but
it would indeed be interesting to find out.

-- 
Saikat