# The Internet & World Wide Web (IP & MAC Addresses)

- **Track:** Cambridge IGCSE™ Computer Science (0478 / 0984) (CAMBRIDGE IGCSE 0478)
- **Module:** Section 5: The Internet & Security
- **Estimated Duration:** 15 minutes
- **Access:** Open Theory (All-Access for Interactive IDE &amp; Autotests)

---

## Theory & Conceptual Background

The internet is a global network of connected networks. The World Wide Web is a collection of linked web pages and resources accessed over the internet. Email and file transfer can use the internet without being web pages. HTML describes page structure; it is not a network communication protocol.

## URLs and DNS

In `https://school.example/library/books.html`, `https` is the protocol, `school.example` is the domain and `/library/books.html` identifies the requested resource path.

When a needed address is not cached, a DNS lookup resolves the domain name to an IP address. The browser uses an address returned by DNS to connect to the server and request the resource. DNS is distributed; it does not translate the entire path into an IP address. A resource path need not correspond to a physical file.

## IP addresses

An IP address identifies a network interface for routing data. It may be assigned dynamically or configured statically. IPv4 uses 32 bits, commonly shown as four denary groups separated by dots, such as 192.0.2.8. IPv6 uses 128 bits and hexadecimal groups separated by colons, providing a much larger address space. Addresses can change when a device changes networks.

## MAC addresses

A NIC commonly has a factory-assigned 48-bit MAC address, shown as six pairs of hexadecimal digits. In the syllabus model, the first part identifies the manufacturer and the remaining part identifies the interface. MAC addresses are used on the local network; routers use IP addresses between networks. Devices may also use software-configured or private/randomised MAC addresses, so 'permanently unchanged on every network' is too strong.

## Worked journey

A learner enters a school library URL. DNS supplies the server's IP address, the browser establishes a connection and requests the path, and the server returns resources for rendering. State where the domain, IP address and page path each contribute. Then explain why sending email still uses the internet even if no browser is open.

---

## Interactive Exercises & Autotest Specifications

### Exercise 1: Exam-Style Check: IP Address vs MAC Address (Multiple choice, 25 XP)

**Instructions:**
What is the fundamental difference between an IP address and a MAC address?

**Options:**
- **A**: An IP address is a permanent physical hardware identifier burned into the NIC, whereas a MAC address is a temporary logical address assigned by routers.
- **B**: Both IP and MAC addresses are 16-bit binary codes that reset every 24 hours.
- **C**: An IP address is a logical network address used for routing between networks, whereas a MAC address identifies an interface on the local network and may be factory-assigned or configured privately by software.
- **D**: MAC addresses are only used for satellite transmissions, while IP addresses are only used for fiber cables.


**Autotest Expectations:**
- **Correct option selected**: `selection_match` -> Expected: `b`

### Exercise 2: Exam-Style Question: Deconstruct Uniform Resource Locator (URL) (Fill in blank, 35 XP)

**Instructions:**
A user navigates to the following web address in a browser: `https://www.example.com/courses/igcse/index.html`

Identify the components of this Uniform Resource Locator (URL):

1. Protocol: [blank_1]
2. Domain name (web server host): [blank_2]
3. File path and resource: [blank_3]


**Starter Code:**
```text
{"prompt":"Decompose the URL into its components:","template":"1. Protocol: [blank_1]\n2. Domain name: [blank_2]\n3. File path / resource: [blank_3]","word_bank":["https","www.example.com","/courses/igcse/index.html","http","ftp","index.html","example.com"],"blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"}]}
```

**Autotest Expectations:**
- **Protocol is https**: `text_exact` -> Expected: `https`
- **Domain is www.example.com**: `text_exact` -> Expected: `www.example.com`
- **File path is /courses/igcse/index.html**: `text_exact` -> Expected: `/courses/igcse/index.html`

### Exercise 3: Application: Check the reasoning (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Network infrastructure connecting networks: internet or WWW? System resolving a hostname to an IP address: Does a URL identify a resource or always one physical computer permanently?


**Starter Code:**
```text
{"prompt":"Application: Check the reasoning","template":"1. Network infrastructure connecting networks: internet or WWW? [blank_1]\n2. System resolving a hostname to an IP address: [blank_2]\n3. Does a URL identify a resource or always one physical computer permanently? [blank_3]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"}],"word_bank":["internet","WWW","DNS","DHCP","resource","physical computer"]}
```


