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

CLI-based Configuration Guide - IP Service

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

This document describes the concepts and configuration procedures of IP Service features on the device, and provides the configuration examples.
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).
Example for Configuring the DNS Client

Example for Configuring the DNS Client

Networking Requirements

Compared with an IP address, the URL is easy to remember. Users want to access network servers using domain names. It is required that the DNS server can resolve a domain name after a user enters some fields of the domain name. For example, when a user attempts to access the server huawei.com, the user only needs to enter huawei. It is required that the DNS server can fast resolve common domain names.
Figure 4-7  Networking diagram for configuring the DNS client

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure static DNS entries on RouterA to access server B and C.

  2. Configure the dynamic DNS resolution on RouterA to access the DNS server.

  3. Configure the domain name suffix on RouterA to support a domain name suffix list.

  4. Configure OSPF on routers to ensure routes are reachable.

Procedure

  1. Configure RouterA.

    # Configure an IP address for GE1/0/0.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 10.1.1.2 255.255.0.0
    [RouterA-GigabitEthernet1/0/0] quit
    

    # Configure OSPF.

    [RouterA] ospf
    [RouterA-ospf-1] area 0
    [RouterA-ospf-1-area-0.0.0.0] network 10.1.0.0 0.0.255.255
    [RouterA-ospf-1-area-0.0.0.0] quit
    [RouterA-ospf-1] quit
    

    # Configure static DNS entries.

    [RouterA] ip host serverB 10.4.1.1
    [RouterA] ip host serverC 10.4.1.2
    

    # Enable DNS resolution.

    [RouterA] dns resolve

    # Configure an IP address for the DNS server.

    [RouterA] dns server 10.3.1.2

    # Set the domain name suffix to net.

    [RouterA] dns domain net

    # Set the domain name suffix to com.

    [RouterA] dns domain com
    [RouterA] quit
    
    NOTE:

    You need to configure OSPF on RouterB and RouterC to ensure reachable routes between them. For details about OSPF configurations on RouterB and RouterC, see the configuration files.

  2. Verify the configuration.

    # Run the ping serverB command on RouterA. You can see that the ping operation succeeds and the destination IP address is 10.4.1.1.

    <RouterA>  ping serverB 
     PING serverB (10.4.1.1): 56  data bytes, press CTRL_C to break
        Reply from 10.4.1.1: bytes=56 Sequence=1 ttl=126 time=4 ms
        Reply from 10.4.1.1: bytes=56 Sequence=2 ttl=126 time=1 ms
        Reply from 10.4.1.1: bytes=56 Sequence=3 ttl=126 time=1 ms
        Reply from 10.4.1.1: bytes=56 Sequence=4 ttl=126 time=1 ms
        Reply from 10.4.1.1: bytes=56 Sequence=5 ttl=126 time=1 ms
    
      --- serverB 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 RouterA. You can see that the ping operation succeeds and the destination IP address is 10.2.1.3.

    <RouterA> ping huawei.com
    Trying DNS server (10.3.1.2)
      PING huawei.com (10.2.1.3): 56  data bytes, press CTRL_C to break
        Reply from 10.2.1.3: bytes=56 Sequence=1 ttl=126 time=6 ms
        Reply from 10.2.1.3: bytes=56 Sequence=2 ttl=126 time=4 ms
        Reply from 10.2.1.3: bytes=56 Sequence=3 ttl=126 time=4 ms
        Reply from 10.2.1.3: bytes=56 Sequence=4 ttl=126 time=4 ms
        Reply from 10.2.1.3: bytes=56 Sequence=5 ttl=126 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 RouterA. You can see that the ping operation succeeds, the domain name changes to huawei.com, and the destination IP address is 10.2.1.3.

    <RouterA> ping huawei
    Trying DNS server (10.3.1.2)
      PING huawei.com (10.2.1.3): 56  data bytes, press CTRL_C to break
        Reply from 10.2.1.3: bytes=56 Sequence=1 ttl=126 time=6 ms
        Reply from 10.2.1.3: bytes=56 Sequence=2 ttl=126 time=4 ms
        Reply from 10.2.1.3: bytes=56 Sequence=3 ttl=126 time=4 ms
        Reply from 10.2.1.3: bytes=56 Sequence=4 ttl=126 time=4 ms
        Reply from 10.2.1.3: bytes=56 Sequence=5 ttl=126 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 RouterA. You can view mappings between host names and IP addresses in static DNS entries.

    <RouterA> display ip host
    Host                 Age        Flags  Address
    serverB                0          static 10.4.1.1
    serverC                0          static 10.4.1.2 

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

    <RouterA> display dns dynamic-host
    Host                                     TTL   Type   Address(es)               
    huawei.com                               114   IP     10.2.1.3                        
    
    NOTE:

    The TTL field in the command output indicates the time left before a DNS entry ages out, in seconds.

Configuration File

  • Configuration file of RouterA

    #
     sysname RouterA
    #
    ip host serverB 10.4.1.1
    ip host serverC 10.4.1.2
    #
     dns resolve
     dns server 10.3.1.2
     dns domain net
     dns domain com
    #
    interface GigabitEthernet 1/0/0
     ip address 10.1.1.2 255.255.0.0
    #
    ospf 1
     area 0.0.0.0
      network 10.1.0.0 0.0.255.255
    #
    return
    
  • Configuration file of RouterB

    #
     sysname RouterB
    #
    interface LoopBack0
     ip address 10.4.1.1 255.255.255.255
    #
    interface GigabitEthernet 1/0/0
     ip address 10.1.1.1 255.255.0.0
    #
    interface GigabitEthernet 2/0/0
     ip address 10.2.1.1 255.255.0.0
    #
    ospf 1
     area 0.0.0.0
      network 10.1.0.0 0.0.255.255
      network 10.2.0.0 0.0.255.255
      network 10.4.1.1 0.0.0.0
    #
    return
    
  • Configuration file of RouterC

    #
     sysname RouterC
    #
    interface LoopBack0
     ip address 10.4.1.2 255.255.255.255
    #
    interface GigabitEthernet 1/0/0
     ip address 10.3.1.1 255.255.0.0
    #
    interface GigabitEthernet 2/0/0
     ip address 10.2.1.2 255.255.0.0
    #
    ospf 1
     area 0.0.0.0
      network 10.2.0.0 0.0.255.255
      network 10.3.0.0 0.0.255.255
      network 10.4.1.2 0.0.0.0
    #
    return
    
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100069333

Views: 32813

Downloads: 166

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