Subject: Re: [Fwd: FW: Application for port-number]

From: Tom-PT Taylor <[email-masked]>
Date: Fri, 14 Jan 2000 16:06:17 -0500

To start with, there's a difference between TCP and UDP.  In TCP, once
someone has connected to a TCP, no one else can.  Hence the MGC has to tell
the MG to back off and use another.  When the MG does that, the MG end of
the connection is fixed, just as it was the first time, so there's no point
in the MG passing a contact address to the MGC.

With UDP, the MGC has the option of providing an alternate port or not,
depending on implementation: the option is there for everyone to use the
same port.  Moreover, the MGC has to know where to send the reply to the MG,
since it's not pre-determined, so the MG-supplied address and port do have
an use.

These considerations imply changes to sections 7.28 and section 9.  I
propose the following:

Section 7.2.8: in the paragraph beginning: "A ServiceChange Command
specifying the "Root" for the TerminationID ...", sentence currently
reading: "Normally, the MG will specify the transport ServiceChangeAddress
...": replace the word "Normally" with the phrase "When the transport for
the protocol requires separate specification of an address for each end of
the association (e.g. when UDP is used), ..."

Section 9:

Take the last line of the first paragraph, beginning "For transport of the
protocol over IP ..." and merge it with the next paragraph.  That paragraph
is all about IP.  Rearrange the paragraph to read as follows:

"For transport of the protocol over IP, MGCs shall implement both TCP and
UDP/ALF, an MG shall implement TCP or UDP/ALF or both.  The MG is
provisioned with a DNS name or IP address of a primary and zero or more
secondary MGCs (see section 7.2.8) that is the address the MG uses to send
messages to the MGC.  The initial ServiceChange message should be sent to
port ???? if using TCP and port ???? if using UDP.

The ServiceChange command contains a ServiceChangeAddress parameter.  If TCP
is used, the MG need not include this parameter, since it is implicit in the
TCP connection set up between the MG and the MGC.  The MGC will typically
include this parameter in order to tell the MG to move to a new port.  If
the ServiceChange response does contain a transport address which is
different from the one on which the MG initiated the connection, both ends
must close the connection.  The MG must then re-initiate the association to
the address/port given in the MGC's response.

If UDP/ALF is used, the ServiceChange Command from the MG must contain the
ServiceChangeAddress parameter, so that the MGC knows where to send its
messages.  The MGC may include this parameter in its response, if it wishes
to change the address and/or port to which the MG sends messages during the
life of the association."

