← Networking

Network services

DNS and DHCP

DNS与DHCP

When your device joins a network it needs an IP address. Instead of typing it yourself, a DHCP server, usually inside the home router, gives it one automatically.

DHCP gives the device four things: an IP address, a subnet mask, the default gateway and a DNS server address. The address is leased for a period and then renewed.

DNS turns site names into IP addresses. When you type a site name, your device asks a DNS server; if it doesn't know, it asks other servers in turn until it reaches the one responsible for that domain.

Answers are cached for a while so the site opens faster next time. That is why a change to domain settings, such as pointing a site to a new address, can take a few hours to appear.

Common DNS records include A, which links a name to an IPv4 address; CNAME, which makes one name point to another; and MX, which sets the mail server for a domain.

Ask the AI assistant

Ask anything about this lesson and get a simple answer with the terms in Chinese, Arabic and English.

The AI assistant runs on Google's Gemini model and can make mistakes. Do not write personal information. Available to signed-in learners, up to 30 requests a day.

The content is simplified and covers the basics only.