Common Ports – CompTIA A+ 220-1201 – 2.1

Applications commonly use a well-known port number for network communication. In this video, you’ll learn about the common ports for FTP, SSH, Telnet, SMTP, DNS, DHCP, HTTP, HTTPS, POP3, IMAP, SMB, LDAP, LDAPS, and RDP.


As we’ve discussed in a previous video, the port numbers used by TCP and UDP can be very important when trying to communicate to a service, so it’s useful to know what those port numbers are. If you’re trying to troubleshoot any type of communications issue. We might also need to know these port numbers if we’re performing some type of firewall configuration. Our firewalls often use TCP and UDP port numbers as one of the criteria that it uses to allow or to block network traffic.

As you go through this video, you’ll find there are a number of port numbers that you’re required to know as part of your A-plus studies. You’ll find that memorizing these port numbers can sometimes feel a bit tedious. But after you start using these applications, configuring firewalls and troubleshooting network communication, you’ll find that most of these port numbers become second nature.

For the purposes of your A-plus studies, make sure that you understand not only the port number and the protocol associated with it, but that you understand why that particular protocol is important and how it’s used on the network. The first port numbers we’ll look at are port numbers TCP port 20 and TCP port 21. These two port numbers are commonly associated with FTP or the file transfer protocol.

FTP is a generic file transfer protocol that can be used by many different operating systems to transfer information from one device to another. And different types of FTP may use one or both of these protocols. TCP port 20 is often used as the active data transfer, and port 21 is often used as the administration or control port.

The FTP protocol often requires you to have some type of authentication into this system, so it may ask for a username, a password, or some other type of authentication factor. FTP can also be configured with an anonymous or generic login, so that anyone can log in, regardless of what the username or password might be. FTP is also a full featured protocol that not only can transfer a file, but can list the files available in a particular directory.

We can add, delete, change the file name, and perform other administration functions, as well. As part of our tasks as server administrators or network administrators, we are often required to connect to a remote device and make configuration changes at the command line. To be able to do this securely across the network, we need to use a protocol that can encrypt all of this data, as we’re sending it from one side to the other.

The most common protocol used for this function is SSH or secure shell. It provides an encrypted communication link over TCP port 22. This is very similar to the old style Telnet protocol, but Telnet is one that we commonly no longer see in use because it does not provide any type of encryption. If you’re communicating at the command line to a server, you should always be using SSH, and you’ll find that it almost always is using TCP port 22.

However, you may find that there is a system in your network that is very old that does not support SSH, and the only way to administer that device at the command line is using the older Telnet protocol. Telnet stands for telecommunications network, and it commonly communicates over TCP port 23. Visually and functionally, this works identical to SSH. You have a command line. You can log into a device with your username and password. You can administer that device remotely.

But the major difference is that all of the communication used for Telnet is in the clear. There’s no encryption used for Telnet, and that’s why most organizations will prevent anyone from using the Telnet protocol, and instead, recommend that you use SSH to perform this communication. Email continues to be one of the most popular forms of communication across our networks. And to be able to facilitate that communication, we need some type of protocol that can send mail from one server to another.

That protocol is the Simple Mail Transfer Protocol or SMTP. SMTP commonly uses TCP port 25 to be able to send these email messages from one email server to another. You may also find that some devices are configured to send information to the email server initially, also using this SMTP protocol. So not only are you configuring this on your mail server. You may also find that you’re configuring SMTP with the appropriate port number on your local device.

To be able to receive email messages, we would commonly use protocols such as IMAP or POP3, and we’ll talk about those protocols and their associated port numbers later in this video. In these videos so far, we’ve talked a lot about devices able to communicate with each other using IP or internet protocol. The internet protocol address is one very similar to what you would see here. 162.159.246.164.

But when we’re typing things into our browser, we’re not typing in a bunch of numbers. We’re typing in the name of a website, such as www.professormesser.com. In order to translate this fully qualified domain name into a usable IP address for network communication, we need to perform a translation using the domain name system or DNS. DNS commonly uses UDP port 53.

As you can imagine, DNS is a very popular and important service because we almost never memorize IP addresses to be able to communicate to these devices, but it’s very common to remember the fully qualified domain name. For that reason, it’s very common to have multiple DNS servers for redundancy, so that we are always able to resolve the fully qualified domain name to the appropriate IP address.

The computer on your network was probably not manually configured with a set of IP addresses, subnet masks, default gateways, or DNS servers. This was done automatically when you turn your computer on using the dynamic host configuration protocol, or DHCP. DHCP happens automatically behind the scenes, and it makes the entire process of configuring your system with these addresses completely seamless.

