Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.protocols.tcp-ip Subject: Re: When is a link saturated? Message-ID: <1991Jan21.184716.18820@Think.COM> Date: 21 Jan 91 18:47:16 GMT References: <9101150724.AA12358@mcsun.EU.net> <24@prang.TEST.Vitalink.COM> <1991Jan20.040130.18339@quick.com> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 30 In article <1991Jan20.040130.18339@quick.com> srg@quick.com (Spencer Garrett) writes: >-> I don't understand why the "remember the first exchange" is necessary. >-> Both telnet and rlogin use a reserved port number that appears in either >-> the source or destination TCP port fields on *every* packet that is >-> routed for the entire session. >Alas, no. A server is free to answer the connection request >with a different port number, and they commonly do. Either I misunderstand completely, or the above response is just plain wrong. If a server were to respond with a different port number, how would the client's system tell which server sent the response? The original poster was correct. Quick TCP lesson: When a client sends a TCP datagram to a server, the source port is generally an arbitrary port chosen for that connection, and the destination port is the server's well-known port. Datagrams from the server to that client will have the same port numbers, except the roles will be reversed (the source port will be the well-known port, the destination port will be the client's arbitrary source port). This rule, plus a similar rule for the IP addresses, is what permits a datagram to be associated with a particular connection. A connection is identified by the 4-tuple , so all datagrams in a connection must include the same four values (the sense of "local" and "foreign" changes for each direction, though). -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar