DDNS configuration example with PeanutHull server

Network requirements

As shown in Figure 46, Switch is a Web server with domain name whatever.gicp.cn.

Switch acquires the IP address through DHCP. Through the PeanutHull server, Switch informs the DNS server of the latest mapping between its domain name and IP address. The IP address of the DNS server is 1.1.1.1. Switch uses the DNS server to translate www.oray.cn into the corresponding IP address.

Figure 46: Network diagram

Configuration procedure

Before configuring DDNS on Switch, do the following:

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

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

# Specify for DDNS update requests the URL address with the login ID steven and plaintext password nevets.

[Switch-ddns-policy-oray.cn] url oray://phservice2.oray.net
[Switch-ddns-policy-3322.org] username steven
[Switch-ddns-policy-3322.org] 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 the DDNS policy oray.cn to VLAN-interface 2 to enable DDNS update and to dynamically update the mapping between whatever.gicp.cn and the primary IP address of VLAN-interface 2.

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

After the preceding configuration is completed, Switch notifies the DNS server of its new domain name-to-IP address mapping through the PeanutHull server, whenever the IP address of Switch changes. Therefore, Switch can always provide Web service at whatever.gicp.cn.