CompTIA Network+ (N10-009) · Lesson 6
Common Ports and Protocols, Part 1
Identify the ports and transport protocols used by FTP, SFTP, SSH, Telnet, SMTP, DNS, DHCP, TFTP, HTTP and NTP, explain what each service does, and recognize which ones send data in cleartext.
Tip: turn your phone sideways or use full screen for larger labels.
Captions match the narration word for word. Press Space to play or pause and the arrow keys to change scenes.
Learning objective
Identify the ports and transport protocols used by FTP, SFTP, SSH, Telnet, SMTP, DNS, DHCP, TFTP, HTTP and NTP, explain what each service does, and recognize which ones send data in cleartext.
Exam mapping
Domain 1.0: Networking Concepts (23%). Objective 1.4 in the official N10-009 exam objectives.
Key takeaways
- A port number identifies the service on a host. Servers listen on well-known ports (0-1023); clients usually pick an ephemeral source port (49152-65535). IP address plus port is a socket.
- FTP uses TCP 21 for control and TCP 20 for data (active mode) and sends credentials in cleartext; SFTP runs inside SSH on TCP 22 and is encrypted.
- Telnet (TCP 23) is a cleartext remote command line; SSH (TCP 22) replaces it with encryption and strong authentication.
- SMTP (TCP 25) sends and relays mail between servers; DNS uses UDP 53 for lookups and TCP 53 for zone transfers and large responses.
- DHCP uses UDP 67 (server) and 68 (client) and the Discover, Offer, Request, Acknowledge (DORA) exchange; TFTP (UDP 69) moves files with no login.
- NTP (UDP 123) keeps clocks in sync; HTTP (TCP 80) carries web traffic in cleartext.
Exam tips
How the exam asks about this
Questions describe a situation and expect you to recognize the concept behind it.
| If the question mentions… | Think |
|---|---|
| Secure remote command line; replaces Telnet | SSH, TCP 22 |
| File transfer encrypted inside SSH | SFTP, TCP 22 |
| Separate control and data connections, cleartext login | FTP, TCP 20/21 |
| Zone transfer between DNS servers | DNS, TCP 53 |
| Discover, Offer, Request, Acknowledge | DHCP, UDP 67/68 |
| Load a switch's firmware, no authentication | TFTP, UDP 69 |
| Synchronize clocks so logs line up | NTP, UDP 123 |
| Relay mail from server to server | SMTP, TCP 25 |
Common traps
- SFTP and FTPS are different: SFTP runs over SSH on port 22, while FTPS is FTP secured with TLS.
- TFTP is not a lighter, secure FTP: it uses UDP 69 and has no login at all.
- DNS isn't UDP only. Zone transfers and large responses use TCP 53, so a firewall that allows only UDP 53 can break them.
- DHCP's server port is 67 and the client's is 68; don't swap them. Port 20 is FTP data, port 21 is FTP control.
Practice
Exam-style questions
Answer each one before you open the explanation.
Question 1. An administrator must manage a remote switch from the command line, and policy forbids sending credentials in cleartext. Which protocol and port should be used?
- Telnet, TCP 23
- SSH, TCP 22
- TFTP, UDP 69
- HTTP, TCP 80
Show answer
B. SSH, TCP 22. SSH on TCP 22 gives an encrypted, authenticated remote command line. Telnet offers the same kind of remote access, but it sends the password in cleartext.
Question 2. Users on a new subnet can't obtain IP addresses automatically. Which ports must be allowed between the clients and the address server?
- TCP 20 and 21
- UDP 123
- UDP 67 and 68
- TCP 25
Show answer
C. UDP 67 and 68. DHCP uses UDP 67 on the server and UDP 68 on the client. TCP 20 and 21 are FTP, UDP 123 is NTP and TCP 25 is SMTP.
Question 3. Which TWO protocols use port 22 by default? (Select TWO.)
- SFTP
- Telnet
- FTPS
- SSH
- TFTP
Show answer
A. SFTP and D. SSH. SFTP runs inside an SSH session, so both use TCP 22. FTPS is FTP secured with TLS, not SSH, Telnet uses 23 and TFTP uses UDP 69.
Question 4. During an investigation, the firewall, web server and database logs show different times for the same event. Which protocol should be configured to prevent this?
- Syslog, UDP 514
- DNS, UDP 53
- SMTP, TCP 25
- SNMP, UDP 161
- NTP, UDP 123
Show answer
E. NTP, UDP 123. NTP on UDP 123 synchronizes device clocks so log timestamps line up. Syslog is tempting because it collects logs, but it doesn't correct the clocks that stamp them.
Question 5. A firewall in front of a company's primary DNS server allows only UDP 53. Lookups work, but the secondary DNS server can't copy the zone. Which rule should be added?
- Allow TCP 53
- Allow UDP 69
- Allow TCP 23
- Allow UDP 68
Show answer
A. Allow TCP 53. Zone transfers use TCP 53, while everyday lookups use UDP 53. UDP 69 is TFTP, TCP 23 is Telnet and UDP 68 is the DHCP client port.
Transcript
Lesson transcript
The full narration, scene by scene. The captions file contains the same text with timings.
Scene 1 · 0:00
Lesson 6: Ports and protocols, part 1. Welcome to lesson six, where we start objective 1.4: common ports and protocols. Our online store's server has one IP address, but it runs many services, and port numbers tell it which service each message is for. Today we'll cover ten of them, from FTP on ports 20 and 21 up to NTP on 123. Lesson seven covers the other ten.
Scene 2 · 0:27
Port numbers and sockets. Every TCP or UDP message carries two port numbers. The destination port names the service, like 80 for a web server. The source port is picked by the client, usually from the dynamic, or ephemeral, range of 49152 to 65535, so the reply finds its way back. Servers listen on the well-known, or system, ports, zero to 1023. Ports 1024 to 49151 are registered ports. An IP address plus a port is called a socket.
Scene 3 · 0:59
FTP vs. SFTP. FTP, the File Transfer Protocol, uses two TCP connections. The login and commands go over port 21, the control connection, and in active mode the files come over port 20, the data connection. But FTP sends the username and password in cleartext. SFTP fixes that. It's a file transfer that runs inside an SSH session on port 22, so the login and files are encrypted. Don't confuse it with FTPS, which is FTP over TLS.
Scene 4 · 1:32
Telnet vs. SSH. To manage the store's routers and servers, admins open a remote command line. Telnet does this on TCP port 23, but everything, including the password, crosses the network in cleartext, so anyone capturing traffic can read it. SSH, the Secure Shell, on TCP port 22, does the same job with encryption and strong authentication. SSH replaces it. Notice that SSH and SFTP share port 22.
Scene 5 · 2:00
SMTP: sending mail. When the store emails an order confirmation, its mail server uses SMTP, the Simple Mail Transfer Protocol, on TCP port 25. SMTP sends and relays mail between mail servers. The sending server looks up the recipient domain's MX record in DNS, then delivers the message to that server. Encryption on port 25 is optional, and mail apps submit messages on port 587, which is in the next lesson.
Scene 6 · 2:30
DNS: UDP and TCP 53. DNS, the Domain Name System, uses port 53. A browser asks for shop.example.com, and a DNS resolver answers with the store's IP address. Everyday lookups are small, so they use UDP. TCP port 53 is used for zone transfers, when one DNS server copies a whole zone from another, and for responses too large for UDP. So DNS is the classic answer for both TCP and UDP.
Scene 7 · 2:59
DHCP: getting an address. How does a new laptop get an IP address? With DHCP, the Dynamic Host Configuration Protocol, over UDP. The server listens on port 67, and the client on port 68. It takes four messages, known as DORA. The laptop broadcasts a Discover, because it doesn't know any server yet. A server answers with an Offer. The laptop sends a Request for that address, and the server confirms the lease with an Acknowledgment, along with the default gateway and DNS servers.
Scene 8 · 3:33
TFTP and NTP. TFTP, the Trivial File Transfer Protocol, uses UDP port 69. It has no login and no encryption. Network devices use it to load configurations and firmware, and computers use it to boot over the network with PXE, so keep it on trusted networks. NTP, the Network Time Protocol, uses UDP port 123 to keep clocks in sync. That matters: logs from different devices only line up, and certificates and logins only work, when the time is right.
Scene 9 · 4:07
HTTP: the web on port 80. Finally, HTTP, the Hypertext Transfer Protocol, on TCP port 80. It's how browsers request web pages, but plain HTTP isn't encrypted. Anyone on the path can read the pages, form data and session cookies, or even change them. That's why our store answers on port 80 only to redirect visitors to HTTPS on port 443. HTTPS and the remaining ports come in the next lesson.
Scene 10 · 4:35
All ten at a glance. Here are all ten together, with three patterns to remember. First, only SSH and SFTP are encrypted, and both use port 22. Telnet, FTP, TFTP and HTTP are cleartext. Second, DHCP, TFTP and NTP use UDP, DNS uses both, and the rest use TCP. Third, the pairs: FTP has 20 for data and 21 for control, and DHCP has 67 for the server and 68 for the client.
Scene 11 · 5:05
How the exam asks about this. Exam questions often describe a need. A secure replacement for Telnet is SSH, port 22. Encrypted file transfer over SSH is SFTP. Allowing zone transfers needs TCP 53. Clients that can't get an address point to DHCP, UDP 67 and 68. Log timestamps that don't match point to NTP, port 123. Loading firmware with no login is TFTP, port 69. And server-to-server email relay is SMTP, port 25.
Scene 12 · 5:34
Recap: ports and protocols, part 1. To recap: a port number tells a server which service a message is for. SSH and SFTP share port 22 and are encrypted, while Telnet on 23 and FTP on 20 and 21 are cleartext. SMTP relays mail on 25, DNS resolves names on 53, DHCP hands out addresses on 67 and 68, TFTP moves files on 69, HTTP serves web pages on 80, and NTP syncs clocks on 123. Next: HTTPS, SNMP, LDAP, RDP and the rest of the list.
Sources and accuracy
Checked against the official CompTIA N10-009 exam objectives and the standards below on October 24, 2026. Diagrams and addresses in the animation are illustrative.
- CompTIA Network+ N10-009 exam objectives (objective 1.4)
- RFC 6335: IANA procedures for port numbers (system, user and dynamic ranges)
- RFC 4253: The Secure Shell (SSH) Transport Layer Protocol (port 22)
- RFC 2131: Dynamic Host Configuration Protocol (UDP 67 and 68)
- RFC 7766: DNS Transport over TCP
This free course is independent and isn't affiliated with or endorsed by CompTIA. CompTIA and Network+ are trademarks of CompTIA, Inc.
Preparing a team for Network+?
I run hands-on networking and cloud training for teams, built around your own environment and goals.