Skip to content
CCNA 200-301 v1.1 reference — Network Fundamentals

TCP and UDP

How TCP provides reliable, ordered delivery and how UDP trades that for low overhead, with port numbers and protocol numbers used across the CCNA.

Objective 1.5v1.1 exam target

TCP versus UDP

TCP versus UDP

PropertyTCPUDP
DeliveryReliable, acknowledged, retransmittedBest effort, no retransmission
OrderingSequenced byte streamNo ordering guarantees
ConnectionConnection-oriented (3-way handshake)Connectionless
Overhead20-byte header minimum8-byte header
Flow controlSliding windowNone
Use whenLoss is unacceptable (web, email, file transfer)Speed/simplicity matters; loss is tolerable or handled above (DNS, DHCP, VoIP, streaming)

TCP establishes state before data flows: SYN → SYN-ACK → ACK. Each side picks an initial sequence number; every byte afterwards is numbered so the receiver can reorder, deduplicate and acknowledge. Loss is repaired by retransmission — the sender re-sends unacknowledged segments. Teardown uses FIN/ACK in each direction.

Choose the transport for an application
App
Live voice call between IP phones
Requirement
Real-time audio; a re-sent packet is useless late
  1. Voice tolerates small loss but not delay — retransmission arrives after the audio slot passed.
  2. UDP's low overhead and no retransmission suit the timing requirement.
  3. Reliability (if needed at all — e.g., for signaling) is layered on top or uses TCP separately (SIP can run either).

RTP media uses UDP; the call-signaling protocol may still use TCP.

Protocol numbers and ports

A socket pair — source/destination IP plus source/destination port — identifies one conversation. Servers listen on well-known ports (0–1023); clients pick an ephemeral port. The IP protocol number in the packet header (not a port) names the L4 protocol: 6 = TCP, 17 = UDP, 1 = ICMP.

Common IP protocol numbers

Protocol numbers live in the IP header and name the upper-layer protocol — they are not TCP/UDP ports.
Protocol numberProtocolNotes
1ICMPPing, errors, path discovery
2IGMPMulticast group membership
6TCPReliable stream transport
17UDPLightweight datagram transport
50ESPIPsec encapsulated security payload
51AHIPsec authentication header
88EIGRPCisco interior routing protocol
89OSPFLink-state routing protocol

Protocol numbers live in the IP header and name the upper-layer protocol — they are not TCP/UDP ports.

Well-known TCP ports

PortServicePurpose
20FTP dataActive-mode data channel
21FTP controlCommands and replies
22SSHSecure remote access and SFTP
23TelnetInsecure remote access
25SMTPMail transfer
53DNSZone transfers and large responses
80HTTPUnencrypted web
110POP3Mail retrieval
143IMAPMail access
443HTTPSEncrypted web
179BGPInter-AS routing (context)

Well-known UDP ports

PortServicePurpose
53DNSStandard name queries
67/68DHCPServer / client
69TFTPTrivial file transfer
123NTPTime synchronization
161SNMPAgent polling
162SNMP trapsManager receives notifications
514SyslogLog forwarding
520RIPRouting updates (context)
1812/1813RADIUSAuthentication / accounting
500IKEIPsec key exchange

Verifying and diagnosing

Verifying transport behavior

  • On the host: netstat -an (Windows/Linux) shows listening ports and established sessions.
  • On the device: ACL counters and show access-lists reveal whether TCP/UDP traffic actually matched your permit/deny logic.
  • A handshake stuck at SYN with no SYN-ACK suggests filtering or a dead listener — check ports, not the routing table first.

Common mistakes

  • Confusing the IP protocol number with a TCP/UDP port — they live in different headers.
  • Assuming DNS is UDP-only — zone transfers and oversized responses use TCP 53.
  • Expecting UDP to recover lost packets — any reliability must come from the application.
  • Treating SNMP traps as arriving on the agent's port — traps are received by the manager on UDP 162.
Application reachable by IP but not by service

Observation: Ping to the server succeeds; the client times out connecting.

Hypotheses
  • Service not listening on the expected port
  • ACL or firewall filtering the destination port
  • Wrong transport (client uses TCP, service is UDP-only)
CheckIndicates
netstat -an on the serverConfirms the daemon listens and on which port/transport.
Test the port specifically (telnet/nc to the port, or a UDP probe)Reaches the port → service issue; filtered → path/security issue.
ACL counters on the pathDenied hits identify the blocking rule.

Correction: Open the required port/protocol on the policy or point the client at the correct endpoint.

Connection establishes; netstat shows the session in ESTABLISHED state.

On this page

Related resources

Sources

Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.

Search guided lessons, transcript chapters, flashcards, CLI drills and cheat sheets

TCP and UDP | CCNA Study