TCP/UDP Ports

NOTE

TCP and UDP Ports CompTIA's objective for this section states “Describe the functions of TCP/UDP ports,” which leaves you wondering if there is a difference between TCP and UDP ports. In reality there isn't. It's simply that some protocols use UDP and others use TCP.


  • Define the function of TCP/UDP ports and identify well-known ports.

The TCP/IP protocol suite offers so many services and applications that a mechanism is needed to identify to which protocol the incoming communications should be sent. That mechanism is a TCP/IP port.

Each TCP/IP protocol or application has a port associated with it. When a communication is received, the target port number is checked to see what protocol or service it is destined for. The request is then forwarded to that protocol or service. Take, for example, HTTP, whose assigned port number is 80. When a Web browser forms a request for a Web page, the request is sent to port 80 on the target system. When the target system receives the request, it examines the port number and when it sees that the port is 80, it forwards the request to the Web server application.

You can understand ports by thinking about the phone system of a large company. You can dial a central number (analogous to the IP address) to reach the switchboard, or you can append an extension number to get to a specific department directly (analogous to the port number). Another analogy is an apartment block. An apartment block has a single street address, but each apartment in the building has its own apartment number. And no, we are not going to suggest a poor comparison between an apartment suite and the TCP/IP protocol suite. Oops, too late!

TCP/IP has 65,535 ports available, but they are broken down into three designations:

  • Well-known ports— The port numbers range from 0 to 1023. When CompTIA states “identify well-known ports,” this is what it is referring to.

  • Registered ports— The port numbers range from 1024 to 49151. Registered ports are used by applications or services that need to have consistent port assignments.

  • Dynamic or private ports— The port numbers range from 49152 to 65535. These ports are not assigned to any protocol or service in particular and can be used for any service or application.

It is common for protocols to establish communication on one of the well-known ports and then move to a port in the dynamic range for the rest of the conversation. It's a bit like using a CB radio, in that you try to get a “breaker” on Channel 19, but then you go to another channel to have a conversation, leaving 19 open for others.

NOTE

IANA You can obtain a list of port numbers from Internet Assigned Numbers Authority (IANA), at www.iana.org/assignments/port-numbers.


Understanding some of the most common TCP/IP port assignments is important because administrators are often required to specify port assignments when working with applications and configuring services. Table 6.3 shows some of the most well-known port assignments. For the Network+ exam, you should concentrate on the information provided in this table, and you should be able to answer any port-related questions you might receive.

Table 6.3. Some of the Most Common TCP/IP Suite Protocols and Their Port Assignments
Protocol Port Assignment TCP/UDP Service
FTP 21 TCP
SSH 22 TCP
Telnet 23 TCP
SMTP 25 TCP
DNS 53 UDP
TFTP 69 UDP
HTTP 80 TCP/UDP
POP3 110 TCP
NNTP 119 TCP
NTP 123 TCP
IMAP4 143 TCP
SNMP 161 UDP
HTTPS 443 TCP

Although these are the standard ports for each of these protocols, in some cases it's possible to assign other port numbers to services. For example, you might choose to have one Web server application listen to the default port 80 while another listens to a different port. The result would be that if a user accesses the server but specifies a different port number, the user would be directed to the other Web server application running on the server.

EXAM TIP

Port Numbers You should expect to know what port numbers are used for each protocol for the Network+ exam.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.211.87