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


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

Configuration Guide - IP Service
S1720, S2700, S5700, and S6720 V200R011C10

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DHCP policy VLAN, DNS, mDNS gateway, mDNS relay, UDP Helper, IP performance optimization, IPv6, DHCPv6, IPv6 DNS, IPv6 over IPv4 tunnel, and IPv4 over IPv6 tunnel.

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).
Enabling the DHCP Relay Function

Enabling the DHCP Relay Function


Enable the DHCP relay function on an interface so that the interface functions as a DHCP relay agent.


  1. Enter the system view.


  2. Enter the interface view or sub-interface view.

    interface interface-type interface-number [.subinterface-number ]

    Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support sub-interfaces.

  3. (Optional) On an Ethernet interface, run undo portswitch

    The interface is switched to Layer 3 mode.

    By default, an Ethernet interface works in Layer 2 mode.

    Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support switching between Layer 2 and Layer 3 modes.

  4. Configure an IP address for the interface or configure the interface to borrow an IP address from another interface.

    ip address ip-address { mask | mask-length } or ip address unnumbered interface interface-type interface-number

    • The DHCP relay function is configured on the user-side gateway interface typically. The IP address of the gateway interface must be on the same network segment as the address pool configured on the DHCP server; otherwise, DHCP clients cannot obtain IP addresses.

    • You can configure an interface to borrow an IP address from another interface in the scenario where clients and the DHCP relay agent are on different network segments, for example, CPEs function as DHCP clients and need to obtain public IP addresses, but no public IP address is configured on the DHCP relay agent to save IP address resources. To configure an interface to borrow an IP address from another interface, you must enable DHCP snooping on the interface or VLAN connecting to users. After DHCP snooping is enabled, the DHCP relay agent adds user network routes (UNRs) to clients when adding DHCP snooping binding entries and deletes UNRs to clients when deleting DHCP snooping binding entries. The number of clients cannot exceed the maximum number of DHCP snooping binding entries that can be learned. You can run the dhcp snooping max-user-number command to configure the maximum number of DHCP snooping binding entries that can be learned.

  5. Enable the DHCP relay function on the interface.

    dhcp select relay

    By default, the DHCP relay function is disabled on an interface.

    When enabling the DHCP relay function on a sub-interface, run the arp broadcast enable command on the sub-interface to enable ARP broadcast. By default, ARP broadcast is not enabled on a VLAN tag termination sub-interface.

Updated: 2020-02-26

Document ID: EDOC1000178170

Views: 273897

Downloads: 1029

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next