Understanding Well-Known Port Numbers for Networking Services
Heads up!
This summary and transcript were automatically generated using AI with the Free YouTube Transcript Summary Tool by LunaNotes.
Generate a summary for freeIf you found this summary useful, consider buying us a coffee. It would help us a lot!
Introduction
In the realm of networking, communication between devices hinges on a set of predefined standards, which include port numbers. Understanding well-known port numbers is essential for anyone involved in IT and networking. In this article, we’ll dive deep into various networking services that utilize specific port numbers, how they facilitate communication, and the importance of these ports in network security and management.
What are Well-Known Port Numbers?
Well-known port numbers are specific numerical values ranging from 0 to 1023, assigned by the Internet Assigned Numbers Authority (IANA) to key networking protocols and services. Using standard port numbers ensures that the communicating devices (servers and clients) and any intermediary firewalls correctly interpret the traffic.
Importance of Knowing Port Numbers
- Effective Communication: For proper network communication, both client and server need to agree on the port number.
- Firewall Configuration: Firewalls use port numbers to allow or disallow traffic, making it vital to know which ports to open for desired services.
- Security Considerations: Understanding which services run on which ports helps in securing your network and preventing unauthorized access.
Commonly Used Port Numbers and Protocols
Let's break down some of the critical services and their respective port numbers:
File Transfer Protocol (FTP)
- TCP Ports: 20 (Data Transfer) and 21 (Control)
- Overview: FTP is used for transferring files between devices. It often requires authentication, allowing users to list files, upload, and manage files on an FTP server.
Secure Shell (SSH)
- TCP Port: 22
- Overview: SSH provides a secure way to access a remote device's command line interface, encrypting data to protect against interception.
Telnet
- TCP Port: 23
- Overview: Telnet allows users to connect to remote devices, but unlike SSH, it transmits data in plain text, making it less secure.
Simple Mail Transfer Protocol (SMTP)
- TCP Port: 25
- Overview: SMTP is used for sending emails from mail clients to mail servers and between mail servers.
Domain Name System (DNS)
- UDP Port: 53
- Overview: DNS translates human-readable domain names to IP addresses, facilitating easy internet navigation.
Dynamic Host Configuration Protocol (DHCP)
- UDP Ports: 67 (Server) and 68 (Client)
- Overview: DHCP automatically assigns IP addresses to devices on a network, streamlining the configuration process.
Hypertext Transfer Protocol (HTTP) and HTTPS
- TCP Ports: 80 (HTTP) and 443 (HTTPS)
- Overview: These protocols are essential for web browsing, with HTTPS providing a secure layer of encryption.
Post Office Protocol (POP3) and Internet Message Access Protocol (IMAP)
- TCP Ports: 110 (POP3) and 143 (IMAP)
- Overview: While POP3 downloads emails for offline access, IMAP is used for real-time synchronization across multiple devices.
Server Message Block (SMB)
- TCP Ports: 445 (direct SMB)
- Overview: SMB enables file sharing and printer access between networked devices, predominantly in Windows environments.
Simple Network Management Protocol (SNMP)
- UDP Ports: 161 (queries) and 162 (traps)
- Overview: SNMP is used for network management and monitoring, allowing network administrators to retrieve performance data from devices.
Lightweight Directory Access Protocol (LDAP)
- TCP Port: 389
- Overview: LDAP is widely used for querying and modifying directory services, notably in conjunction with Active Directory.
Remote Desktop Protocol (RDP)
- TCP Port: 3389
- Overview: RDP allows remote access to Windows desktop interfaces, enabling full control of a remote system.
Conclusion
Understanding well-known port numbers is critical for successfully navigating networking services. Whether it's transferring files using FTP, accessing email servers using SMTP, or ensuring security with SSH, these port numbers and the associated protocols are foundational to network operation. By familiarizing yourself with these standards, you'll be better equipped to manage and troubleshoot network environments effectively. Remember, regular practice and usage will help solidify your memory of these essential port numbers and their functions in the networking landscape.
in our previous video we talked about how services have port numbers that they use so that other devices can
communicate and use those services we refer to these as well-known port numbers because both the server and the
client need to know exactly what port number they'll use to communicate this is not only important for the server and
the client but it's also important for any firewalls that may be in the middle of that communication firewalls have to
decide whether to allow or disallow this traffic and they often make that decision based on the port number as we
go through this video you'll see that there are a lot of different port numbers that you should use and if
you've never worked with port numbers before this will seem like rote memorization but the port numbers
themselves become easier and easier to remember as you continue to use them it's important to know these port
numbers and what protocols are often used by a particular port number but it's also important to know when you
would use these protocols for example your exam might ask you what port number is used by an application that transfers
numbers with ftp or the file transfer protocol as the name implies this is a protocol that transfers files from one
device to another there are two port numbers used by ftp one is tcp port 20 this is for data transfers and tcp port
21 which is used to control the data transfer ftp is a generic way to transfer data between devices but it
commonly requires some type of authentication to log into that remote device so you might use a username and
password although some systems will allow you to log in as anonymous and use any password to gain access the ftp
protocol also includes a number of file management functions so when you connect to an ftp server you can list all of the
files on that server you can add delete rename and perform other file management functions all by using ftp
there may be times when you need to connect to a remote device through a terminal or command line front end it's
common to use secure shell or ssh to provide this terminal connection to a remote device ssh commonly communicates
over tcp using port 22 and it has this text-based front-end to be able to access that remote device although we
see plain text on our screen any communication sent over the network is sent as encrypted data that's where the
remote device using this text-based or console front-end and it's using telnet or the telecommunication network
protocol telnet commonly uses tcp port 23 to provide this connection just like ssh telnet provides this text-based
front-end that allows us to connect to the remote console of another device but unlike ssh all of the communication
between this telnet front-end and the telnet server is all sent in the clear or non-encrypted this means that anyone
who might be capturing packets between these two devices will see everything that you're sending over this link
including usernames passwords and everything else this is why we often say that you shouldn't use telnet on your
there are probably millions of email servers that are located on the internet and the protocol that those email server
use to communicate with each other is the simple mail transfer protocol or smtp smtp commonly uses tcp using port
25. not only is smtp used to communicate between mail servers but it's also used for our mail clients to send mail to a
mail server so if you're using a mail client on your mobile device or your desktop computer and you're sending an
email message you could be using smtp although it's common to use smtp to send mail receiving mail is done using a
completely different set of protocols so if you were to look at your email client you're probably using imap or pop3 to be
behind the scenes your system needs to be able to communicate with the professor messer web server but it has
no idea what the ip address is for that server to be able to resolve an ip address from that fully qualified domain
name your system will use dns or the domain name system dns commonly uses udp port 53 to be able to make this
connection between you and the dns server these are obviously very critical resources because we don't often
memorize ip addresses of servers and very often server ip addresses can change without any type of notification
it's dns that provides that resolution between a name that we're typing in on the browser and the ip address that will
be used for the actual communication if you've ever used your mobile device on the wi-fi network of a coffee shop
then you've automatically received an ip address that you can use on that network this ip address was assigned
automatically using the dynamic host configuration protocol or dhcp the well-known ports for dhcp are udp port
67 and udp port 68. of course you need a dhcp server to assign these ip addresses to devices on your network that
functionality is commonly built into the routers and wireless access points that we use these days this dhcp server will
have a large pool of ip addresses that can then be assigned to devices on your network all of these ip addresses are
assigned in real time so when you start up your computer it queries the dhcp server and the dhcp server assigns your
these ip addresses so you are only using this ip address for a certain amount of time and after that lease expires and
you're no longer on the network that ip address goes back in the pool for someone else to use
network administrators can also configure dhcp servers to always assign the same ip address to certain devices
so if there are routers firewalls switches and other infrastructure devices on your network your network
administrator may configure dhcp reservations so those devices always receive the same ip address every time
they're booted up this also means that if you need to change any of the ip configurations on these devices you
don't have to go to the devices to make those changes you simply make them on the dhcp server the next time that
device requests a dhcp address it will receive the new configuration if you've ever used a web browser then
you've used http and https http is the hypertext transfer protocol and this is the common protocol used by our browsers
to communicate to web servers there are two different protocols depending on the type of communication that you'll be
doing if you're communicating in the clear or in a non-encrypted form you would be using the http protocol which
uses tcp and port 80. if your browser's communicating over an encrypted connection then it's probably using
https the s being for secure and that uses tcp port 443. we mentioned earlier that sending email
messages can use smtp or the simple mail transfer protocol but to receive email messages you would commonly use pop3 or
imap pop3 is the post office protocol version 3 and it commonly uses tcp port 110 pop3 was designed to retrieve email
messages to an email client but it wasn't built for multiple email clients and of course these days we tend to walk
around with many different mobile devices all accessing the same email inbox to be able to synchronize across
all of these different mailboxes we commonly use imap4 or the internet message access protocol version 4. imap
commonly uses tcp port 143 to be able to download and manage that mailbox many operating systems have their own
method of transferring files and information between devices using that operating system windows commonly uses
server message block or smb to be able to provide this connection this is the protocol commonly used by microsoft
windows so if you're transferring files between devices or you're sending a print job to a printer it's probably
using smb you might also hear smb referenced as cifs or the common internet file system smb uses a number
of different protocols to be able to communicate and if you're communicating to an older windows machine you're
probably using netbios over tcp netbios is the network basic input output system this uses udp port 137 as a name service
function so that it can find devices on your network by the name and uses tcp port 139 to set up a session and
transfer data between devices on most modern versions of windows netbios isn't used devices can
communicate directly between each other using tcpip in those cases it would use a direct smb connection using tcp port
445. this allows us to have a direct s b communication between two devices by using only tcp
if you plan on doing any work as a network administrator you'll become very familiar with snmp or the simple network
management protocol snmp allows a network management device to query these infrastructure devices for performance
details and receive those metrics in return this uses udp port 161 to perform these queries you can also configure the
infrastructure device to monitor for certain metrics and if it exceeds any of those metrics it can send an alert to
if you're configuring snmp on a device it will ask you if you're using version one version two or version three version
one was obviously the original snmp version it sent structured information across the network but all of this
information was sent in the clear or in a non-encrypted form we introduced a newer version of snmp with snmp version
2 which allowed us to do bulk transfers of information but still all of that information was being sent in a
non-encrypted form to be able to include additional security with snmp you need to use snmp v3 this includes encryption
that allows us to have message integrity authentication and encryption of all of the snmp data
we use directories extensively on our modern networks and one very common protocol to use to query these
directories is ldap ldap is the lightweight directory access protocol and it commonly uses tcp port 389. there
are many implementations of ldap but one of the most popular is microsoft active directory which allows you to query that
active directory server using the ldap protocol if you've ever worked in a support role
or on a help desk then you've probably performed some type of remote access to someone's desktop one very popular
protocol to provide this remote communication is rdp or the remote desktop protocol this is the standard
these remote desktop services are available in many different editions of windows and if you're using windows
today then you probably have built into the operating system the ability to connect to or receive a remote desktop
application from that server although you'll find servers running rdp almost exclusively on windows there are clients
that you can run on almost any operating system so if you're running linux macos android or any other operating system
there's probably an application you can load that will allow you to connect to a windows device using the remote desktop