AP Networking • Practice & Review

Network Ports Practice Quiz: Common TCP and UDP Service Port Questions

Learn the ports, then use them: connect HTTP, HTTPS, DNS, DHCP, SSH, email, FTP, and SFTP to firewall rules, listener state, transport behavior, and real troubleshooting evidence.

Independent AP Networking resource • Updated 2026-09-11 • 20 applied questions + 24 free digital flashcards
Port rule: the number should tell you which service tuple, listener, firewall rule, or transport dependency to inspect next.
Practice with Flashcards
Port reasoning model

Port numbers matter because they identify the service boundary you should inspect next

Memorizing a port number is only the first step. The real networking skill is translating that number into an operational question: which process should be listening, which firewall tuple should match, which transport protocol is involved, and which successful checkpoint can already be preserved.

Port reasoning chain: Service → Transport → Port → Client/Server Role → Path/Policy → Listener → Application → Verification.
High-value port map

Group common ports by function instead of memorizing a random list

Web

TCP 80 HTTPTCP 443 HTTPS

Name & address services

UDP/TCP 53 DNSUDP 67/68 DHCPv4

Management

TCP 22 SSHTCP 23 Telnet

Mail transfer/submission

TCP 25 SMTPTCP 587 Submission

Mailbox access

110 POP3995 POP3S143 IMAP993 IMAPS

File transfer

TCP 21 FTP controlTCP 20 active FTP dataTCP 22 SFTP

HTTP vs HTTPS

TCP 80 and TCP 443 often appear in the same user workflow but represent different checkpoints

Plain HTTP commonly uses TCP 80. HTTPS commonly uses TCP 443. A browser may successfully reach port 80 only to receive a redirect to HTTPS, where the final transaction then fails. That means “port 80 works” is not enough evidence to declare the website healthy.

Client → TCP 80 → WebServer HTTP 301 redirect ↓ Client → TCP 443 → WebServer timeout

The failure boundary is now TCP/443, TLS, or the application—not the initial HTTP redirect.

DNS uses UDP and TCP

Do not memorize DNS as UDP-only

Many ordinary DNS queries use UDP 53 because it is efficient. TCP 53 is also part of normal DNS behavior, including situations involving truncated or larger responses and other DNS operations.

Exam trap: a firewall allowing only UDP 53 can create selective DNS failures even though small ordinary lookups appear healthy.
DHCPv4 roles

UDP 67 and UDP 68 make more sense when you attach them to server and client roles

DHCPv4 commonly uses UDP 67 on the server and UDP 68 on the client. Early DHCP exchanges can occur before the client has a normal IPv4 address, which is why broadcasts, VLAN placement, relay configuration, and scope state matter.

DHCP client UDP source 68 ↓ DHCP server / relay path UDP destination 67 Server reply UDP source 67 ↓ Client destination 68

A later successful ping to the DHCP server does not prove this earlier client/server exchange was available when the lease was needed.

SSH vs Telnet

TCP 22 and TCP 23 represent very different management expectations

SSH commonly uses TCP 22 and provides encrypted remote management. Telnet traditionally uses TCP 23 and lacks equivalent encrypted transport. In a secure management design, remembering the number should also remind you that policy should normally restrict management access to trusted sources.

Email is not one port

Sending, submission, retrieval, and synchronization use different service roles

RoleCommon portPurpose
SMTP server transferTCP 25Mail server to mail server
Message submissionTCP 587Client submits outbound mail
POP3TCP 110Traditional mailbox retrieval
POP3STCP 995POP3 over TLS
IMAPTCP 143Mailbox access/synchronization
IMAPSTCP 993IMAP over TLS

Swipe horizontally to see the email-port table.

FTP, SFTP, and FTPS

Similar names can hide completely different protocol designs

Classic FTP commonly uses TCP 21 for control and separate data connections; TCP 20 is traditionally associated with active-mode server data behavior. Passive FTP negotiates data ports differently. SFTP is a separate SSH-based file-transfer protocol, commonly using TCP 22. FTPS is FTP secured with TLS and remains architecturally tied to FTP-style control/data behavior.

