Computer Science › Section E · Networking and the internet › Topic E.2

The internet: architecture and addressing

The internet is not one network but tens of thousands of separately run networks that agree to carry each other's traffic. This topic shows how they are arranged, how every device gets a numeric address, and how the domain name system turns names people can remember into those numbers.

From research project to global network

The internet grew out of research begun in the 1960s, much of it funded by the US Defense Advanced Research Projects Agency (DARPA). The aim was to link different networks into one system that would keep working even if parts were damaged. Its forerunner, the ARPANET, carried its first messages in 1969. The project later passed to universities and then to commercial operators. Its standards are open: the Internet Engineering Task Force (IETF), a volunteer international body, develops them by public consensus, and anyone may use them free of charge.

A hierarchy of service providers

The networks of the internet are run by internet service providers (ISPs). At the top are a few tier-1 ISPs, very high-capacity international networks that together form the backbone. Regional tier-2 ISPs connect to them, and access ISPs, such as cable and phone companies or a university's own network, connect homes and organisations to that core. The devices people use, from laptops to cars, are end systems, or hosts. The core has many alternative paths between routers, so it is redundant: most of it stays connected even when key routers fail. No single organisation owns the whole internet.

Getting connected: the last mile

A Wi-Fi access point linked to an ISP creates a hot spot; mobile networks divide an area into cells and hand a phone from cell to cell as it moves. Homes connect over telephone lines (DSL), cable television lines, satellite or fibre-optic cable. Long-distance links are easy to upgrade to fibre, but replacing the old copper lines into every building is costly. That bottleneck is the last mile problem. The internet makes few assumptions about the devices at its edges, an end-to-end design that lets new kinds of device join without changing the core.

IP addresses

Every host needs a unique numeric address, its IP address (IP stands for Internet Protocol). An IPv4 address is 32 bits, written in dotted decimal notation: each of its 4 bytes is written as a decimal number from 0 to 255, separated by dots, as in 198.51.100.37. That allows \(2^{32}\), about 4.3 billion, addresses, which proved too few. IPv6 uses 128-bit addresses, written as eight groups of hexadecimal digits such as 2001:db8::1, where :: stands for a run of zero groups. Addresses are handed out hierarchically: the Internet Corporation for Assigned Names and Numbers (ICANN), through its IANA function, oversees the global pool, regional registries allocate blocks to ISPs, and ISPs assign smaller blocks to customers.

Worked example: dotted decimal and binary

Convert 198.51.100.37 to bits, then convert a pattern back. 1. Write each number as 8 bits using the place values 128, 64, 32, 16, 8, 4, 2, 1: \(198 = 128 + 64 + 4 + 2\) gives 11000110; 51 = 32 + 16 + 2 + 1 gives 00110011; 100 = 64 + 32 + 4 gives 01100100; 37 = 32 + 4 + 1 gives 00100101. 2. The address is 11000110 00110011 01100100 00100101. 3. Now split 11000000101010000000101000010001 into bytes and convert each: 192, then \(128 + 32 + 8 = 168\), then 10, then 17, giving 192.168.10.17. Check: every part lies between 0 and 255, and four bytes make 32 bits.

Private addresses and NAT

IPv4 addresses ran short; the global pool handed out its last free blocks in 2011. One remedy is private addressing. Three ranges, those beginning 10, 172.16 to 172.31, and 192.168, are reserved for local networks and never routed on the public internet, so millions of homes reuse them. A home router then performs network address translation (NAT): it shares one public address among every device inside, rewriting addresses on packets as they leave and matching replies to the right device. NAT stretched IPv4's life, but it makes it harder for outside machines to start a connection to a device inside.

Domain names

People prefer names to numbers, so the internet also uses domain names. A domain is a part of the internet run by one authority, such as a company or university, registered through registrars accredited by ICANN. The last part of the name is the top-level domain (TLD): original generic ones include .com, .org, .edu and .gov; each country has a two-letter code, such as .ca for Canada; and more than a thousand new generic TLDs were added through a programme opened in 2012. The owner of example.org may extend the name to the left, so lab.chem.example.org is host lab in subdomain chem of domain example.org.

The domain name system

Packets are delivered by IP address, so a name must be translated first. That is the job of the domain name system (DNS), a worldwide distributed directory of name servers; one translation is a DNS lookup. No server knows every name. The root servers, 13 named identities each copied at many sites, know the servers for each TLD; TLD servers know each domain's name servers; and a domain's authoritative name servers know its hosts. Each host uses a local resolver, often run by its ISP, to do the asking. Answers are cached for a set time, so most lookups never reach the root.

Worked example: looking up a name

A browser needs the address of lab.chem.example.org, and nothing is cached yet. 1. The computer asks its local resolver. 2. The resolver asks a root server, which replies with the servers for .org. 3. A .org server replies with the name servers for example.org. 4. Those servers reply with the name servers for chem.example.org. 5. The chem.example.org server gives the authoritative answer, say 203.0.113.25. 6. The resolver passes it back and caches it. Check: each server answered only for its own level, reading the name from right to left, and a second request for the same name minutes later comes straight from the resolver's cache.

Applications: email and streaming

Email moves between mail servers using the Simple Mail Transfer Protocol (SMTP), after the sender finds the recipient's mail server through DNS; MIME lets messages carry attachments and non-English text. Users collect mail with POP3, which downloads messages to one device, or IMAP, which keeps them on the server so every device sees the same folders. Video streaming is a large share of traffic. Sending each viewer a separate stream from one server, called N-unicast, overloads it, so services copy content to content delivery networks (CDNs), servers placed near viewers, often inside access ISPs. Anycast lets one address reach the nearest copy.

Common mistakes to avoid

First, confusing the dots in a domain name with those in an IP address; names are read right to left by authority, numbers are just bytes. Second, writing a dotted decimal part above 255, which cannot fit in a byte. Third, thinking one master server stores every name; DNS is distributed and cached. Fourth, assuming a private address like 192.168.1.5 identifies a device on the public internet: thousands of homes use the same one behind NAT. Fifth, saying IPv6 has 4 times as many addresses as IPv4; 128 bits give \(2^{96}\) times as many.

Key takeaways

The internet began as DARPA-funded research and is now a commercial network of networks built on open IETF standards. Tier-1, tier-2 and access ISPs form a redundant hierarchy; the last mile is often the slowest link. IPv4 addresses are 32 bits in dotted decimal, IPv6 addresses 128 bits in hexadecimal, allocated hierarchically under ICANN. Private ranges and NAT let many devices share one public address. Domain names end in a TLD and are translated to IP addresses by the distributed, cached DNS. Email uses SMTP, POP3 and IMAP; streaming relies on CDNs.

Flashcards

Flashcard

DARPA

US agency that funded the research behind the internet

Its ARPANET first carried messages in 1969.

Test your understanding

Question 1 of 5

What is the bit pattern 11001011 00000000 01110001 11001000 in dotted decimal notation?

Question 2 of 5

Why was IPv6 introduced?

Question 3 of 5

In the name lab.chem.example.org, which statement is correct?

Question 4 of 5

A home has a laptop, two phones and a TV but only one public IPv4 address. What lets them all use the internet at once?

Question 5 of 5

Why do video streaming services rely on content delivery networks?

← Previous topicNext topic →