Subject: [Ietf-behave] TURN Issue #10: MAGIC-COOKIE in the framework

From: Jonathan Rosenberg <[email-masked]>
Date: Tue, 20 Dec 2005 11:39:00 -0800 (PST)

The MAGIC-COOKIE attribute exists to disambiguate TURN and data traffic, 
since both are sent on the same port. We are now seeing a need to 
disambiguate STUN and data traffic too - note how RTP and STUN run over 
the same port in ICE, and STUN and SIP in sip-outbound.

Today, this disambiguation is done in an ad-hoc fashion in the ICE and 
sip-outbound cases. One idea is to make disambiguation a feature of the 
core stun framework, rather than a turn specific thing.

There are a couple of ways to do this:

1. Keep the MAGIC-COOKIE attribute, but use it for other request types 
as needed

2. Eliminate MAGIC-COOKIE attribute. Rather, "steal" 32 of the 128 bits 
from the transaction ID, and make them have a fixed, well-known value. 
These would be used for all stun/turn transactions.

Approach #2 has a number of interesting benefits:

a. reduces message overhead, since no separate attribute is needed for 
disambiguation

b. provides a nice way to differentiate turn-pre-09 and turn-post-09 
messages from each other, which would facilitate transition for turn 
servers in deployment today. In that way, its more or less identical to 
the idea in SIP, where use used the branch ID in the Via header field to 
indicate the same kind of thing

c. places the disambiguating data close to the top of the message, in a 
fixed location, making it easier to do in hardware

I'd propose #2.

Comments?

-Jonathan R.
--
Jonathan D. Rosenberg, Ph.D.                   600 Lanidex Plaza
Cisco Fellow                                   Parsippany, NJ 07054-2711
Cisco Systems
jdrosen@xxxxxxxxx                              FAX:   (973) 952-5050
http://www.jdrosen.net                         PHONE: (973) 952-5000
http://www.cisco.com