IP addresses and DNS

Advanced

Every device online has an IP address like a door number; DNS is the phonebook that turns a web address like www.google.com into an IP so computers can find the way.

For:Secondary 1 Information & Communication Technology · Unit:Networks & internet · Lesson 5 of 13 in the learning path

After this lesson, you can:
  • IP address = door plate online; four groups, each 0–255
  • Domains are for people, IPs for computers; DNS translates
  • URL = protocol + domain + path
資訊及通訊科技Information & Communication Technology
Before this lesson you should know: Computer network basics

§Text Passage

1Every device on a network needs an address so that others can deliver data to it accurately — the IP address, which works like the number on a front door, with data arriving like a letter addressed to your home, for example 192.168.1.1. Common IPv4 addresses consist of four groups of numbers from 0 to 255, but the explosion of devices worldwide exhausted them long ago, so the much longer IPv6 addresses were introduced.

2People cannot memorise long strings of numbers, hence the Domain Name System (DNS): an automatically updated phone book that translates domain names such as 'www.google.com' into the matching IP addresses. Every time a browser opens a website, its first step is actually a DNS lookup; if a DNS server fails, the connection may be perfectly fine yet not a single website will open.

3Hong Kong example: tapping a link in WhatsApp begins with a DNS query, and schools and companies keep internal domains so that students and staff can reach intranet resources easily. Once you understand how IP and DNS divide the work, troubleshooting becomes systematic: check the physical connection first, then name resolution, narrowing the problem down step by step until the cause is found.

1Summary 重點摘要

Every device online has an IP address like a door number; DNS is the phonebook that turns a web address like www.google.com into an IP so computers can find the way.

2Vocabulary cards Vocabulary

I
IP addressIP 地址

The unique number of every device online, e.g. 192.168.1.1.

D
DNS (Domain Name System)網域名稱系統

The system that turns web addresses into IP addresses — a phonebook.

D
Domain name網域名稱

The memorable site name, e.g. google.com — really just pointing at an IP.

U
URL統一資源定位器

The full web address: protocol + domain + path.

H
HTTPS加密網頁協定

Encrypted web traffic — passwords and personal data cannot be read on the way.

B
Browser瀏覽器

The program used to open web pages, e.g. Chrome, Safari, Edge.

I
IPv4 / IPv6IPv4/IPv6

Two generations of IP format: IPv4's four groups are running out, so IPv6 uses much longer addresses.

P
Protocol協定

The shared rules computers use to talk to each other, e.g. http/https.

3Step by step Steps

  1. IP addresses: door plates of the networkAn IP address is a device's numeric door plate on the network, for example 192.168.1.1; the common IPv4 format has four groups of numbers, each from 0 to 255. Data travelling across the network is routed entirely by IP, exactly as a letter needs the recipient's address to arrive. At home, the router issues inner IPs — the phone might be 192.168.1.5 and the computer 192.168.1.6 — while websites hold public IPs that users worldwide can reach.
  2. Domain names: addresses for humansNumbers are hard to remember, hence domain names such as google.com and labzstudy.com. A domain and its IP point to the same server — one made for human memory, one for machine routing — and neither works without the other. The analogy: the domain is 'Mum's office' in your contacts book, the IP the actual street address; you recall the name and the phone looks up the address. Domains are registered and renewed yearly, and sought-after ones even trade on a resale market.
  3. DNS: the automatic translatorDNS (the Domain Name System) translates domains into IPs: you type an address, your computer first asks a DNS server for google.com's IP, and only after DNS answers can the computer connect to it. The whole lookup usually finishes within a second and you never notice. DNS is an automatically updated phone book, run by many servers worldwide in cooperation. When DNS fails, the line may be perfectly fine yet the browser reports 'server not found', because a name went untranslated into an address.
  4. Taking a URL apartTake https://www.labzstudy.com/s1/ict/: the address splits into three parts. https is the encrypted transfer protocol, guaranteeing the data cannot be read on the way — online banking and shopping depend on it. www.labzstudy.com is the domain, naming which site to visit. /s1/ict/ is the path, showing which page inside the site to open, like the floor and flat number after a building address. Each part has its own job, and once you can read the structure, even an unfamiliar link can be judged at a glance.
  5. The full journey of loading a pageFrom typing to display there are five steps: first, the browser asks DNS for the domain's IP; second, with the IP in hand, the browser sends a request to that server; third, the server returns the page files; fourth, the browser receives the data; fifth, it renders the code into the picture. Troubleshoot along this chain: when other sites open but one site fails, the fault is probably that site itself; when no site opens at all, the cause is likely DNS, the router or the internet provider.
  6. IPv4 runs out, IPv6 steps inIPv4's four number groups offer about 4.3 billion combinations — seemingly endless once — yet online devices worldwide, from phones and computers to TVs, light bulbs and electricity meters, long ago outran the supply. The remedy is IPv6: addresses stretch to 128 bits in eight groups of hexadecimal digits, totalling 3.4 × 10³⁸ — enough to give every grain of sand on Earth its own address. Both formats now run in parallel during the transition, and with new devices and networks moving to IPv6, the supply is secure for decades.

