AQA 7517, section 4.9.3.1
The structure of the Internet
The Internet is a worldwide network of networks. It connects millions of smaller networks (homes, businesses, universities and governments) using routers and common protocols (TCP/IP).
- Your device connects to your Internet Service Provider (ISP).
- ISPs connect to each other, and to very high-speed backbone links that carry traffic between countries and continents, often at Internet exchange points.
- The Internet has no single owner or central control. It works because everyone follows the same standards.
- It is built with many alternative paths, so if one link fails, data can take another route.
The World Wide Web is just one service that runs on the Internet (web pages, sent using HTTP). Email, file transfer and streaming are others.
Packet switching
Data isn't sent as one long stream. In packet switching, a message is split into small pieces called packets, and each is sent separately across the network.
- Each packet can take a different route, depending on which links are free.
- At the destination, the packets are put back in order and the message is reassembled.
- If a packet is lost or damaged, only that packet needs to be resent.
Advantages of packet switching
- Efficient use of the network. Links are shared by many users' packets, rather than reserved for one call.
- Robust: packets are re-routed around failures or congestion.
- Lost packets are resent, so the data arrives correctly.
Disadvantage
- Packets can arrive out of order or late, so they must be reassembled, and the delay (latency) can vary.
The components of a packet
| Part | Contents |
|---|---|
| Header | Source IP address, destination IP address, a sequence number (to put the packets in order), the protocol, and the time to live (TTL) (or hop limit) |
| Payload | The data itself, a part of the message |
| Trailer / error check | A checksum (error-checking value) to detect corruption |
The TTL is reduced by 1 at each router, and the packet is discarded when it reaches 0, which stops packets looping around the Internet forever.
Routers and gateways
Router
A router is a device that connects networks together and forwards packets between them. It reads the destination IP address of each packet and decides which way to send it next, using a routing table.
Gateway
A gateway is a node that is the entrance or exit between one network and another, and it is needed where the two networks use different protocols. It translates between them: as a packet passes through, its header is removed and a new header, in the format the other network uses, is added before it is sent on. The payload stays the same. In a home or office, the default gateway is the router's address on the local network: devices send everything that's outside the local network to it.
| Router | Gateway | |
|---|---|---|
| Role | Forwards packets between networks | An entry and exit point to another network, which may translate protocols |
| Looks at | IP addresses | May work at several levels |
| Example | The home router passing packets to the ISP | The default gateway address set on your computer |
Often one device does both jobs.
How routing works across the Internet
- A packet is sent from your device to its default gateway (your router).
- The router looks at the destination IP address and checks its routing table, which says which next router (the next hop) is the best way towards that network.
- It sends the packet to that next router, and reduces the TTL.
- This repeats hop by hop, each router choosing the next, until the packet reaches the destination network.
- The last router delivers it to the destination device.
No single router knows the whole route. Each knows only the next hop. Routers exchange information with each other about which networks they can reach and which routes are fastest or least busy, so they update their tables as conditions change.
URL, domain names and IP addresses
Uniform Resource Locator (URL)
A URL is the full address of a resource on the Internet, such as a web page.
IP address
An IP address is the numerical address of a device on a network, such as 93.184.216.34. Routers use it to deliver packets.
Domain name and FQDN
People find names easier to remember than numbers, so domain names are used.
- A domain name is the name of a site or organisation, such as
example.co.uk. - A fully qualified domain name (FQDN) is the complete name of a particular host, with all the parts from the host name to the top-level domain, such as
www.example.co.uk.
How domain names are organised
Domain names are arranged in a hierarchy, read from right to left:
- The top-level domain (TLD) is on the right:
.com,.org,.uk,.edu. - Each part to the left is a subdomain of the one on its right (
cowithinuk,examplewithinco.uk). - The host name (such as
www) is on the left.
This tree structure means that each organisation manages its own names, with no clash between them.
The Domain Name System (DNS)
The Domain Name System (DNS) is a service that translates domain names into IP addresses. It relies on a worldwide network of Domain Name Servers.
- You type
www.example.co.ukinto the browser. - Your device asks a DNS server (usually its ISP's) for the IP address.
- If that server doesn't know it, it asks other servers in the hierarchy: a root server, then the .uk server, then the one for example.co.uk.
- The answer, the IP address, is passed back. It is usually cached (stored for a while) so that the next lookup is faster.
- The browser then connects to that IP address.
DNS is like the phone book of the Internet. Without it you'd have to remember the number of every website.
Internet registries
An Internet registry is an organisation that allocates and records IP addresses and domain names. They are needed so that every address and name is unique: if two devices had the same IP address, packets couldn't be delivered correctly, and two sites couldn't have the same domain name.
- IP addresses are allocated in blocks, from a global authority to regional Internet registries, and on to ISPs and organisations.
- Domain names are sold through registrars, and the records are held by registries for each top-level domain.
They also keep records of who owns each name or address.
Worked example
Task: describe what happens when you visit www.example.com in a browser.
- The browser asks DNS to turn
www.example.cominto an IP address. - The browser builds a request and, using packet switching, the request is split into packets, each with the source and destination IP addresses in the header.
- Your router forwards the packets to the ISP, and each router along the path chooses the next hop using its routing table, reducing the TTL.
- The packets arrive at the web server, which reassembles them into the request.
- The server sends back the web page the same way, in packets, which your device reassembles.
Exam tip: for packet switching, give the header contents (source and destination address, sequence number, TTL), and explain that packets may take different routes and are reassembled. For DNS, say it translates a domain name into an IP address.
Check yourself
What is packet switching?
Splitting data into small packets that are sent separately across the network, possibly by different routes, and reassembled at the destination.
Name three items found in the header of a packet
Any three of: the source IP address, the destination IP address, a sequence number, the time to live (hop count), the protocol.
What is the difference between a domain name and an FQDN?
A domain name is the name of a site or organisation, such as example.co.uk. A fully qualified domain name is the complete name of a host including every part, such as www.example.co.uk.
What does DNS do?
It translates a domain name into the IP address of the matching server.
Why are Internet registries needed?
To allocate IP addresses and domain names so that each one is unique, and to keep records of who has them.