DDNS configuration example with PeanutHull server
Network requirements
As shown in Figure 48, the router is a Web server with domain name whatever.gicp.cn and uses an IP address dynamically obtained through DHCP. To make sure the router can always provide Web services at whatever.gicp.cn when its IP address changes, perform the following tasks on the router:
Configure a DDNS policy to update the router's domain name-to-IP address mapping on the DDNS server. The DDNS server then updates the mapping on the DNS server.
Specify the IP address of the DNS server so that the router can access the DDNS server through domain name.
Figure 48: Network diagram
Configuration procedure
Before configuring DDNS on Router, perform the following tasks:
Register with username steven and password nevets at http://www.oray.cn/.
Configure a DDNS policy to update the mapping between the router's FQDN and IP address.
Make sure the devices can reach each other.
# Create a DDNS policy named oray.cn and enter its view.
<Router> system-view [Router] ddns policy oray.cn
# Specify the URL address, username, and password for DDNS update requests.
[Router-ddns-policy-oray.cn] url oray://phservice2.oray.net [Router-ddns-policy-oray.cn] username steven [Router-ddns-policy-oray.cn] password simple nevets
# Set the DDNS update request interval to 12 minutes.
[Router-ddns-policy-oray.cn] interval 0 0 12 [Router-ddns-policy-oray.cn] quit
# Specify the IP address of the DNS server as 1.1.1.1.
[Router] dns server 1.1.1.1
# Apply the DDNS policy to GigabitEthernet 1/0/1 to enable DDNS update. The mapping between whatever.gicp.cn and the primary IP address of GigabitEthernet 1/0/1 will be dynamically updated.
[Router] interface gigabitethernet 1/0/1 [Router-GigabitEthernet1/0/1] ddns apply policy oray.cn fqdn whatever.gicp.cn