TCP vs UDP & Verifying Client IP Settings

CCNA 200-301 · Network Fundamentals

By Abu Anns · Last updated 20 November 2026Exam version: 200-301 v1.1 (current until 2 Feb 2027)

TCP and UDP are the two transport-layer protocols, and the exam tests the comparison between them relentlessly — not as abstract theory, but as a decision: given an application, which protocol does it use, and why? The answer always comes back to one trade-off: TCP buys reliability with overhead, UDP buys speed with risk. Once you can make that trade-off instinctively, the port numbers and the handshake details fall into place.

TCP: reliable, ordered, connection-oriented

TCP (Transmission Control Protocol) guarantees delivery. Before any data flows, the two hosts perform a three-way handshake: the client sends a SYN, the server replies with SYN-ACK, and the client answers with ACK. Only then does the connection exist. Every segment of data is numbered, and the receiver acknowledges what it gets; if an acknowledgement does not arrive in time, the sender retransmits. TCP also provides flow control (the receiver advertises a window size so the sender does not overwhelm it) and congestion control (the sender slows down when the network drops packets). The result is a stream that arrives complete, in order, and without duplicates — at the cost of extra packets, extra latency, and extra state on both ends.

Applications that cannot tolerate lost or reordered data use TCP: web browsing (HTTP/HTTPS), email (SMTP, POP3, IMAP), file transfer (FTP), remote administration (SSH, Telnet), and DNS zone transfers. If a web page arrived with a chunk missing, the page would break — so the overhead is worth paying.

UDP: fast, connectionless, best-effort

UDP (User Datagram Protocol) does none of that. There is no handshake, no acknowledgement, no retransmission, and no ordering. A host simply sends datagrams and hopes they arrive. The header is only 8 bytes (against TCP's 20), so the overhead is minimal and the latency is low — which is exactly what real-time applications need. A lost packet in a voice call is a tiny glitch; waiting for a retransmission would be a noticeable delay, so voice and video prefer to lose the occasional packet rather than wait.

Applications that use UDP include DNS queries, DHCP, SNMP, TFTP, and real-time media (VoIP, video streaming, online gaming). DNS is the exam's favourite example: a query is a single small packet, the answer is a single small packet, and if the answer is lost the client simply asks again — the application handles reliability itself, so it does not need TCP's machinery. The exam also likes the fact that UDP supports broadcast and multicast, which TCP cannot do, because a connection-oriented protocol has no way to handshake with a group.

The comparison the exam wants

Memorise the contrast as a table and you will answer most questions on this topic in seconds: TCP is connection-oriented, reliable, ordered, uses acknowledgements and retransmission, has a larger header, and is slower; UDP is connectionless, unreliable (best-effort), unordered, has no acknowledgements, has a small header, and is faster. When a question describes an application, ask one question: does it need every byte, or does it need every byte now? Web, email, and file transfer need every byte — TCP. Voice, video, and DNS need speed — UDP.

Both protocols use port numbers to deliver data to the right application on a host. Well-known ports are the ones the exam tests: FTP 20/21, SSH 22, Telnet 23, SMTP 25, DNS 53, DHCP 67/68, TFTP 69, HTTP 80, POP3 110, SNMP 161/162, HTTPS 443. Notice which are TCP and which are UDP: DNS is UDP 53 for queries (TCP 53 for zone transfers), DHCP is UDP 67/68, SNMP is UDP 161/162, TFTP is UDP 69, and the rest of the list is TCP. Port-number questions are easy points if you drill the list until it is automatic — the cheat sheet page collects them all.

Verifying IP parameters on a client

The second half of this topic is practical: checking a host's IP configuration. On Windows, ipconfig shows the address, subnet mask, and default gateway, and ipconfig /all adds the MAC address, DHCP server, DNS servers, and lease times. On Mac and Linux, ifconfig (older) or ip addr (modern Linux) shows the same information. The exam expects you to know which command belongs to which operating system, and to be able to spot the problem in a sample output: an address of 169.254.x.x means the host failed to get DHCP and assigned itself an APIPA link-local address; a missing or wrong default gateway means local traffic works but nothing beyond the subnet is reachable; a wrong DNS server means names do not resolve even though IP connectivity is fine.

Two more commands complete the toolkit. ping tests basic IP reachability to another host, and traceroute (Windows: tracert) shows each router hop along the path, which is how you find where a packet stops. A useful troubleshooting order, and one the exam rewards, is: check the local configuration first, ping the default gateway, ping a remote address, then ping a name — each step isolates a different layer of the problem.

TCP windowing and flow control

Two TCP mechanisms deserve a closer look because the exam tests them directly. Flow control uses the window size: the receiver tells the sender how much data it can accept at once, and the sender never sends more than that window allows. If the receiver's buffer fills up, it advertises a smaller window — or a zero window, telling the sender to stop entirely until the receiver catches up. This is how a fast sender avoids overwhelming a slow receiver. Windowing also improves efficiency: instead of sending one segment and waiting for its acknowledgement, TCP sends a whole window of segments and acknowledges them together, which keeps the connection fast over high-latency links. A related concept is the maximum segment size (MSS), negotiated during the handshake, which is the largest chunk of data a host will accept in a single segment — typically 1460 bytes on an Ethernet network, after the IP and TCP headers are subtracted from the 1500-byte MTU. When a question mentions a window size of zero, the answer is flow control: the receiver is telling the sender to pause.

Port numbers in context

Port numbers are easier to remember in groups than as a flat list. The remote access group is SSH 22 and Telnet 23 — always pick SSH, because Telnet sends passwords in plaintext. The mail group is SMTP 25 (sending mail), POP3 110, and IMAP 143 (reading mail). The web group is HTTP 80 and HTTPS 443. The infrastructure group is DNS 53, DHCP 67/68, TFTP 69, NTP 123, SNMP 161/162, and syslog 514. Notice that the infrastructure protocols mostly use UDP, because they send small messages where speed matters more than guaranteed delivery, while the user-facing protocols (web, mail, file transfer, remote access) mostly use TCP, because they cannot tolerate lost data. When the exam asks which protocol an application uses, think about what the application does with lost data: if it would break, the answer is TCP; if it would shrug and retry or carry on, the answer is UDP.

Advertisement

Exam traps to watch for

Practice questions

Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.

Q1.Which sequence correctly describes the TCP three-way handshake?

Report an error

Q2.A voice-over-IP application needs minimal delay and can tolerate an occasional lost packet. Which transport protocol should it use, and why?

Report an error

Q3.Which protocol and port does a DNS client normally use to query a DNS server?

Report an error

Q4.A Windows PC cannot reach any website, but it can ping other devices on its local network. ipconfig shows an address of 169.254.14.22. What is the most likely problem?

Report an error

Q5.Which two features does TCP provide that UDP does not? (Choose the best pair.)

Report an error

Q6.An engineer needs to see the DHCP server address and DNS servers configured on a Windows host. Which command provides this information?

Report an error

Q7.A host can ping 8.8.8.8 successfully but cannot load any website by name. What is the most likely cause?

Report an error

Q8.Which of these applications relies on UDP rather than TCP?

Report an error