DDNS configuration example with PeanutHull server

Network requirements

As shown in Figure 52, the switch is a Web server with domain name whatever.gicp.cn and uses an IP address dynamically obtained through DHCP. To make sure the switch can always provide Web services at whatever.gicp.cn when its IP address changes, perform the following tasks on the switch:

Figure 52: Network diagram

Configuration procedure

Before configuring DDNS on the switch, perform the following tasks:

# Create a DDNS policy named oray.cn and enter its view.

<Switch> system-view
[Switch] ddns policy oray.cn

# Specify the URL address, username, and password for DDNS update requests.

[Switch-ddns-policy-oray.cn] url oray://phservice2.oray.net
[Switch-ddns-policy-oray.cn] username steven
[Switch-ddns-policy-oray.cn] password simple nevets

# Set the DDNS update request interval to 12 minutes.

[Switch-ddns-policy-oray.cn] interval 0 0 12
[Switch-ddns-policy-oray.cn] quit

# Specify the IP address of the DNS server as 1.1.1.1.

[Switch] dns server 1.1.1.1

# Apply DDNS policy oray.cn to VLAN-interface 2 to enable DDNS update. The mapping between domain name whatever.gicp.cn and the primary IP address of VLAN-interface 2 will be dynamically updated.

[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ddns apply policy oray.cn fqdn whatever.gicp.cn