Common distractor: SFTP is not “FTP secured on TCP 21.”
Port number is not service health

A correct port tells you what to inspect, not that the service works

Path: client can ping server ✓ Firewall: TCP 443 allowed ✓ Server: no TCP/443 listener ✕ Conclusion: HTTPS cannot work until the service is actually listening.

The same logic works in reverse. A listener can exist while routing or firewall policy prevents the client from reaching it.

★ Routing Practice • Network Ports Practice Quiz: Common TCP and UDP Service Port Questions

A five-minute warm-up for Network Ports Practice Quiz: Common TCP and UDP Service Port Questions

Tomorrow’s opening question can pick up where this page leaves off: ask students to read the packet evidence, spot the important clue and explain what happened. The 300 Bell Ringers give you short questions and teacher answers you can use without preparing a new starter each morning.

300 AP Networking Bell Ringers
$74.99
BUY TEACHER PACK → See what is included in the 300 Bell Ringers →
Instant Access • Full-Year Teacher Resource
Firewall tuples

Least-privilege policy should match source, destination, protocol, and service port

Knowing the port lets you write or interpret a narrow rule instead of a broad “allow everything” policy.

ALLOW AdminNet → SwitchMgmt TCP/22 ALLOW Users → AppServer TCP/443 ALLOW Clients → Resolver UDP/TCP 53 DENY Guest → Management any

Verification should include both an allowed case and a denied case.

Protocol & Service Lab • 120 Missions

Let students try Network Ports Practice Quiz: Common TCP and UDP Service Port Questions for themselves

Reading the explanation is a start. In the browser simulator, students work through a broken network, choose what to test and see whether their fix worked. It gives them another chance to use what they learned about Network Ports Practice Quiz: Common TCP and UDP Service Port Questions.

AP Networking Browser Troubleshooting Simulator
$29.99
120 Missions • 60 Failure Patterns • Offline Copy
GET THE SIMULATOR → See all 120 missions & features
Listener evidence

Server socket state is the strongest check when the path reaches the host but the service still fails

If a packet reaches the server and there is no matching listener, investigate the service process, bind address, application configuration, or host firewall. If a listener is present but the client times out, inspect network/host policy and return-path evidence.

Transport matters

TCP and UDP behavior change what failure evidence looks like

TCP establishes connection state and may produce a refusal when no application is accepting the port. UDP is connectionless, so absence of a reply does not look the same. Port memorization is more useful when paired with the transport protocol.

Routing Exam Practice • Network Ports Practice Quiz

Check whether Network Ports Practice Quiz: Common TCP and UDP Service Port Questions has really stuck

Once students have worked through this topic, give them questions mixed in with the rest of the course. The Exam Prep Vault includes practice exams, multiple-choice questions and artifact labs so they cannot rely on a chapter heading to tell them what to do.

AP Networking Complete Exam Prep Vault
$39.99
GET THE EXAM PREP VAULT → See the Exam Prep Vault contents →
4 Practice Exams • 320 MCQs • 60 Artifact Labs
ObservationPossible meaning
TCP refusalDestination/path actively rejected the connection or nothing is listening
TCP timeoutFiltering, path failure, silent drop, or service issue
UDP no responseCould be normal silence, filtering, path issue, or application behavior

Swipe horizontally to see the transport evidence table.

20-question applied quiz

Practice port recall inside real troubleshooting decisions

Answer each question before reading the explanation. The goal is to connect the port to the next listener, firewall, path, or service check.

Premium Exam-Reasoning Feedback

Spend less time marking explanations about Network Ports Practice Quiz: Common TCP and UDP Service Port Questions

When students explain their answer, it takes more than a right-or-wrong check to see what they understand. The Grading Copilot helps you review how they used the clues, where their explanation falls short and what feedback to give next. You make the final grading decision.

AP Networking Artifact Analysis Grading Copilot
$49.99
8 Criteria • 5 Task Modes • Offline Premium Copy
GET THE GRADING COPILOT → See the free Copilot preview
Question 1

HTTPS

Which port is commonly associated with HTTPS?

