No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Fat AP and Cloud AP V200R008C00 CLI-based Configuration Guide

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuration Examples for DNS

Configuration Examples for DNS

Example for Configuring the DNS Client

Networking Requirements

IP addresses are difficult to remember. Users want to access network servers using domain names. When users input part of a domain name, the DNS server is required to correctly parse the domain name so that users can access network servers. For example, when users want to access the server with domain name huawei.com, they only need to input huawei. In this example, users want to rapidly access the server with domain name Server1, requiring domain name resolution efficiency to be improved.

Figure 7-85  Networking for configuring the DNS client

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure an IP address for each interface, and configure a static routing protocol to ensure that there are reachable routes between devices.

  2. Configure static DNS entries on the AP to ensure that users access Server1 using a domain name.

  3. Configure the dynamic DNS function on the AP to enable the AP to communicate with network servers using the dynamic DNS query mode.

Procedure

  1. Configure an IP address for each interface. The following uses the configuration of the AP as an example.

    <Huawei> system-view
    [Huawei] sysname AP
    [AP] vlan batch 102
    [AP] interface gigabitethernet 0/0/1
    [AP-GigabitEthernet0/0/1] port hybrid pvid vlan 102
    [AP-GigabitEthernet0/0/1] port hybrid untagged vlan 102
    [AP-GigabitEthernet0/0/1] quit
    [AP] interface vlanif 102
    [AP-Vlanif102] ip address 2.1.1.2 255.255.255.0
    [AP-Vlanif102] quit
    

  2. Configure a static route.

    [AP] ip route-static 0.0.0.0 0.0.0.0 2.1.1.1
    

  3. Configure static DNS.

    [AP] ip host Server1 3.1.1.2
    

  4. Configure dynamic DNS.

    [AP] dns resolve
    [AP] dns server 4.1.1.2
    [AP] dns domain com
    

  5. Verify the configuration.

    # Run the ping Server1 command on the AP. You can see that the ping operation succeeds and the destination IP address is 3.1.1.2.

    <AP> ping Server1 
     PING Server1 (3.1.1.2): 56  data bytes, press CTRL_C to break
        Reply from 3.1.1.2: bytes=56 Sequence=1 ttl=127 time=4 ms
        Reply from 3.1.1.2: bytes=56 Sequence=2 ttl=127 time=1 ms
        Reply from 3.1.1.2: bytes=56 Sequence=3 ttl=127 time=1 ms
        Reply from 3.1.1.2: bytes=56 Sequence=4 ttl=127 time=1 ms
        Reply from 3.1.1.2: bytes=56 Sequence=5 ttl=127 time=1 ms
    
      --- Server1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 1/1/4 ms
    

    # Run the ping huawei.com command on the AP. You can see that the ping operation succeeds and the destination IP address is 1.1.1.2.

    <AP> ping huawei.com
      PING huawei.com (1.1.1.2): 56  data bytes, press CTRL_C to break
        Reply from 1.1.1.2: bytes=56 Sequence=1 ttl=127 time=6 ms
        Reply from 1.1.1.2: bytes=56 Sequence=2 ttl=127 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=3 ttl=127 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=4 ttl=127 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=5 ttl=127 time=4 ms
    
      --- huawei.com ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 4/4/6 ms
    

    # Run the ping huawei command on the AP. You can see that the ping operation succeeds, the corresponding domain name is huawei.com, and the destination IP address is 1.1.1.2.

    <AP> ping huawei
      PING huawei.com (1.1.1.2): 56  data bytes, press CTRL_C to break
        Reply from 1.1.1.2: bytes=56 Sequence=1 ttl=127 time=6 ms
        Reply from 1.1.1.2: bytes=56 Sequence=2 ttl=127 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=3 ttl=127 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=4 ttl=127 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=5 ttl=127 time=4 ms
    
      --- huawei.com ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 4/4/6 ms
    

    # Run the display ip host command on the AP. You can view mappings between host names and IP addresses in static DNS entries.

    <AP> display ip host
    Host                 Age        Flags  Address
    Server1              0          static 3.1.1.2
    

    # Run the display dns dynamic-host command on the AP. You can view information about dynamic DNS entries in the domain name cache.

    <AP> display dns dynamic-host
    Host                                     TTL   Type   Address(es)               
    huawei.com                               114   IP     1.1.1.2                   
    

