Subject: RE: [SIP] SIP, SDP, and TCP-based media transport

From: David Yon <[email-masked]>
Date: Tue, 01 Aug 2000 07:15:39 -0400

Yes, thank you, I was not entirely clear on your point.

I don't know for sure whether your assertion is true or false.  I don't see 
why a UA *wouldn't* source packets from the port number it advertised, it 
certainly seems like that would make things cleaner.  I suppose NATs throw 
in a wrench, but there again I don't see why a SIP ALP on NAT wouldn't be 
able to open up a port binding using the same WAN port for both 
directions.  But yes, I've never read anything that says sourcing packets 
from the destination port is a requirement.

As far as a TCP connection using "a source port equal to the destination of 
the remote node", well, by definition this is what TCP connections 
do!  When a TCP connection is set up, it is defined by a four-tuple, and 
all communication is between two IP addresses and exactly two port 
numbers.  So if you are receiving packets on port 4399, you will also be 
sending packets from 4399, there's no way around it.

The only additional requirement I'm proposing---and as I mentioned in an 
earlier message, maybe it's not a requirement in all topologies---is that 
the initiator of the connection announce the port number of that endpoint 
prior to doing the connect for the purpose of identification.  This is 
definitely in the spirit of SDP, which does not require that the media 
stream contain an inline mechanism to identify the session.  Rather, the 
session is identified in external signaling (SIP), and the four-tuple of 
the RTP is how a UA maps a media stream to a SIP session.

At 03:07 AM 8/1/00 -0700, Fairlie-Cuninghame, Robert wrote:
>I am uncertain as to whether you understood my point so I will give an
>example.
>
>SDP A
>c=IN IP4 10.0.0.1
>m=audio 6000 RTP/AVP 0
>
>SDP B
>c=IN IP4 10.0.0.2
>m=audio 7000 RTP/AVP 0
>
>This does not infer that B must send packets with a source port of 7000 or
>that A must send packets with a source port of 6000 (if my understanding of
>SDP is correct - please correct me if I'm wrong).
>
>In your TCP model, must a TCP connection connection use a source port equal
>to the destination of the remote node ? If so, isn't this going against the
>spirit of the SDP spec ?
>
>Robert.
>
>-- My opinions are my own. I tried selling them once but everybody
>         seems to already have one. --

David Yon
Chief Technical Officer
Dialout.Net, Inc.
[email-masked]

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: "Simon Barber" <[email-masked]>
Date: Tue, 1 Aug 2000 10:23:05 -0700

Yon:
> l-labs.com/mailman/listinfo/sip

This is not the case - how could you distinguish two connections from one
machine to one service on a well known port on another machine? The source
and destination ports are usually different.

Example:

Connection web page request from 128.0.0.1 to 128.0.0.2

Packets from 128.0.0.1 have source address 128.0.0.1, port 1234, destination
address 128.0.0.2, port 80.
Packets sent back in reply have source address 128.0.0.2, port 80,
destination address 128.0.0.1, port 1234.

Regards,

Simon Barber

---

From: Samir Chatterjee <[email-masked]>
Date: Tue, 01 Aug 2000 13:50:57 -0700

> destination address 128.0.0.1, port 1234.

Simon, you are absolutely right. An endpoint in TCP is (IP addr, port) and a
pair of end-points make up a TCP connection. So even if one end-point is common
as is typical with web servers (131.96.1.4, 80), but since the other end-points
are all different, these denote all different TCP connections. In fact that is
how TCP keeps track of where to send data based on active connections it is
maintaining. I also think that since the client end-point does an active
connect, the local source port is dynamically obtained from the O/S and bound to
the other side (server) of the end-point. Full duplex data can now flow both
ways through this connection. I am not sure why media client in UA has to notify
the source port to the media server in UA. Connection should take care of it.

--
Samir Chatterjee
Georgia State University
Atlanta, GA 30303.
Ph: 404-651-3886
Fax: 404-651-3842
[email-masked]
http://www.cis.gsu.edu/~schatter
****************************************************************

---

From: David Yon <[email-masked]>
Date: Tue, 01 Aug 2000 15:08:51 -0400

>destination address 128.0.0.1, port 1234.

No, no, no, no, no.  I was *not* contradicting this (amazing how hard it is 
to communicate such a simple thing).  Look at what I said:

" So if you are receiving packets on port 4399, you will also be sending 
packets *from* 4399. " (emphasis added)

Look at what you said:

" Packets sent back in reply have source address 128.0.0.2, port 80, 
destination address 128.0.0.1, port 1234. "

These two statements are not at odds with each other.  Mine is a bit less 
complete, but I figured what I left out goes without saying. 
:-)  Substituting your port example into my phrasing:

" So if you are receiving packets on port 80, you will also be sending 
packets from 80. "

This is TRUE.  If you have a connection on port 80 (local) to port 1234 
(remote), any outbound packet (from local to remote) WILL HAVE A SOURCE 
PORT OF 80, so "you will also be sending packets from 80".  So yes, we're 
in violent agreement.

David Yon
Chief Technical Officer
Dialout.Net, Inc.
[email-masked]

---

From: David Yon <[email-masked]>
Date: Tue, 01 Aug 2000 16:00:35 -0400

After rereading my post, I see that in my zeal to be understood, I may have 
come across as inflammatory.  This was unintentional and I should have 
submitted the posting after another proofreading.  No offense was intended.

David Yon
Chief Technical Officer
Dialout.Net, Inc.
[email-masked]