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

AR500, AR510, AR531, AR550, AR1500, and AR2500 V200R010

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 a DHCP Client

Example for Configuring a DHCP Client

Networking Requirements

As shown in Figure 3-18, GE0/0/1 on the router is enabled with the DHCP client function, and dynamically obtains network information such as IP addresses from the carrier's DHCP server.

GE0/0/2 on the router is enabled with the DHCP server function, and allocates information such as IP addresses and gateway addresses to the connected PCs. In addition, the function is enabled on the router that the DNS and NetBIOS server configurations can be automatically obtained from the address pool of GE0/0/2, so that these configurations assigned to PCs are the same as those assigned by the carrier.

Figure 3-18  Networking diagram of configuring a DHCP client

Configuration Roadmap

  1. Enable the DHCP client function on GE0/0/1 so that the router can dynamically obtain IP addresses, DNS and NetBIOS server configurations from the DHCP server.
  2. Enable the DHCP server function on GE0/0/2 to use the interface address pool for address allocation. Enable the function of automatically obtaining DNS and NetBIOS server configurations to assign network parameters such as IP addresses, DNS and NetBIOS server configurations to PCs.
NOTE:

Before the configuration, ensure that the devices on the network can communicate with each other.

In this example, the carrier's DHCP server will deliver the configurations to the router. The configurations include the DNS server address 10.1.2.1, domain name suffix huawei, and NetBIOS server address 10.1.3.1. Configure the carrier's DHCP server before configuring the router.

Procedure

  1. Configure the DHCP client function on GE0/0/1.

    <Huawei> system-view
    [Huawei] sysname Router
    [Router] interface gigabitethernet 0/0/1
    [Router-GigabitEthernet0/0/1] ip address dhcp-alloc
    [Router-GigabitEthernet0/0/1] quit

  2. Enable the DHCP server function on GE0/0/2 to use the interface address pool for address allocation, and enable the function of automatically obtaining DNS and NetBIOS server configurations.
    1. Enable DHCP.

      [Router] dhcp enable

    2. Configure GE0/0/2 to work in interface address pool mode.

      [Router] interface gigabitethernet 0/0/2
      [Router-GigabitEthernet0/0/2] ip address 192.168.1.1 24
      [Router-GigabitEthernet0/0/2] dhcp select interface
      

    3. Enable the function of automatically obtaining DNS and NetBIOS server configurations on GE0/0/2.

      [Router-GigabitEthernet0/0/2] dhcp server import all
      [Router-GigabitEthernet0/0/2] quit

  3. Verify the configuration.

    # Run the display dhcp client command on the router to view the status of the DHCP client function.

    [Router] display dhcp client
    DHCP client lease information on interface GigabitEthernet0/0/1 :               
     Current machine state         : Bound                                          
     Internet address assigned via : DHCP                                           
     Physical address              : 5489-98f7-310f                                 
     IP address                    : 10.1.5.254                                     
     Subnet mask                   : 255.255.255.0                                  
     Gateway ip address            : 10.1.5.1                                       
     DHCP server                   : 10.1.5.1                                       
     Lease obtained at             : 2015-02-10 08:47:41                            
     Lease expires at              : 2015-02-11 08:47:41                            
     Lease renews at               : 2015-02-10 20:47:41                            
     Lease rebinds at              : 2015-02-11 05:47:41                            
     Domain name                   : huawei                                         
     DNS                           : 10.1.2.1                                       
     NBNS                          : 10.1.3.1

    # Run the display ip pool import all command to view the DNS and NetBIOS server configurations dynamically obtained by the router.

    [Router] display ip pool import all
     -----------------------------------------------------------------------------  
     Parameter      Update time          Protocol Value                             
     -----------------------------------------------------------------------------  
     domain-name    2015-02-10 08:47:41  dhcp     huawei                            
     dns-server     2015-02-10 08:47:41  dhcp     10.1.2.1                          
     nbns-server    2015-02-10 08:47:41  dhcp     10.1.3.1                          
     -----------------------------------------------------------------------------  

Configuration Files

Router configuration file

#
 sysname Router
#
dhcp enable
#
interface GigabitEthernet0/0/1
 ip address dhcp-alloc
#
interface GigabitEthernet0/0/2
 ip address 192.168.1.1 255.255.255.0
 dhcp select interface
 dhcp server import all
#
return
Translation
Download
Updated: 2019-05-20

Document ID: EDOC1100034231

Views: 82346

Downloads: 54

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