Configuration Files
  • Configuration file of the AP

    #
     sysname AP
    #
    ip host Server1 3.1.1.2
    #
     dns resolve
     dns server 4.1.1.2
     dns domain com
    #
    vlan batch 102
    #
    interface Vlanif102
     ip address 2.1.1.2 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port hybrid pvid vlan 102
     port hybrid untagged vlan 102 
    #
    ip route-static 0.0.0.0 0.0.0.0 2.1.1.1
    #
    return
    

Example for Configuring DNS Proxy

Networking Requirements
As shown in Figure 7-86, the enterprise deploys a DNS server only on the headquarters network to save costs. The route between the AP and the DNS server or between the AP and the FTP server is reachable. The mapping between the domain name (huawei.com) of the FTP server and the IP address 2.1.1.3 is recorded on the DNS server. Enterprise users on the branch network expect to access the FTP server through the DNS domain name. To facilitate maintenance, the enterprise requires that users be unaware of the DNS server address change.
Figure 7-86  Network diagram for configuring DNS Proxy

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure DNS Proxy on the AP to implement domain name resolution for clients.

    NOTE:

    After DNS Proxy is enabled, the AP can be regarded as the DNS server of HostA. You need to configure the AP's IP address as the IP address of the DNS server on HostA and configure the IP address (2.1.1.1) of the DNS server on the headquarters network on the AP. In this way, when the DNS server address changes, you only need to modify the configurations on the AP, which is not detected by the users.

Procedure

  1. Configure an IP address for the interface.

    <Huawei> system-view
    [Huawei] sysname AP
    [AP] vlan batch 10
    [AP] interface gigabitethernet 0/0/1
    [AP-GigabitEthernet0/0/1] port hybrid pvid vlan 10
    [AP-GigabitEthernet0/0/1] port hybrid untagged vlan 10
    [AP-GigabitEthernet0/0/1] quit
    [AP] interface vlanif 10
    [AP-Vlanif10] ip address 1.1.1.1 255.255.0.0
    [AP-Vlanif10] quit
    

  2. Configure DNS Proxy.

    [AP] dns proxy enable
    [AP] dns resolve
    [AP] dns server 2.1.1.1
    

  3. Configure the default route from the DNS proxy to the DNS server.

    Assume that the IP address of the next hop from the DNS proxy to the DNS server is 1.1.1.2/16.

    [AP] ip route-static 0.0.0.0 0.0.0.0 1.1.1.2
    

  4. Specify the IP address of the DNS server on HostA as 1.1.1.1.
  5. Verify the configuration.

    # Run the display current-configuration command on the AP to check DNS Proxy configurations.

    <AP> display current-configuration | include dns 
     dns resolve                                                                    
     dns server 2.1.1.1                                                             
     dns proxy enable                                                               
    

    # Run the ping huawei.com command on HostA. The ping operation succeeds.

    C:\Documents and Settings\HostA>ping huawei.com
      PING huawei.com [2.1.1.3] with 32 bytes of data:
        Reply from 2.1.1.3: bytes=32 time=16ms TTL=255
        Reply from 2.1.1.3: bytes=32 time<1ms TTL=255
        Reply from 2.1.1.3: bytes=32 time<1ms TTL=255
        Reply from 2.1.1.3: bytes=32 time<1ms TTL=255
    
    Ping statistics for 192.168.168.1:
        Packets: Sent = 4, Received = 4, Lost = 0(0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 16ms, Average = 4ms
    
    

Configuration Files

Configuration file of the AP

#
 sysname AP
#
interface Vlanif10
 ip address 1.1.1.1 255.255.0.0
#
interface GigabitEthernet0/0/1
 port hybrid pvid vlan 10
 port hybrid untagged vlan 10 
#
 dns resolve 
 dns server 2.1.1.1 
 dns proxy enable
#
 ip route-static 0.0.0.0 0.0.0.0 1.1.1.2
#
return
Translation
Download
Updated: 2019-01-11

Document ID: EDOC1000176006

Views: 114420

Downloads: 309

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next