Configuration Guide Configuring DNS
Configuration Example
Configuring Static Domain Name Resolution
Set the IP address of static domain name www.test.com to 192.168.1.1 on a device.
Set the IP address of static domain name www.testv6.com to 2001::1 on a device.
Ruijie#configure terminal
Ruijie(config)# ip host www.test.com 192.168.1.1
Ruijie(config)# ipv6 host www.testv6.com 2001::1
Ruijie(config)# exit
Run the show hosts command to check whether the static domain name entry is configured.
Ruijie#show hosts
Name servers are:
Host type Address TTL(sec)
www.test.com static 192.168.1.1 ---
www.testv6.com static 2001::1 ---
6.4.2 Configuring Dynamic Domain Name Resolution
Configuration Effect
The system resolver resolves the IP address mapped to a domain name through a DNS server.
Configuration Steps
Enabling Domain Name Resolution
Domain name resolution is enabled by default.
If this function is disabled, dynamic domain name resolution does not take effect.
Configuring a DNS Server
(Mandatory) To use dynamic domain name resolution, you must configure an external DNS server.
Verification
Run the show run command to check the configuration.
Related Commands
Configuring a DNS Server
ip name-server { ip-address | ipv6-address }