Configuring ISP Lines
Background
Usually, a DNS server returns the same IP address to visitors from different networks. However, in cross-network access, this would lead to high latency and poor user experience.
If you configure ISP lines when you create record sets, the DNS server returns different resolution results or IP addresses to visitors based on their carrier networks.
For example, you have built a website using domain name example.com and hosted the website on three servers, with one in a China Telecom equipment room, one in a China Unicom data center, and one in a China Mobile data center. You need to configure four ISP lines: Default, China Telecom, China Unicom, and China Mobile.
Principles
The Huawei Cloud authoritative DNS server obtains the source IP address of the recursive request, identifies the carrier of a user based on the carrier IP address database, matches the configured carrier line record sets, and returns the resolution result (for example, the server IP address) of the corresponding line. In this way, users of different carriers, such as China Telecom, China Unicom, China Mobile, China Education and Research Network (CERNET), China Mobile Tietong, and Dr. Peng, can be accurately scheduled to use the same carrier-specific line, effectively eliminating cross-carrier latency. This is different from the cache-based scheduling of local recursive DNS servers of carriers. The overall resolution process is as follows:
- Standard recursive query on the user client
- A user client initiates a domain name request and first queries the local hosts file and local DNS cache. If no result is found, the client forwards the query to the recursive DNS server of the local carrier (local DNS).
- If the recursive DNS server of the carrier does not have the cache, it sends an iterative query to the Huawei Cloud authoritative DNS cluster. The request packet carries the egress public IP address of the local DNS. If the EDNS0 extension protocol is supported, the request packet also carries the actual public IP address of the client.
- Core carrier identification logic of Huawei Cloud authoritative DNS
Huawei Cloud has a built-in real-time carrier IP address database to identify the carrier:
- The real IP address of the client carried in EDNS0 is used first to accurately identify the carrier that the user belongs to.
- If the local DNS does not support EDNS, the egress IP address of the recursive server is used to identify the carrier.
- Supported lines include mainstream lines of China Telecom, China Unicom, China Mobile, China Education and Research Network (CERNET), China Mobile Tietong, and Dr. Peng, as well as regional and provincial level-2 refined lines.
- Line matching and priority rules
Multiple A record sets with different carriers are added for the same domain name on the Huawei Cloud DNS console. The priorities of lines, in descending order, are:
Custom lines > ISP lines > region lines > default lines
- If a dedicated ISP line record set is matched, the IP address of the server on the line is returned.
- If the current ISP line is not configured, the IP address of the default line is returned.
- For the same carrier, province and city lines take precedence over region lines.
- Response delivery and global caching
- The authoritative DNS server returns the IP address that matches the line to the carrier's recursive DNS server.
- The carrier's recursive DNS caches the resolution result and delivers it to the user client.
- The TTL is set by the record sets on the Huawei Cloud authoritative DNS server, and the cache is automatically refreshed when the TTL expires.
Constraints
- ISP lines can be configured only for public zones.
- If a resolution line becomes faulty, you cannot switch to another resolution line.
ISP Lines
ISP lines are categorized by telecom carriers in China.
| Level 1 | Level 2 | Level 3 |
|---|---|---|
| China Telecom, China Mobile, China Unicom, and Dr. Peng | All regions | Default |
| North China | Default, Beijing, Tianjin, Hebei, Shanxi, and Inner Mongolia | |
| Northeast China | Default, Liaoning, Jilin, and Heilongjiang | |
| Northwest China | Default, Shaanxi, Gansu, Qinghai, Ningxia, and Xinjiang | |
| Central China | Default, Henan, Hubei, and Hunan | |
| East China | Default, Shanghai, Jiangsu, Zhejiang, Anhui, Fujian, Jiangxi, and Shandong | |
| South China | Default, Guangdong, Hainan, and Guangxi | |
| Southwest China | Default, Chongqing, Sichuan, Guizhou, Yunnan, and Xizang | |
| Jiaoyuwang and Tietong | All regions | Default |
For example, you have configured the following resolution lines for example.com:
- Default: 1.1.1.1
- China Telecom: 2.2.2.2
- China Telecom_North China: 3.3.3.3
When a China Telecom user in North China requests the domain name example.com, IP address 3.3.3.3 is returned. When a China Telecom user in another region requests this domain name, IP address 2.2.2.2 is returned. When a non-China Telecom user in a region other than North China requests the domain name, IP address 1.1.1.1 is returned.
Procedure
Configure ISP lines for your public domain names hosted on the DNS service.
The following describes how to configure a Default line to map the domain name to 1.1.1.1 and a China Telecom line to map the domain name to 2.2.2.2.
- Go to the Public Zones page.
- On the Public Zones page, click the domain name (example.com) of the public zone.
- Click Add Record Set.
- Add two A record sets for example.com. Configure the parameters based on Table 2.
Table 2 Parameters for adding an A record set Parameter
Description
Line 1
Line 2
Type
Record set type.
Select a record set type based on service requirements.
For details, see Table 1.
An A record set is selected here.
A – Map domains to IPv4 addresses
A – Map domains to IPv4 addresses
Name
Prefix of the domain name to be resolved.
This value is left empty by default.
For example, if the domain name is example.com, the value of the Name can be as follows:
- www: The domain name is www.example.com and usually used for a website.
- Left blank: The domain name is example.com and usually used for a website.
To use an at sign (@) as the domain name prefix, just leave this parameter blank.
- abc: The domain name is abc.example.com, a subdomain of example.com.
- mail: The domain name is mail.example.com and usually used for email servers.
- *: The domain name is *.example.com. It covers all subdomains of example.com.
www
www
Line
A specific route or path that the DNS server uses to determine which IP address to return based on the user's location, ISP, or other attributes.
The default value is Default.
- Default: returns the default resolution result irrespective of where the visitors come from.
- ISP: returns the resolution result based on end users' carrier networks. For details, see Configuring ISP Lines.
- Region: returns the resolution result based on end users' geographical locations. For details, see Configuring Region Lines.
- Custom Lines: returns the resolution result based on specified IP address ranges. For details, see Configuring Custom Lines.
Default
ISP_China Telecom
TTL (s)
How long a local DNS server caches a DNS record. It is measured in seconds.
Default value: 300
Value range: 1 to 2147483647
If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value.
Default value: 300
Default value: 300
Value
Returned result of domain name resolution.
For details, see Table 1.
1.1.1.1
2.2.2.2
Alias
Whether to associate the record set with a cloud resource.
Unlike a CNAME record set, an alias supports second-level domain names.
This option is disabled by default.
Types of record sets that support alias include A, MX, AAAA, TXT, SRV and CAA.
Disabled
Disabled
Weight
Weight for the record set.
Default value: 1
Value range: 0 to 1000
If a resolution line in a zone contains multiple record sets of the same type, you can set different weights to each record set. For details, see Configuring Weighted Routing.
1
1
Tag
Identifier of the record set. Each tag contains a key and a value.
You can add up to 20 tags for a record set.
The tag key:
- Cannot be left blank.
- Must be unique for each resource.
- Can contain a maximum of 128 characters.
- Cannot start or end with a space, or cannot start with _sys_. Only letters, digits, spaces, and the following special characters are allowed: _.:=+-@
The tag value:
- Can be left blank.
- Can contain a maximum of 255 characters.
- Can contain letters, digits, spaces, and special characters _.:/=+-@
NOTE:If your organization has configured tag policies for the DNS service, you need to add tags to your record sets based on the tag policies. If you add a tag that does not comply with the tag policies, record sets may fail to be created. Contact the administrator to learn more about tag policies.
example_key1
example_value1
example_key1
example_value1
Description
Supplementary information about the record set.
You can enter a maximum of 255 characters.
-
-
- Click OK.
Helpful Links
The priorities of resolution lines, in descending order, are: custom lines > ISP lines > region lines > default lines. For details, see What Are the Priorities of Resolution Lines?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot