6.5 Server Applications and Ports

When a client application wants to make a connection to a remote computer, it is important that the connection is made to the correct server application on that remote computer. A remote computer might have any number of different server applications running at the same time. Example server applications would include:

• Web Server
• Video Server
• Mail Server

For instance, a web client (a browser) needs to connect to the web server running on the remote computer. So a client application not only needs to know which remote computer to connect to, it also needs to choose a particular application to interact with on that remote computer.

We use a concept called “ports” to allow a client application to choose which server application it wants to interact with. Ports are like telephone extensions. All of the extensions have the same phone number (IP Address) but each extension (server application) has a different extension number (port number).

When a server application starts up, it “listens” for incoming connections on the specified port. Once the server application has

TCP Ports
Figure 6.5: TCP Ports

registered that it is ready to receive incoming connections, it waits until the first connection is made.

So that client applications know which port to connect to, there is a list of well-known default ports for various server applications:

  • Telnet (23) – Login
  • SSH (22) – Secure Login
  • HTTP (80) – World Wide Web
  • HTTPS (443) – Secure Web
  • SMTP (25) – Incoming Mail
  • IMAP (143/220/993) – Mail Retrieval
  • POP (109/110) – Mail Retrieval
  • DNS (53) – Domain Name Resolution
  • FTP (21) – File Transfer

These are the normal ports for these applications. Sometimes servers will make applications available at non-standard ports. If you are doing web development, you may run a web server at a non-standard port like 3000, 8080, or 8888. If you see a URL like: http://testing.example.com:8080/login

the “8080” indicates that your browser is going to use the web protocols to interact with the server, but connect to port 8080 instead of the default port 80.

Back to Book’s Main Index