UDP TCP


---

CCNA TCP vs UDP — Flashcards

Layer 4 Basics

1. Which OSI layer do TCP and UDP operate at? – Layer 4 (Transport Layer)

2. What is the Layer 4 PDU name for TCP? – Segment

3. What is the Layer 4 PDU name for UDP? – Datagram

4. What function does Layer 4 provide? – Transparent data transfer between end hosts

5. What addressing method does Layer 4 use? – Port numbers

---

Port Numbers

1. What is the range of well‑known ports? – 0–1023

2. What is the range of registered ports? – 1024–49151

3. What is the range of ephemeral ports? – 49152–65535

4. What is the purpose of ephemeral ports? – Random source ports for client sessions

5. What port does HTTP use? – TCP 80

6. What port does HTTPS use? – TCP 443

7. What port does FTP use? – TCP 20, 21

8. What port does SSH use? – TCP 22

9. What port does DNS use? – UDP 53 (TCP for zone transfers)

10. What port does DHCP use? – UDP 67, 68

---

TCP Characteristics

1. Is TCP connection‑oriented or connectionless? – Connection‑oriented

2. Does TCP provide reliability? – Yes, acknowledgments and retransmissions

3. Does TCP provide sequencing? – Yes, sequence numbers ensure correct order

4. Does TCP provide flow control? – Yes, via window size

5. What is TCP’s handshake process? – Three‑way handshake (SYN, SYN‑ACK, ACK)

6. How is TCP terminated? – Four‑way handshake (FIN, ACK, FIN, ACK)

7. What is TCP’s error recovery method? – Retransmission of lost segments

8. What mechanism does TCP use for flow control? – Sliding window

---

UDP Characteristics

1. Is UDP connection‑oriented or connectionless? – Connectionless

2. Does UDP provide reliability? – No, best‑effort delivery only

3. Does UDP provide sequencing? – No

4. Does UDP provide flow control? – No

5. Why is UDP faster than TCP? – Minimal overhead, no reliability mechanisms

6. What is UDP commonly used for? – Real‑time voice/video, gaming, DNS queries

---

TCP vs UDP Comparison

1. Which protocol has higher overhead? – TCP

2. Which protocol is faster? – UDP

3. Which protocol guarantees delivery? – TCP

4. Which protocol is best for streaming video? – UDP

5. Which protocol is best for file downloads? – TCP

---

Practice Review

1. Which features are TCP‑only? – Error recovery, flow control, sequencing

2. Which protocols use TCP? – HTTP, HTTPS, FTP, SMTP, SSH

3. Which protocols use UDP? – DHCP, SNMP, Syslog, TFTP

4. Which protocol uses both TCP and UDP? – DNS

5. If TCP segment has sequence number 27, what ACK number is sent back? – 28 (forward acknowledgment)