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

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
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

Configuration Examples

This section provides DNS configuration example, including networking requirements, configuration roadmap, and configuration procedure.

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 host huawei.com, the user only needs to enter huawei. It is required that the DNS server can fast resolve common domain names.

Figure 6-38 Networking diagram for configuring the DNS client

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure IP addresses for interfaces on SwitchA and SwitchB, and configure a dynamic routing protocol to ensure that there are reachable routes between the devices.

  2. Configure static DNS entries on SwitchA to access FTPServer using domain names.

  3. Configure dynamic DNS on SwitchA to allow SwitchA to communicate with network servers in dynamic DNS query mode.

Procedure

  1. Configure VLANs that each interface belongs to.

    # Configure SwitchA.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan batch 102
    [*SwitchA] interface 10ge 1/17/1
    [*SwitchA-10GE1/17/1] port link-type trunk
    [*SwitchA-10GE1/17/1] port trunk allow-pass vlan 102
    [*SwitchA-10GE1/17/1] quit
    [*SwitchA] commit
    

    # Configure SwitchB.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchB
    [*HUAWEI] commit
    [~SwitchB] vlan batch 101 to 104
    [*SwitchB] interface 10ge 1/17/1
    [*SwitchB-10GE1/17/1] port default vlan 101
    [*SwitchB-10GE1/17/1] quit
    [*SwitchB] interface 10ge 1/17/2
    [*SwitchB-10GE1/17/2] port link-type trunk
    [*SwitchB-10GE1/17/2] port trunk allow-pass vlan 102
    [*SwitchB-10GE1/17/2] quit
    [*SwitchB] interface 10ge 1/17/3
    [*SwitchB-10GE1/17/3] port default vlan 103
    [*SwitchB-10GE1/17/3] quit
    [*SwitchB] interface 10ge 1/17/4
    [*SwitchB-10GE1/17/4] port default vlan 104
    [*SwitchB-10GE1/17/4] quit
    [*SwitchB] commit
    

  2. Configure IP addresses for VLANIF interfaces.

    # Configure IP addresses for interfaces on SwitchA.

    [~SwitchA] interface vlanif 102
    [*SwitchA-Vlanif102] ip address 2.1.1.2 255.255.0.0
    [*SwitchA-Vlanif102] quit
    [*SwitchA] commit
    

    # Configure IP addresses for interfaces on SwitchB.

    [~SwitchB] interface vlanif 101
    [*SwitchB-Vlanif101] ip address 1.1.1.1 255.255.0.0
    [*SwitchB-Vlanif101] quit
    [*SwitchB] interface vlanif 102
    [*SwitchB-Vlanif102] ip address 2.1.1.1 255.255.0.0
    [*SwitchB-Vlanif102] quit
    [*SwitchB] interface vlanif 103
    [*SwitchB-Vlanif103] ip address 3.1.1.1 255.255.0.0
    [*SwitchB-Vlanif103] quit
    [*SwitchB] interface vlanif 104
    [*SwitchB-Vlanif104] ip address 4.1.1.1 255.255.0.0
    [*SwitchB-Vlanif104] quit
    [*SwitchB] commit
    

  3. Configure basic OSPF functions.

    # Configure OSPF on SwitchA.

    [~SwitchA] ospf
    [*SwitchA-ospf-1] area 0
    [*SwitchA-ospf-1-area-0.0.0.0] network 2.1.0.0 0.0.255.255
    [*SwitchA-ospf-1-area-0.0.0.0] quit
    [*SwitchA-ospf-1] quit
    [*SwitchA] commit
    

    # Configure OSPF on SwitchB.

    [~SwitchB] ospf
    [*SwitchB-ospf-1] area 0
    [*SwitchB-ospf-1-area-0.0.0.0] network 1.1.0.0 0.0.255.255
    [*SwitchB-ospf-1-area-0.0.0.0] network 2.1.0.0 0.0.255.255
    [*SwitchB-ospf-1-area-0.0.0.0] network 3.1.0.0 0.0.255.255
    [*SwitchB-ospf-1-area-0.0.0.0] network 4.1.0.0 0.0.255.255
    [*SwitchB-ospf-1-area-0.0.0.0] quit
    [*SwitchB-ospf-1] quit
    [*SwitchB] commit
    

  4. Configure static DNS.

    [~SwitchA] ip host FTPServer 3.1.1.2
    [*SwitchA] commit
    

  5. Configure dynamic DNS.

    [~SwitchA] dns resolve
    [*SwitchA] dns server 4.1.1.2
    [*SwitchA] dns domain com
    [*SwitchA] commit
    [~SwitchA] quit
    

  6. Verify the configuration.

    # Run the ping FTPServer command on SwitchA. The ping operation succeeds and the destination IP address is 3.1.1.2.

    <SwitchA>  ping FTPServer 
     PING FTPServer (3.1.1.2): 56  data bytes, press CTRL_C to break
        Reply from 3.1.1.2: bytes=56 Sequence=1 ttl=253 time=4 ms
        Reply from 3.1.1.2: bytes=56 Sequence=2 ttl=253 time=1 ms
        Reply from 3.1.1.2: bytes=56 Sequence=3 ttl=253 time=1 ms
        Reply from 3.1.1.2: bytes=56 Sequence=4 ttl=253 time=1 ms
        Reply from 3.1.1.2: bytes=56 Sequence=5 ttl=253 time=1 ms
    
      --- FTPServer 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 SwitchA. The ping operation succeeds and the destination IP address is 1.1.1.2.

    <SwitchA> 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=253 time=6 ms
        Reply from 1.1.1.2: bytes=56 Sequence=2 ttl=253 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=3 ttl=253 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=4 ttl=253 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=5 ttl=253 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 SwitchA. The ping operation succeeds. The domain name is huawei.com and the destination IP address is 1.1.1.2.

    <SwitchA> 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=253 time=6 ms
        Reply from 1.1.1.2: bytes=56 Sequence=2 ttl=253 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=3 ttl=253 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=4 ttl=253 time=4 ms
        Reply from 1.1.1.2: bytes=56 Sequence=5 ttl=253 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 SwitchA. The command output shows mappings between host names and IP addresses in static DNS entries.

    <SwitchA> display ip host
    Host                 Age        Flags  Address
    FTPServer            0          static 3.1.1.2
    

    # Run the display dns dynamic-host command on SwitchA. The command output shows dynamic DNS entries in the domain name cache.

    <SwitchA> display dns dynamic-host
    No  Domain Name         IpAddress      TTL    Alias
    1   huawei.com          1.1.1.2        114
    

Configuration Files
  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    ip host FTPServer 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.0.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 102
    #
    ospf 1
     area 0.0.0.0
      network 2.1.0.0 0.0.255.255
    #
    return
    
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 101 to 104
    #
    interface Vlanif101
     ip address 1.1.1.1 255.255.0.0
    #
    interface Vlanif102
     ip address 2.1.1.1 255.255.0.0
    #
    interface Vlanif103
     ip address 3.1.1.1 255.255.0.0
    #
    interface Vlanif104
     ip address 4.1.1.1 255.255.0.0
    #
    interface 10GE1/17/1
     port default vlan 101
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 102
    #
    interface 10GE1/17/3
     port default vlan 103
    #
    interface 10GE1/17/4
     port default vlan 104
    #
    ospf 1
     area 0.0.0.0
      network 1.1.0.0 0.0.255.255
      network 2.1.0.0 0.0.255.255
      network 3.1.0.0 0.0.255.255
      network 4.1.0.0 0.0.255.255
    #
    return
    
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 57176

Downloads: 3617

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