DHCP commonly uses UDP port 67 and UDP port 68. On your network is a DHCP service that may be on a standalone server or appliance, or may be integrated into a small office home office wireless router that you might have at home. On this server is a pool of available IP addresses. And when a device connects to the network, it requests an IP address and configuration parameters from that pool.

When a device starts up, it receives that IP address, and it leases that IP address for a certain amount of time. When that lease is up, it can choose to renew the lease or give the IP address back and put it into the pool for someone else to use. System administrators can also use DHCP to manually configure IP addresses that will always be assigned to particular devices. So if you have a printer or server that you would like to always have the same IP address, you can reserve that IP address in your DHCP server, and it will be automatically assigned with the same IP address every time that printer or server starts up.

You’re probably watching this video in a browser, and to be able to perform that functionality, you’re probably using HTTP or HTTPS. This is the hypertext transfer protocol or hypertext transfer protocol secure. The standard form of HTTP sends all of the HTTP data over a non-encrypted or in-the-clear communication, and it often uses TCP port 80. If you see any traffic using TCP port 443, it’s probably using the secure version of HTTP, which means that all of that web communication inside of that packet will be encrypted.

A large percentage of the devices you communicate to in your browser are probably going to use HTTPS these days, but you’ll still find a number of web services that are not using the encrypted version, and instead are sending all of their traffic via TCP port 80 and the HTTP protocol. If you’re using an email client on your computer or your mobile device, you may be receiving emails using a number of different protocols. Two of the more popular protocols are POP3 and IMAP.

POP3 is the post office protocol version 3, and it commonly uses TCP port 110 to be able to transfer data down to your computer. A newer and somewhat more functional protocol for receiving email is IMAP4, or the internet message access protocol version 4. IMAP commonly uses TCP port 143. IMAP provides a number of additional features not available in POP3, such as the management of the inbox from multiple clients.

You’re able to make folders and transfer emails into those folders, and all of those updates will be synchronized across all of your different systems. And all of those updates will be synchronized across all of your different email clients. If you’re using Microsoft Windows, there’s a process for transferring data within Windows that uses a protocol named server message block, or SMB. You may also see this referred to as the common internet file system or CIFS.

Not only is this used for file transfers. It’s used to send information to printer queues and for other processes where Windows needs to communicate information between different Windows devices. Older Windows devices used an additional protocol inside of TCP/IP called NetBIOS. This NetBIOS protocol used two primary port numbers to be able to communicate. UDP port 137 used a NetBIOS name service, which is very similar to the DNS name service that we talked about earlier. And to be able to set up sessions to transfer files, it uses TCP port 139.

On most modern versions of Windows, you’ll find direct connectivity between IP addresses that don’t use the NetBIOS protocol. We refer to that as direct communication or NetBIOS-less communication, and it often uses TCP port 445. Most organizations will have a central database that contains all of the important information about the devices, users, and important resources available on their network. This is usually a directory of services or a database that contains all of this information, and to be able to access this database, we use a standard set of protocols.

One of these protocols is LDAP or LDAPS. This stands for the Lightweight Directory Access Protocol, or the Lightweight Directory Access Protocol Secure. LDAP commonly uses TCP port 389. This directory is usually separated into different categories, such as an organization, an organizational unit, or a common name.

For example, at Messer Studios, we might have a production organizational unit, a support organizational unit, and an engineering organizational unit. And of course, within those there may be individuals using a common name, such as Sam or Daniel. And we might also have a database called tech docs. Using LDAP, we can refer to this database to find where these components might be, and in some cases even provide additional details, such as authentication for any individual users. A very common use of LDAP is Microsoft’s Active Directory infrastructure, where that database is able to be referenced using the LDAP protocol.

If you are troubleshooting technology, then you’re probably very familiar with remote control access of a separate machine. These days, we have users around the world, and it’s not very practical for you to visit every single one of those users directly to be able to solve problems on their computer. In those cases, we’ll probably use some type of remote access protocol, such as RDP or remote desktop protocol. This allows you to view and share the desktop on a remote device using TCP port 3389.

This is primarily used to access Windows devices, and to be able to control those Windows devices across the network. You can usually do this from a Windows device itself or from many other operating systems, as well. You can use RDP to control an entire computer, or to simply run a single application on that remote computer. And although RDP is commonly associated with connecting to Windows devices, there are also many RDP clients that would allow you to connect to that Windows computer from Mac OS, Linux, Unix, iPhone, and other operating systems, as well.