Ports and Protocols Basics

CompTIA Network+ • Lesson 4

Ports and Protocols Basics

Devices may have the right IP address and a working network path, but they still need rules for communication and a way to reach the correct service. That is where protocols and ports come in. This lesson gives learners the core mental model they need before deeper networking and troubleshooting.

Traffic Types TCP vs UDP Quiz + Rationales
By the end of this lesson
  • Understand what a protocol is
  • Understand what a port is
  • Recognize the difference between TCP and UDP
  • Remember common well-known ports at a beginner level
  • Think more clearly about service-based troubleshooting
Core idea

What Is a Protocol?

A protocol is a set of rules that devices use to communicate. Different protocols are designed for different purposes, such as web traffic, email, remote access, or name resolution.

Simple definition:

A protocol is the agreed set of rules for a specific type of network conversation.

  • Web browsing uses different protocols than email or remote login.
  • Protocols help devices know how to format, send, and receive data.
  • When the wrong protocol or blocked traffic is involved, the service may fail even if the network path exists.
Core idea

What Is a Port?

A port helps identify which service or application on a device should receive the traffic. Think of the IP address as the building and the port as the specific door or department.

Simple definition:

A port points traffic to the correct service on a device.

  • One device can run many services at the same time.
  • Ports help keep those services separated logically.
  • A blocked or incorrect port can break a service even when connectivity exists.
Mental model

IP Address vs Port

Learners often confuse these two. They are related, but they do different jobs.

192.168.1.50 Device location :443 Specific service door IP = which device • Port = which service on that device

IP Address Answers

  • Which device?
  • Where is the destination host?
  • How do I reach that system on the network?

Port Answers

  • Which service?
  • Which application should receive the traffic?
  • What kind of conversation is this?
Transport basics

TCP at a Beginner Level

TCP is focused on reliable, ordered delivery. It is used when it is important that data arrives correctly and in the right order.

  • Reliability matters
  • Order matters
  • Often used for web, email, and remote administration
Think:

TCP is more careful and confirmation-focused.

Transport basics

UDP at a Beginner Level

UDP is lighter and faster, but it does not focus on the same level of delivery confirmation as TCP. It is often used when speed matters more than perfect reliability.

  • Lower overhead
  • Often faster for real-time traffic
  • Common for some streaming, voice, and quick request/response services
Think:

UDP is more lightweight and speed-oriented.

Simple memory hook:

TCP = “Make sure it gets there correctly.”
UDP = “Send it fast with less overhead.”

Know these cold

Common Ports and Services

You do not need to memorize every port on earth. But for Network+ you should get comfortable with the most common ones and what they are associated with.

Port Protocol / Service Typical use Beginner memory hook
20 / 21 FTP File transfer Old-school file movement
22 SSH Secure remote command-line access Secure remote login
23 Telnet Legacy remote access Remote login, but insecure
25 SMTP Mail sending Sending email
53 DNS Name resolution Find the IP for a name
67 / 68 DHCP Automatic addressing Hands out IP settings
80 HTTP Web traffic Regular web
110 POP3 Email retrieval Older mail download
143 IMAP Email retrieval / sync Mail stays on server
161 / 162 SNMP Network monitoring / management Monitoring devices
389 LDAP Directory services User / directory lookup
443 HTTPS Secure web traffic Secure web
3389 RDP Remote Desktop Remote Windows desktop
Real world

Website Won’t Load

The device may have connectivity, but if the right web traffic or secure web traffic is blocked, the page still fails.

Real world

Remote Login Fails

A system might be reachable by IP, but the remote access service or its port could be blocked or unavailable.

Real world

Email Problems

Sending and receiving email may rely on different protocols and ports, which helps explain why one mail function can work while another fails.

Interactive mini drills

Quick Ports and Protocols Drills

Focus on the mental model: what service is being used, and what kind of traffic it likely needs.

Drill 1

A user opens a secure website in a browser. Which common port is most associated with that traffic?

Why: HTTPS uses port 443 and is the standard for secure web traffic.

Drill 2

A technician needs secure remote command-line access to a server. Which service fits best?

Why: SSH is used for secure remote command-line administration and is associated with port 22.

Drill 3

Which statement best matches TCP?

Why: TCP is known for being more reliability-focused and ordered compared with UDP.

Drill 4

What does a port mainly help identify?

Why: The IP gets traffic to the device, while the port helps direct it to the correct service or application.
Remember this

Foundational Troubleshooting Questions

  • Is the device reachable at all?
  • Is the correct service running on the target?
  • Is the expected port allowed or blocked?
  • Is the user trying to use the right protocol for the job?
  • Is this a full connectivity issue or a service-specific issue?
Troubleshooting habit

What Strong Beginners Start Doing

  • Separate device reachability from service reachability
  • Think about what app or service the user is actually trying to use
  • Associate common protocols with common ports
  • Notice that “internet works” does not mean every service works
  • Use symptoms to narrow whether the issue is path, service, or port related
Lesson quiz

Network+ Lesson 4 Quiz

Score at least 75% to unlock the next lesson CTA.

1) What is the best definition of a protocol?

Rationale: A protocol defines the rules for a certain kind of communication. The other choices describe hardware or unrelated settings, not communication behavior.

2) What is the main role of a port?

Rationale: Ports help deliver traffic to the correct service or application on the destination device. They do not replace IP addresses or provide electrical functions.

3) Which statement best describes TCP?

Rationale: TCP is commonly taught as the more reliable, ordered transport method. The wrong answers either confuse it with unrelated hardware or completely different services.

4) Which statement best describes UDP?

Rationale: UDP is the lighter, lower-overhead transport option. It is often used where speed and timeliness matter. It does not do DNS by itself and does not guarantee the same behavior as TCP.

5) Which common port is associated with HTTPS?

Rationale: HTTPS uses port 443. Port 25 is SMTP, 110 is POP3, and 3389 is RDP. This is one of the most important common port mappings to remember.

6) Which service is associated with secure remote command-line access?

Rationale: SSH is the standard secure remote shell service and is commonly associated with port 22. The other protocols are for web browsing or email, not secure command-line administration.
Need 75% or higher to unlock the next lesson.
Lesson marked complete.

Suggested Next Page

Next, move into network devices and infrastructure so learners can connect ports, protocols, and traffic flow to the physical and logical equipment that carries it.

Next: Network Devices and Infrastructure Basics