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

NE20E-S2 V800R010C10SPC500 Configuration Guide - IP Services 01

This is NE20E-S2 V800R010C10SPC500 Configuration Guide - IP Services

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 DHCP Relay

Example for Configuring DHCP Relay

This section provides an example for configuring a DHCP relay agent to forward DHCP messages between the DHCP clients and the DHCP server on different network segments. This configuration is available only on carrier IP devices.

Networking Requirements

As shown in Figure 4-7, the DHCP clients reside on the network segment 10.100.0.0/16, and the DHCP server resides on the network segment 172.16.0.0/16. To allow the DHCP clients to obtain IP addresses from the DHCP server, configure a DHCP relay agent to forward DHCP messages between the clients and server and configure a route from the DHCP server to the network segment 10.100.0.0.

Figure 4-7 Configuring DHCP relay
NOTE:

Interfaces 1 through 2 in this example are GE 0/1/0, GE 0/2/0, respectively.



Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure a DHCP relay agent.
    1. Configure an IP address for GE 0/2/0.
    2. Specify the DHCP server address and enable DHCP relay on GE 0/1/0 and enable DHCP relay on GE 0/1/0.
  2. Configure the DHCP server.
    1. Configure a route from DHCP server that functions as the DHCP server to GE 0/1/0 on DHCP relay.
    2. Enable DHCP on DHCP server.
    3. Configure the clients attached to GE 0/1/0 to obtain IP addresses through the global address pool.
    4. Configure an address pool on DHCP server.

Data Preparation

To complete the configuration, you need the following data:

  • IP address of the interface to have DHCP relay enabled

  • IP address of the DHCP server

Procedure

  1. Configure a DHCP relay agent.

    # Configure an IP address for GE 0/2/0.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] interface GigabitEthernet 0/2/0
    [~DeviceA-GigabitEthernet0/2/0] ip address 172.16.1.1 255.255.0.0
    [*DeviceA-GigabitEthernet0/2/0] undo shutdown
    [*DeviceA-GigabitEthernet0/2/0] commit
    [~DeviceA-GigabitEthernet0/2/0] quit

    # Specify the DHCP server address and enable DHCP relay on GE 0/1/0.

    [~DeviceA] dhcp enable
    [~DeviceA] interface gigabitethernet 0/1/0
    [~DeviceA-GigabitEthernet0/1/0] ip address 10.100.1.1 255.255.0.0
    [*DeviceA-GigabitEthernet0/1/0] ip relay address 172.16.1.2
    [*DeviceA-GigabitEthernet0/1/0] ip relay giaddr 10.100.20.1
    [*DeviceA-GigabitEthernet0/1/0] dhcp select relay
    [*DeviceA-GigabitEthernet0/1/0] undo shutdown
    [*DeviceA-GigabitEthernet0/1/0] commit
    [~DeviceA-GigabitEthernet0/1/0] quit

  2. Configure the DHCP server.

    The configuration details are not provided. The DHCP server must meet the following conditions:

    • An address pool is configured and the range of IP addresses that can be assigned is specified.
    • A domain name is configured, and the IP addresses of the DNS server, NetBIOS server, and egress gateway are configured.
    • The address pool lease is configured to improve IP address utilization.

  3. Verify the configuration.

    Run the display dhcp relay address command on the DHCP relay device to view configurations of the relay IP address.

    [~DeviceA] display dhcp relay address all
       ** GigabitEthernet0/1/0 DHCP Relay Address  **
              Dhcp Option          Relay Agent IP       Server IP
              *                    10.100.20.1          172.16.1.2

Configuration Files

  • DHCP relay configuration file

    #
    sysname DeviceA
    #
    dhcp enable
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 10.100.1.1 255.255.0.0
     dhcp select relay
     ip relay address 172.16.1.2
     ip relay giaddr 10.100.20.1
    #
    interface GigabitEthernet 0/2/0
     undo shutdown
     ip address 172.16.1.1 255.255.0.0
    #
    return 
Translation
Download
Updated: 2019-01-02

Document ID: EDOC1100055376

Views: 21910

Downloads: 48

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next