Skip to content

The Internet: TCP/IP Stack, DNS and Packet Switching

1.3.3 Networks · Paper 1 · 5 flashcards · 9 questions

The Internet is a global network of networks, and understanding its structure is essential for computer science.

The TCP/IP Stack

Data transmission uses a layered model where each layer has specific responsibilities.

Definition
The TCP/IP stack (also called the Internet Protocol Suite) is a set of protocols organised into four layers that work together to enable network communication.
Key Point
Layer (top→bottom)NameMain functionExample protocols
4ApplicationUser-facing services and data formattingHTTP, FTP, SMTP, DNS
3TransportEnd-to-end delivery and reliabilityTCP, UDP
2Network/InternetAddressing and routing between networksIP, ICMP
1Link/Network InterfaceLocal delivery and physical transmissionEthernet, Wi-Fi
Worked Example
Worked Example: Sending Data Through TCP/IP Layers

Scenario: You request a webpage (www.example.com)

Sending (going DOWN the stack):

Layer 4 - Application:
• Browser creates HTTP request for the webpage
• Data: "GET /index.html HTTP/1.1"

Layer 3 - Transport:
• TCP breaks data into segments
• Adds port numbers (source: 52481, destination: 80)
• Adds sequence numbers for reassembly

Layer 2 - Network:
• IP adds addresses (your IP → server's IP)
• Creates packets with routing information

Layer 1 - Link:
• Adds MAC addresses for local delivery
• Converts to electrical signals/radio waves
• Data transmitted across physical network

Receiving (going UP the stack):
The process reverses - each layer removes its header and passes data up until the browser displays the webpage.

Protocol Layering

Definition
Protocol layering divides network communication into separate layers. Each layer has one well-defined job and exchanges data only with the layers directly above and below it.
Key Point
Why layering is used:
• The protocols are applied in order, one after the other
• Each layer is self-contained, so one layer can be changed or replaced without affecting the others
• Each layer hides its details from the layers around it, which is a form of abstraction
• A large task is broken down into smaller, manageable units
• Faults are easier to find, because a problem can be traced to a single layer
• Standards can be developed for each layer separately, so products from different manufacturers work together
Example
Layering in practice:
A web browser works in the same way whether the device is connected by Wi-Fi or by a cable. How the data physically travels is the job of the link layer, so the application layer above it does not have to change.

DNS (Domain Name System)

Definition
DNS (Domain Name System) translates human-readable domain names (like www.google.com) into IP addresses (like 142.250.187.46) that computers use to identify each other.
Worked Example
Worked Example: DNS Lookup

You type: www.example.com

Step 1: Browser checks local cache
• Have we looked this up recently? If yes, use cached IP.

Step 2: Query local DNS resolver (usually your ISP)
• Resolver checks its cache

Step 3: Query root DNS server
• "Where can I find .com domains?"
• Returns address of .com TLD server

Step 4: Query TLD (Top-Level Domain) server
• "Where can I find example.com?"
• Returns address of example.com's authoritative server

Step 5: Query authoritative DNS server
• "What's the IP for www.example.com?"
• Returns: 93.184.216.34

Step 6: IP address returned to browser
• Browser connects to 93.184.216.34
• Webpage loads
Key Point
Why DNS Matters:
• Humans remember names, not numbers
• Websites can change IP addresses without users knowing
• Load balancing - one domain can point to multiple IPs
• Hierarchical structure provides scalability
• Distributed system - no single point of failure

Packet Switching vs Circuit Switching

Definition
Packet switching breaks data into small packets that are sent independently across the network and reassembled at the destination. The Internet uses packet switching.
Definition
Circuit switching establishes a dedicated communication path between two parties for the duration of their connection. Traditional telephone networks used circuit switching.
Key Point
FeaturePacket switchingCircuit switching
ConnectionNo dedicated pathDedicated path reserved
RoutingPackets may take different routesSame route for whole session
EfficiencyHigh (shared network)Lower (reserved capacity)
ReliabilityCan route around failuresConnection fails if path breaks
DelayVariable with congestionMore consistent once circuit set
Typical useInternet/data networksTraditional phone networks