A. TCP 80B. TCP 443C. UDP 53D. TCP 22
Answer: B. HTTPS commonly uses TCP 443. A successful ICMP ping still does not prove TCP/443 is reachable.
Question 2

DNS

Which statement about DNS is strongest?

A. DNS is UDP 53 onlyB. DNS uses TCP 53 onlyC. DNS commonly uses UDP 53 and also TCP 53D. DNS uses TCP 25
Answer: C. DNS commonly uses UDP 53, but TCP 53 is also important. Memorizing DNS as UDP-only is incomplete.
Question 3

DHCPv4

Which ports are used by DHCPv4?

A. UDP 67 server / UDP 68 clientB. TCP 67 / TCP 68C. UDP 53 / TCP 53D. TCP 20 / TCP 21
Answer: A. DHCPv4 uses UDP 67 on the server side and UDP 68 on the client side.
Question 4

SSH

Which port is commonly associated with SSH?

A. TCP 21B. TCP 22C. TCP 23D. TCP 25
Answer: B. SSH commonly uses TCP 22.
Question 5

Telnet

Which port is traditionally associated with Telnet?

A. TCP 23B. TCP 22C. TCP 80D. UDP 67
Answer: A. Telnet traditionally uses TCP 23 and lacks the encrypted transport expected for secure management.
Question 6

SMTP transfer

Which port is commonly associated with SMTP server-to-server transfer?

A. TCP 110B. TCP 143C. TCP 25D. TCP 993
Answer: C. TCP 25 is commonly used for SMTP server transfer; client submission often uses 587.
Question 7

Mail submission

Which port is commonly associated with authenticated message submission?

A. TCP 587B. TCP 25 onlyC. TCP 110D. UDP 53
Answer: A. TCP 587 is commonly used for message submission, depending on service configuration.
Question 8

POP3/IMAP

Which pair is correct for traditional unencrypted mailbox protocols?

A. POP3 143 / IMAP 110B. POP3 110 / IMAP 143C. POP3 25 / IMAP 587D. POP3 995 / IMAP 993
Answer: B. g> Traditional POP3 uses TCP 110 and IMAP uses TCP 143. Secure variants commonly use 995 and 993.
Question 9

FTP

Which port is commonly used for classic FTP control?

A. TCP 20B. TCP 21C. TCP 22D. TCP 23
Answer: B. Classic FTP control commonly uses TCP 21.
Question 10

SFTP

Which statement about SFTP is correct?

A. It is FTP on TCP 21 with TLSB. It commonly runs over SSH on TCP 22C. It uses UDP 69D. It is the same protocol as FTPS
Answer: B. SFTP is the SSH File Transfer Protocol and commonly uses TCP 22.
Question 11

Ping works, HTTPS fails

A server answers ping, but HTTPS times out. What is the best next focus?

A. TCP 443 listener/firewall/path evidenceB. Replace DNS immediatelyC. Change DHCP scopeD. Assume the cable is bad
Answer: A. ICMP success proves only one IP path. TCP/443-specific policy and listener state are higher-value next checks.
Question 12

DNS troubleshooting

A client can reach remote IPs but DNS queries time out. Which service tuple matters most?

A. UDP/TCP 53B. TCP 443 onlyC. TCP 22D. UDP 67/68 only
Answer: A. The failure is DNS-specific, so inspect the configured resolver and DNS transport on port 53.
Question 13

DHCP APIPA

A new client has APIPA while peers work. Which service ports belong to the DHCPv4 exchange?

A. UDP 67/68B. TCP 20/21C. TCP 25/587D. TCP 110/143
Answer: A. DHCPv4 uses UDP 67/68; also inspect VLAN, relay, scope, and server state.
Question 14

Least privilege

Students need HTTPS to an app server but no administration. Which rule is most appropriate?

A. Allow all TCPB. Allow TCP 443 to the app serverC. Allow TCP 22 to all switchesD. Allow all UDP
Answer: B. Least privilege permits the required service tuple only.
Question 15

Listener evidence

Firewall logs allow TCP 443 and routing is correct, but the server has no TCP/443 listener. What is strongest?