> -----Original Message-----
> From: Rosen, Brian [SMTP:[email-masked]]
> Sent: Friday, January 14, 2000 3:02 PM
> To:   'Chuong Nguyen'
> Cc:   Taylor, Tom-PT [CAR:B904:EXCH]
> Subject:      RE: [Fwd: FW: Application for port-number]
>
> I had a long winded answer here, then went and talked to some of my
> people, and now I
> think I am thoroughly confused.
>
> So I'm going to ask the "question first principals" question - why do we
> need any of this?
>
> There is exactly one control association between an MG and an MGC.  The MG
> is the client,
> and it initiates the association.  Therefore this circumstance is exactly
> analogous to
> the control channel of FTP, or of TELNET, etc.  The MG sends its source
> address and
> desired port in the TCP SYN, addressed to the MGC at the well known port.
> The MGC
> replies with its source address and the well known port, and the MG's
> address and its
> desired port.  Rules state that flows are differentiated by the 4-tuple
> (Source Address,
> Source Port, Destination Address, Destination Port), so why do we need a
> port number
> in the protocol?   Same effect with UDP, right?
>
> And, as I understand it, putting port numbers in protocol messages screws
> up NAT and
> firewalls.
>
> Even if there were reasons why it looked like you needed multiple
> associations (the Virtual MG for example), the MG must use separate port
> numbers, and the tuple remains unique.  The MGC
> never initiates the connection, so there isn't a problem there.
>
> So, why are we doing this?
>
> Brian
>
>
>
>       -----Original Message-----
>       From: Chuong Nguyen [mailto:[email-masked]]
>       Sent: Friday, January 14, 2000 10:16 AM
>       To: Rosen, Brian
>       Subject: Re: [Fwd: FW: Application for port-number]
>
>
>       What Tom is saying below is that when MG registers with MGC, the
> port # in the ServiceChange Request
>       is irrevalent.  When MGC replies back with ServiceChangeReply and
> specifies a port # in that reply,
>       MG is supposed to close the registration connection on the Megaco
> TCP well known port#
>       and establishes a new connection with MGC using the MGC specified
> port # in the ServiceChangeReply.
>
>       That is one does not use a port # to send message from MG to MGC and
> another port# to
>       to send message from MGC to MG.
>       That is MGC always tells MG what port# to use after registration.
> MG never tells MGC what
>       port # to use after registration.
>       Somehow this all make sense for TCP due to all the extra TCP connect
> and accept stuffs.
>
>       For UDP, one does not have the overhead of TCP connection.
> Therefore MGC and MG can specify
>       what port # they will be listening for message after registration.
>
>       The standard wording implies that MG can specify a port# that it
> wishes MGC to send message to MG.
>       Therefore MG will only be listening on this port# for this MGC
> message.  If MG does not specify a port#
>       during registration, MG will listen on the Megaco UDP well known
> port# for any future MGC message.
>       Likewise MGC can specify a port# that it wants the MG to send
> message to MGC on.
>       Therefore MGC will only listen on the specified port# for that MG
> message.
>
>
>
>
>       "Rosen, Brian" wrote:
>
>               I think its correct.  I'm not sure I understand the problem
> with identifying TCP vs UDP.I don't see the discrepancy in the present
> wording.  They both say that the MG specifiesan address & port for the MGC
> to use in the first ServiceChange (which would be sent tothe address
> specified in the provisioned primary and secondary MGCs and the
> IANAallocated port number).  The MGC replies with the address and port
> number it wishes theMG to use. What am I missing?Brian
>
>                       -----Original Message-----
>                       From: Chuong Nguyen [
> <mailto:[email-masked]>]
>                       Sent: Friday, January 14, 2000 9:28 AM
>                       To: Brian Rosen
>                       Subject: [Fwd: FW: Application for port-number]
>                       Brian
>
>                       Is there a consensus as to who does a TCP connect
> and TCP accept?
>
>                       MGC listen (TCP accept) on Megaco TCP default port
> #.
>                       MG does a TCP connect to MGC.
>                       MGC accepts the connection.
>
>                       Also please read the following email between Tom and
> me.
>                       Do you have anu additional opinon?
>
>                       Thanks
>                       Chuong
>
>                       Tom-PT Taylor wrote:
>
>
>
>                       We'll have to clean that up by distinguishing
> between TCP and UDP.  Thanks for making this point.
>
>                               -----Original Message-----
>                       From:  Chuong Nguyen
> [SMTP:[email-masked]]
>                       Sent:  Wednesday, January 12, 2000 5:01 PM
>                       To:    Taylor, Tom-PT [CAR:B904:EXCH]
>                       Subject:      Re: FW: Application for port-number
>
>                               Thanks for the response.
>                       I like your response but Section 9. Transport:
>                       "The ServiceChange command contains a
> ServiceChangePort parameter.
>                       The MG specifies the TCP/UDP port number it wishes
> the MGC to use for communication.
>                       The MGC replies with the Port set to the TCP/UDP
> port number it wishes the MG to uss for
>                       further communications."
>
>                               Section 7.2.8 ServiceChange
>                       "Normally, the MG will specify the transport
> ServiceChangeAddress to be used by the MGC
>                       for sending messages in the ServiceChangeAddress
> parameter in the input ServiceChangeDescriptor.
>                       The MGC specifies the ServiceChangeAddress for the
> MG to use in the returned result
>                       ServiceDescriptor."
>
>                               Chuong
>
>                               Tom-PT Taylor wrote:
>
>
>
>                               You have the wrong end of the conversation.
> The MG port is irrelevant, since the MG is the one to initiate the
> association.  The sequence is:
>
>                               (1) MG connects to MGC at the well-known
> port, sends a ServiceChange.
>                       (2) The MGC sends back an alternate address/port.
>                       (3) The MG breaks the connection and connects to the
> new address/port supplied by the MGC.
>
>                                       -----Original Message-----
>                       From:  Chuong Nguyen
> [SMTP:[email-masked]]
>                       Sent:  Wednesday, January 12, 2000 4:19 PM
>                       To:   Taylor, Tom-PT [CAR:B904:EXCH]
>                       Subject:     Re: FW: Application for port-number
>
>                                       > Description :
>                       > This will be a rendezvous port through which the
> Media Gateway registers
>                       > its
>                       > presence with a Media Gateway Controller.
> Assignment of a well-known port
>                       >
>                       > simplifies administration of the Media Gateway and
> Controller.
>                       >
>                       > The Media Gateway has the option to use either UDP
> or TCP.  The Media
>                       > Gateway
>                       > Controller has the option to assign an alternative
> address and/or port for
>                       >
>                       > establishment of the association, but must respect
> the initial choice of
>                       > protocol.
>
>                                       Tom
>
>                                       I have the follwing sceanrio:
>
>                                       MGC listen (TCP accept) on the
> Megaco well know TCP port #.
>                       MG does a TCP connect to that port #.
>                       MGC accepts MG.
>                       MG sends a ServiceChange to register with MGC with a
> TCP port # set to another TCP port #
>                       (not the Megaco TCP default port #).
>                       What happens next?
>                       1) MGC send the ServiceChange Reply to MG via the
> Megaco TCP port # connection.
>                            Close that connection.  Open a TCP socket on
> the MG supplied TCP port# and do a TCP accept
>                             and wait for MG to connect to that TCP port#.
> After MG connects to that TCP port#,
>                              MG will receive all future MGC message via
> this port#.  MG does not have to do another
>                              ServiceChange.
>                       2) MGC close the Megaco TCP port# connection to MG.
>                            Open a TCP socket on the MG supplied TCP port#
> and do a TCP accept and wait for MG to connect
>                            to that TCP port#.  After MG connects to that
> TCP port#, MG can wait for the ServiceChange Reply
>                             from MGC on this port#.
>                       3)  Something else.
>
>                                       For UDP it is clear and no big deal
> for MGC to send the ServiceChange Reply to MG using the
>                       MG supplied UDP port#.  No TCP connection
> establishment problem.
>
>                                       I hope you understand what I am
> asking.
>                       Can the Standard be clarifies so that TCP and UDP
> follows the same registration sequence?
>
>                                       Thanks
>                       Chuong
>
>                                       --
>                         Alcatel USA, Inc             Internet:
> [email-masked]
>                         1000 Coit Road Plano, Texas 75075           Phone:
> (972) 519-4613
>                         **** The opinions expressed are not those of
> Alcatel USA, Inc ****
>
>
>                               --
>                         Alcatel USA, Inc             Internet:
> [email-masked]
>                         1000 Coit Road Plano, Texas 75075           Phone:
> (972) 519-4613
>                         **** The opinions expressed are not those of
> Alcatel USA, Inc ****
>
>                       --
>                         Alcatel USA, Inc             Internet:
> [email-masked]
>                         1000 Coit Road Plano, Texas 75075           Phone:
> (972) 519-4613
>                         **** The opinions expressed are not those of
> Alcatel USA, Inc ****
>
>
>       --
>         Alcatel USA, Inc             Internet:
> [email-masked]
>         1000 Coit Road Plano, Texas 75075           Phone:    (972)
> 519-4613
>         **** The opinions expressed are not those of Alcatel USA, Inc ****
>
>

---

From: Pekka Pessi <[email-masked]>
Date: Wed, 19 Jan 2000 12:16:22 +0200

Tom-PT Taylor <[email-masked]> writes:
>someone has connected to a TCP, no one else can.

        I don't understand.

>Hence the MGC has to tell

        Agreed.

>since it's not pre-determined, so the MG-supplied address and port do have

        I agree with Brian. MGC can send all further messages back to the
        same IP address/port that was used to send the service change
        request. There is absolutely no need to specify a port number in
        ServiceChange.

>TCP connection set up between the MG and the MGC.  The MGC will typically
include this parameter in order to tell the MG to move to a new port.

        Replace it with text as follows.

The ServiceChange command or response may contain a ServiceChangeAddress
parameter.  The MGC can include this parameter in order to tell the MG to
move to another MGC.

>life of the association."

                                        Pekka