Example for Configuring the DDNS Client (Using the Update Mode Implemented Through the DDNS Service Provider www.oray.cn That Are Used as the DDNS Server)
Networking Requirements
In Figure 4-10, Router can function as a web server to provide web services for network users and users can access the web server by sending DNS requests. The domain name of the web server is www.abc.com, corresponding to the IP address of GE1/0/0 on Router.
The IP address of GE1/0/0 on Router may change. As a result, if the mapping relationship between the web server's domain name and the IP address is not updated in time on the DNS server, a user access error may occur. To solve this problem, the administrator configures the DDNS client function and uses the DDNS service provider www.oray.cn as the DDNS server, ensuring that the web server's domain name on the DNS server corresponds to the latest IP address.
There are reachable routes among Router, the DNS server, and the DDNS server and the administrator has implemented user registration on the DDNS server.
Configuration Roadmap
Create a DDNS policy on Router and bind the policy to Router, so that Router can send a request for dynamically updating DNS entries if the IP address of GE1/0/0 on Router changes.
Authentication steps are implemented in the update process through DDNS servers. All DDNS servers except Siemens DDNS servers do not encrypt user passwords during the authentication. For security purposes, you are advised to configure IPSec when using these DDNS servers to implement update. For details, see IPSec Configuration in the Huawei AR Series V300R019 Configuration Guide - VPN.
Procedure
- Configure Router.
# Create and configure a DDNS policy.
<Huawei> system-view [Huawei] sysname Router [Router] ddns policy mypolicy [Router-ddns-policy-mypolicy] method vendor-specific [Router-ddns-policy-mypolicy] url oray://<username>:<password>@phddnsdev.oray.net username steven password YsHsjx_202206 [Router-ddns-policy-mypolicy] quit
By default, the update mode of the DDNS client is vendor-specific. If the default update mode of the device is not modified using the method command, you do not need to run the method vendor-specific command.
# Configure the DNS resolution function and specify an IP address for the DNS server to enable Router to obtain the domain name of the DDNS server and the URL for accessing the DDNS server.[Router] dns resolve [Router] dns server 10.3.1.2
# Bind the DDNS policy to GE1/0/0.[Router] interface gigabitethernet 1/0/0 [Router-GigabitEthernet1/0/0] ddns apply policy mypolicy fqdn www.abc.com [Router-GigabitEthernet1/0/0] quit
When the configuration is complete and the IP address of GE1/0/0 changes, Router notifies the DNS server to update the mapping relationship between the domain name www.abc.com and the IP address, ensuring that users can obtain the latest IP address by parsing the domain name www.abc.com.
- Verify the configuration.
# Run the display ddns policy mypolicy command on Router to check information about the DDNS policy named mypolicy.
<Router> display ddns policy mypolicy Policy name : mypolicy Server : oray://<username>:<password>@phddnsdev.oray.net User name : steven Password : ****** Update method : vendor-specific Update interval : 3600 seconds Apply interface : GigabitEthernet1/0/0
# Run the display ddns interface gigabitethernet 1/0/0 command on Router to check information about the DDNS policy of GE1/0/0.
<Router> display ddns interface gigabitethernet 1/0/0 Policies applied on interface GigabitEthernet1/0/0 : ------------------------------------------------------------------------------ Policy name : mypolicy Server : oray://<username>:<password>@phddnsdev.oray.net User name : steven Password : ****** Update method : vendor-specific Update interval : 3600 seconds Current status : ESTABLISH Client FQDN : www.abc.com Client IP : 192.168.10.1 Server IP : - Last update time : 2015-07-22 14:37:34 Last update result : Success
Configuration File
Configuration file of Router
# sysname Router # dns resolve dns server 10.3.1.2 # ddns policy mypolicy url oray://<username>:<password>@phddnsdev.oray.net username steven password %^%#3WDHD(^Kz=<<>PBi\e-*C=HOP7m73Lq4L</[E!(8%^%# # interface GigabitEthernet1/0/0 ddns apply policy mypolicy fqdn www.abc.com # return