A. Application/listener failureB. DNS failureC. Wrong VLAN necessarilyD. ISP outage
Answer: A. The missing listener is the first demonstrated failure.
Question 16

Mail secure variants

Which secure mailbox ports are commonly paired correctly?

A. POP3S 995 / IMAPS 993B. POP3S 993 / IMAPS 995C. POP3S 110 / IMAPS 143D. POP3S 25 / IMAPS 587
Answer: A. POP3S commonly uses TCP 995 and IMAPS TCP 993.
Question 17

HTTP redirect

TCP 80 succeeds but the site redirects to HTTPS and the browser still fails. What remains important?

A. TCP 443 path/serviceB. Nothing; port 80 proved the site worksC. DHCP onlyD. ARP only
Answer: A. The final secure service is on TCP 443; port 80 success does not prove the redirected HTTPS transaction works.
Question 18

FTP vs SFTP

Why is SFTP a common distractor in FTP questions?

A. Because SFTP uses SSH/TCP 22 rather than FTP control TCP 21B. Because both always use UDPC. Because SFTP is DNSD. Because FTP never uses TCP
Answer: A. SFTP is a different protocol over SSH, not simply encrypted FTP.
Question 19

DNS TCP

A DNS response is truncated over UDP and the client retries another transport. Which port remains relevant?

A. TCP 53B. TCP 80C. TCP 23D. UDP 68
Answer: A. DNS can fall back to TCP 53 in situations such as truncated responses.
Question 20

Operational port reasoning

What is the real value of memorizing common ports?

A. Knowing which listener, firewall tuple, log, or service dependency to inspect nextB. Replacing routing knowledgeC. Proving an application works from the port number aloneD. Avoiding all packet/path testing
Answer: A. Port recall should drive evidence selection, not act as a substitute for troubleshooting.
Evidence matrix

Separate service identification from path and application proof

EvidenceWhat it provesWhat remains unproven
TCP 443 is the expected portHTTPS service tupleReachability/listener/TLS health
Firewall allows TCP 22Policy permits that flowSSH daemon is listening
DNS query succeeds on UDP 53That query workedTCP 53 behavior
Server listens on TCP 25SMTP service is locally acceptingRemote routing/policy
Ping worksICMP/IP pathAny specific application port

Swipe horizontally to see the evidence matrix.

Capstone lab

Match firewall logs and listeners to the actual service role

Log A: ALLOW TCP dst 443 → WebServer Log B: DENY TCP dst 22 → SwitchMgmt Log C: ALLOW UDP dst 53 → Resolver Log D: UDP 67/68 activity → DHCP service

Map A to HTTPS, B to SSH, C to DNS, and D to DHCPv4. Then inspect listener/service state. A correct firewall action does not prove the server process exists, and a listener does not prove the network path or policy is correct.

NEW • COMPLETE 180-DAY TEACHER CURRICULUM

Teach Network Ports Practice Quiz: Common TCP and UDP Service Port Questions as part of a planned school year

This page gives you one topic. The 180-Day Teacher Curriculum puts it into a full course plan, with daily teaching notes, student activities and checks for understanding. Use it when you need to know what comes before this lesson and what to teach next.

AP Networking Complete 180-Day Teacher Curriculum
$199.99
180 Lessons • 180 Daily Simulators • 36 Teaching Weeks
GET THE 180-DAY CURRICULUM → See 3 free curriculum examples
Study strategy

Study in both directions: service-to-port and port-to-service

Practice “HTTPS → TCP 443” and also “TCP 443 → HTTPS.” Then add one operational sentence: “If TCP 443 fails, inspect the web listener, firewall tuple, route, TLS, and application health.” That extra step turns memorization into troubleshooting knowledge.

Free digital flashcards

24 Network Ports digital flashcards

Practice HTTP, HTTPS, DNS, DHCP, SSH, Telnet, SMTP, submission, POP3, IMAP, FTP, SFTP, transport behavior, firewall policy, and evidence boundaries.

All port cards
Click or press Enter/Space to reveal.
Connect the number to the service, transport, and next check.
0 seen•24 cards
Continue studying

Move from port recall into protocol, CLI, firewall, and troubleshooting evidence