
- The device needs an IP address to be identified as the sender. A DHCP (Dynamic Host Configuration Protocol) server usually assigns a private IP such as
192.168.x.xso the host can participate on the local network. - The human-friendly domain name must be converted to an IP address by DNS (Domain Name System). Your machine or router usually points to a DNS resolver — often a public resolver such as Google’s
8.8.8.8(see https://developers.google.com/speed/public-dns).
- The payload is split into TCP segments. Each segment receives a transport header containing sequence numbers, source and destination ports, flags (SYN, ACK, etc.), and checksums.
- TCP uses a three-way handshake (SYN → SYN-ACK → ACK) to establish a reliable connection before bulk data flows.
- Ports act like room numbers in a building: the IP gets the packet to the right host (the building), and the port (for example
443for HTTPS) directs it to the correct service (the room).

- Every NIC has a unique MAC address.
- For the local hop, the laptop sets the frame’s source MAC to its own NIC and the destination MAC to the router’s NIC.
- The laptop discovers the router’s MAC using ARP (Address Resolution Protocol): it broadcasts “Who has this IP?” and the router replies with its MAC so the laptop can construct the frame.


B. MAC addresses are used to route packets between global networks.
C. TCP ensures reliable delivery by numbering segments and checking they arrive intact.
D. DNS and TCP are both part of the transport layer in the TCP/IP model. Pause and think. Answer: C. TCP (transport layer) provides reliable delivery by sequencing segments, detecting errors, and retransmitting lost data. Why the others are incorrect:
- A. Private IPs are not routable on the public Internet without NAT; public IPs are globally routable.
- B. MAC addresses operate only on the local link and are not used for routing across global networks.
- D. DNS is an application-layer protocol; TCP is a transport-layer protocol.
- Connectionless: no handshake, no retransmissions.
- Low overhead and lower latency compared to TCP.
- Tolerates some packet loss in favor of responsiveness.

- Email: SMTP (Simple Mail Transfer Protocol) is used to send mail; IMAP (Internet Message Access Protocol) is used to retrieve and sync mailboxes. Both are application-layer protocols that typically use TCP for reliable delivery.

- File transfer: FTP and secure variants such as SFTP/FTPS operate at the application layer and depend on TCP to ensure ordered, reliable delivery.

| Protocol / Service | Typical Layer | Common Port(s) |
|---|---|---|
| HTTPS | Application (uses TCP) | 443 |
| HTTP | Application (uses TCP) | 80 |
| SMTP | Application (uses TCP) | 25, submission 587 |
| IMAP | Application (uses TCP) | 143 (or 993 for IMAPS) |
| FTP | Application (uses TCP) | 21 (+ data ports) |
| DNS | Application (UDP/TCP) | 53 |
| SSH/SFTP | Application (uses TCP) | 22 |
| Custom real-time (UDP) | Transport (UDP) | varies |

B. Email uses SMTP to send messages and IMAP to fetch them from a server.
C. FTP sits at the transport layer and uses port 443 by default.
D. Real-time protocols like UDP avoid the TCP/IP model to reduce delay. Pause and think. Answer: B. SMTP sends email; IMAP fetches and synchronizes mailboxes. Why the others are incorrect:
- A. UDP does not guarantee ordering or retransmission — TCP provides those guarantees.
- C. FTP is an application-layer protocol (not transport) and does not use port
443(HTTPS uses443). - D. Real-time protocols still use the TCP/IP stack; they simply choose UDP at the transport layer to reduce latency.
- Each protocol in the stack solves a specific problem: naming (DNS), addressing (IP), reliable delivery (TCP), low-latency transport (UDP), and application-specific functions (HTTP, SMTP, FTP, etc.).
- IP addresses identify devices across networks: private IPs are used within local networks, public IPs are used for Internet reachability.
- MAC addresses identify devices on a local link; MACs are rewritten at every hop while the IP packet travels.
- Each layer adds its own header — transport adds segments, network adds packets, data link adds frames — and the recipient removes headers during decapsulation.


Remember: IPs route packets across networks; ports deliver data to the correct service on a host; MAC addresses are for local-link delivery; and each layer in the stack solves a distinct problem.