4Diagrams Diagrams

DNS:網址翻譯員 DNS lookup你打網址www.labzstudy.com問 DNS 伺服器電話簿查冊攞到 IP例如 168.107.x.x連去網站電腦只識 IPIP 地址=電腦嘅「門牌號碼」(例如 192.168.1.1)DNS=網上電話簿:將人記得住嘅網址翻譯成機記得住嘅 IPDNS 壞咗會點?網絡正常但打網址開唔到——可以試改用公共 DNSIP 分公共(全世界唯一)同私人(屋企內部用 192.168 開頭)
Fig. 1: IP and DNS

5Worked example Example

Example: a DNS server breaks down. What happens when you type www.google.com, and why might typing the IP directly still connect?

  1. The normal flow: after typing an address, the computer must first ask DNS for the domain's IP.
  2. DNS is down: the query gets no answer and the computer never receives an IP.
  3. Without an IP there is no connection to the server, and the browser shows 'server not found'.
  4. Typing the IP directly skips the DNS translation step, so the target server may still be reached.
  5. Conclusion: DNS only translates domains into IPs; the data itself always travels by IP.
  6. Answer: Typing the domain fails because the broken DNS server withholds google.com's IP, while typing the IP directly skips translation and can still connect — showing that DNS translates names, but data always travels by IP.

6Common mistakes Mistakes

✗ Thinking the web address and the IP are two different sites.
✓ They point to the same server — the address is for people to remember, the IP is for computers to route.
✗ Treating http:// and https:// as the same.
✓ https adds encryption (S = Secure); passwords and personal data are only safe on https sites.
✗ Thinking an IP address never changes.
✓ Home IPs often change (dynamic IP); website server IPs are more fixed.
✗ Thinking 192.168.1.5 is unique across the whole world.
✓ Addresses starting with 192.168 are private IPs, valid only inside your home or school network — nearly every home router holds an address like 192.168.1.1; public addresses come from the internet provider.

7Quick check Quick check

Q1What does DNS do? A. remove viruses B. translate web addresses into IPs C. store photos

Q2What is an address like 192.168.1.1 called?

Q3Name the three parts of https://www.labzstudy.com/s1/ict/.

Q4An IPv4 address has four groups of numbers. What is the range of each group?

Q5Your computer opens no websites, but your classmate's works fine. Which link is the prime suspect?

8Recap Recap

  • IP address = door plate online; four groups, each 0–255
  • Domains are for people, IPs for computers; DNS translates
  • URL = protocol + domain + path
  • Journey: address → DNS finds IP → connect to server → load page
  • When DNS breaks, the connection is fine yet no site opens — think DNS first

Other subjects in this grade

Same subject, other grades