Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!prang!ejmmips.NOC.Vitalink.COM!ejm From: ejm@ejmmips.NOC.Vitalink.COM (Erik J. Murrey) Newsgroups: comp.protocols.tcp-ip Subject: Re: When is a link saturated? Message-ID: <32@prang.TEST.Vitalink.COM> Date: 21 Jan 91 23:55:42 GMT References: <1991Jan21.141530.7031@ccs.carleton.ca> <9101150900.AA08526@jerry.inria.fr> <9101150724.AA12358@mcsun.EU.net> <24@prang.TEST.Vitalink.COM> <1991Jan20.040130.18339@quick.com> Sender: usenet@prang.TEST.Vitalink.COM Reply-To: ejm@ejmmips.NOC.Vitalink.COM (Erik J. Murrey) Organization: Vitalink Communications Lines: 47 Nntp-Posting-Host: ejmmips.noc.vitalink.com In article <1991Jan21.141530.7031@ccs.carleton.ca>, jstewart@ccs.carleton.ca (John Stewart) writes: > 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. (The reason > >for this eludes me. It is permitted by the RFC's, but not > >required or particularly encouraged.) > > The main reason for doing so is to facilitate multiple sessions. For example > if 10 people telnet to a machine, each user will get their own telnetd > process communicating to them via a unique set of ports. Now imagine how > difficult this would be to do if you could only have one process running > connected to the well known telnet port. > -- Wait a minute. On most BSD implementations, "inetd" spawns a separate rlogind or telnetd process for each incoming telnet or rlogin session requested. The processes share the same local port number (23 or 513) since TCP/IP allows them to do so. (The connection is still unique based on (source ip address, source TCP port, dest ip address, dest TCP port) I will quote from RFC 854 (telnet) " The TELNET TCP connection is established between the user's port U and the server's port L. The server listens on its well known port L for such connections. Since a TCP connection is full duplex and identified by the pair of ports, the server can engage in many simultaneous connections involving its port L and different user ports U. " A netstat -n on all of the machines I can access show port 23 or 513 as the host's local port for incoming or foreign port for outgoing telnet/rlogin sessions. This allows a router to look at the source/dest TCP port to determine whether this is a rlogin or telnet session. --- Erik J. Murrey Vitalink Communications NOC ejm@NOC.Vitalink.COM ...!uunet!NOC.Vitalink.COM!ejm