Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Aug 1998 14:27:24 -0600
From:      Allen Campbell <allenc@verinet.com>
To:        "G.R. Gaudreau" <grgaud@sprint.ca>
Cc:        freebsd-newbies@FreeBSD.ORG
Subject:   Re: Ports (was: FreeBSD main platform & Linux)
Message-ID:  <35DF29AC.70062752@verinet.com>
References:  <3.0.1.32.19980821053638.0068ea4c@pop.netaddress.com> <3.0.5.32.19980822074143.007a1aa0@pop3.sprint.ca> <3.0.6.32.19980822142714.007a9a20@pop3.sprint.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
G.R. Gaudreau wrote:
> 
[ My previous, badly formatted message, snipped ]
> 
> Something you mentioned brought up another question that's been on my
> mind lately. I realize that the ports you mention above are ports to
> FreeBSD, and that physical ports on my box are COM1 & 2 and the
> printer port, etc.; but I've also read of other ports, such as
> Internet ports and such. What are these last ports? Linux and FreeBSD
> seem to work quite a lot with these things, and I get the feeling
> that there are other "soft" ports, if I can put it that way, that
> UNIX-like OSs use. Anyone know what I'm talking about, and could you
> explain what they are and how they're used? Thanks For your input
> Allen, 'preciate it.

This is the classic case of a much too overloaded term.  I'll share what
I know.

I'll start with the FreeBSD ports collection.  To 'port' software is to
make it compatible with another platform.  A person doing this is may be
called a porter, who is porting software.  The result is sometimes
called a port.  FreeBSD maintains a large and growing collection of
these ports.  Using these ports, you may obtain the standard
distribution of some piece of software and allow the ports system to
automatically 'patch' and install the distribution.  The handbook and
the ports man page have more information on the FreeBSD ports
collection.

The ports you asked about are IP (internet protocol) ports.  IP ports
are specific to IP networks (such as the Internet.)  Every hoston an IP
network (including computers which dial into the Internet via an ISP)
has a unique IP address.  This address is a 32 bit number, usually
represented by a four octet symbol: 201.134.160.12, for example. When an
IP host needs to communicate with another IP host, it must establish a
connection with that host.  Because IP hosts can establish multiple
connections with multiple remote hosts (including the same remote host,)
it becomes necessary to distinguish connections.  This is what IP port
numbers do.

Some port numbers are referred to as `Well Known' ports.  These are
ports which are reserved for specific types of communication.  You will
find the list of Well Known ports in the /etc/services file.  You will
probably recognize a few of these:

ftp              21/tcp    #File Transfer [Control]
telnet           23/tcp    
http             80/tcp    www www-http         #World Wide Web HTTP

When you use FTP, your host connects to port number 21 of the remote
host.  Meanwhile, other people are also likely use FTP to connect to
port number 21 of the same remote host.  For example, the server at
ftp.cdrom.com is likely to have several thousand FTP connections
established at any moment.  You may also perform another FTP connection
to the same remote host while your first FTP connection is still going. 
So how is the remote system supposed to distinguish between all of these
different connections?

Any one connection between two IP hosts is described by a tuple of five
components:
  local IP address
  local port number
  Protocol
  remote IP address
  remote port number

If you establish two FTP sessions with port 21 at ftp.cdrom.com, the
only component that will change is the local port number.  When some
other host establishes a connection with port 21 of ftp.cdrom.com, their
local IP address and port will be different.  If you FTP to two
different hosts, the remote IP addresses will be different.  This is how
IP hosts distinguish between multiple connections.

The 'soft' ports you mentioned I don't recognize.

-- 
  Allen Campbell       |  Lurking at the bottom of the
  allenc@verinet.com   |   gravity well, getting old.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35DF29AC.70062752>