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

Configuration Guide - IP Service

CloudEngine 12800 and 12800E V200R005C00

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DNS, IP performance optimization, IPv6, DHCPv6, and IPv6 DNS.
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).
Configuring DHCP Relay

Configuring DHCP Relay

This section describes how to configure Dynamic Host Configuration Protocol (DHCP) relay.

Context

If DHCP clients and a DHCP server are located on different subnets, configure DHCP relay on the DHCP relay agent's interface. After the configuration is complete, the DHCP relay agent forwards DHCP request packets from the DHCP clients to the DHCP server. When the DHCP server receives these packets, it assigns IP addresses to the DHCP clients.

When forwarding a request packet from a DHCP client, a DHCP relay-enabled gateway uses the IP address of the outbound interface as the source IP address of the request packet. If the response packet from the DHCP server cannot be received on the DHCP relay-enabled gateway that initiates the request or a different source IP address needs to be specified for the packet to be forwarded, you can configure an interface whose IP address will be used as the source IP address of DHCP request packets.

In Layer 3 distributed VXLAN gateway scenarios, DHCP users obtain IP addresses from DHCP servers in different subnets through DHCP relay-enabled gateways. Users in a subnet use the same gateway address. If the gateway address is carried as the destination IP address in a response packet from the DHCP server, the packet may not be received on the gateway of the user. As a result, the user fails to go online. To resolve this problem, enable a DHCP relay-enabled gateway to insert the Vendor-Specific suboption (suboption 9) of Option 82 into a DHCP request packet and configure a format for the suboption 9, so that the IP address that uniquely identifies the gateway location will be encapsulated into a DHCP request packet to be sent to the DHCP server. The DHCP server that supports the Option 82 attribute reserves this suboption in the response packet. If the response packet is sent to a wrong gateway, the DHCP relay-enabled gateway forwards the packet to the correct gateway based on the IP address carried in the Option 82 suboption 9.

Procedure

  • Configure DHCP relay in the intra-VPN scenario.
    1. Run system-view

      The system view is displayed.

    2. Run dhcp enable

      DHCP is enabled globally.

      By default, DHCP is disabled.

    3. Run interface interface-type interface-number

      The interface view is displayed.

    4. Run ip address ip-address { mask | mask-length }

      The interface's IP address is configured.

      By default, no IP address is configured for interfaces.

    5. (Optional) Run ip address ip-address { mask | mask-length } sub

      A secondary IP address is configured for the interface.

      If the DHCP relay agent fails to use the primary IP address to apply for IP addresses for DHCP clients, run this command to configure a secondary IP address as a gateway address to apply for IP addresses for the DHCP clients.

      By default, no IP address is configured for interfaces.

    6. Run dhcp select relay

      DHCP relay is enabled.

      By default, DHCP relay is disabled.

    7. Run dhcp relay binding server ip ip-address

      A DHCP server address is configured on the VLANIF interface.

      By default, no DHCP server address is configured on an interface.

    8. (Optional) Run dhcp relay source-interface interface-type interface-number

      An interface whose IP address is specified as the source IP address of a DHCP request packet is configured.

      By default, the interface whose IP address is specified as the source IP address of a DHCP request packet is not configured.

    9. Run quit

      Exit from the interface view.

    10. (Optional) Run interface vbdif bd-id

      A VBDIF interface is created, and the VBDIF interface view is displayed.

      NOTE:

      You must run the preceding commands in VXLAN distributed gateway scenarios.

    11. (Optional) Run the following commands:

      To enable a DHCP relay-enabled gateway to insert the Vendor-Specific suboption (suboption 9) of Option 82 into a DHCP packet, run the dhcp option82 vendor-specific insert enable command.

      By default, the Vendor-Specific suboption (suboption 9) of Option 82 is not inserted into a DHCP packet.

      To configure a format for the Option 82 suboption 9, run the dhcp option82 vendor-specific format vendor-sub-option sub-option-num source-ip-address ip-address command.

      By default, no format is configured for the Option 82 suboption 9.

      When this command is run to deploy gateways functioning as a DHCP relay, set the sub-option-num parameter to the same value for different gateways and set the ip-address parameter to the VTEP address of a specified gateway.

      NOTE:

      You must run the preceding commands in VXLAN distributed gateway scenarios.

    12. Run commit

      The configuration is committed.

  • Configure DHCP relay in the inter-VPN scenario.
    1. Run system-view

      The system view is displayed.

    2. Run dhcp enalbe

      DHCP is enabled globally.

      By default, DHCP is disabled.

    3. Run interface interface-type interface-number

      The interface view is displayed.

    4. Run ip address ip-address { mask | mask-length }

      The interface's IP address is configured.

      By default, no IP address is configured for interfaces.

    5. (Optional) Run ip address ip-address { mask | mask-length } sub

      A secondary IP address is configured for the interface.

      If the DHCP relay agent fails to use the primary IP address to apply for IP addresses for DHCP clients, run this command to configure a secondary IP address as a gateway address to apply for IP addresses for the DHCP clients.

      By default, no IP address is configured for interfaces.

    6. Run dhcp select relay

      DHCP relay is enabled.

      By default, DHCP relay is disabled.

    7. Run dhcp relay binding server ip ip-address { vpn-instance vpn-instance-name | public-net }

      An IP address is configured for the DHCP server.

      By default, no DHCP server address is configured on an interface.

    8. (Optional) Run dhcp relay source-interface interface-type interface-number

      An interface whose IP address is specified as the source IP address of a DHCP request packet is configured.

      By default, the interface whose IP address is specified as the source IP address of a DHCP request packet is not configured.

    9. Run dhcp option82 { vss-control | link-selection | server-id-override } insert enable

      The function of inserting the Option 82 field into packets is enabled on the DHCP relay interface.

      By default, the function to insert the Option 82 field is not enabled on a DHCP relay-enabled.

      You must run this command in inter-VPN address assignment scenarios where a DHCP client and server belong to different VPNs to enable the DHCP relay agent to insert suboptions (VSS-Control, Link-Selection, or Server-ID-Override) of the Option 82 into a DHCP request message. This ensures that the client can obtain an IP address.

    10. Run quit

      Exit from the interface view.

    11. (Optional) Run interface vbdif bd-id

      A VBDIF interface is created, and the VBDIF interface view is displayed.

      NOTE:

      You must run the preceding commands in VXLAN distributed gateway scenarios.

    12. (Optional) Run the following commands:

      To enable a DHCP relay-enabled gateway to insert the Vendor-Specific suboption (suboption 9) of Option 82 into a DHCP packet, run the dhcp option82 vendor-specific insert enable command.

      By default, the Vendor-Specific suboption (suboption 9) of Option 82 is not inserted into a DHCP packet.

      To configure a format for the Option 82 suboption 9, run the dhcp option82 vendor-specific format vendor-sub-option sub-option-num source-ip-address ip-address command.

      By default, no format is configured for the Option 82 suboption 9.

      When this command is run to deploy gateways functioning as a DHCP relay, set the sub-option-num parameter to the same value for different gateways and set the ip-address parameter to the VTEP address of a specified gateway.

      NOTE:

      You must run the preceding commands in VXLAN distributed gateway scenarios.

    13. (Optional) Run dhcp relay giaddr outgoing-interface-address

      The relay agent address is configured as the IP address of the outbound interface.

      By default, a DHCP relay interface uses its primary IP address as the relay agent address.

      • In inter-VPN scenarios, if the DHCP server supports the Link-Selection suboption of Option 82, you can run this command to allow return routes of response packets to be found based on the GiAddr address.
      • In inter-VPN scenarios, if the DHCP server does not support the Link-Selection suboption, the problem of unreachable return routes can be solved using a loopback interface. Specifically, you can configure a loopback interface on the DHCP relay agent, configure the loopback interface's IP address as the GiAddr address, and bind it to the VPN where the DHCP server resides.

    14. Run commit

      The configuration is committed.

Follow-up Procedure

  • (Optional) Run dhcp relay gateway ip-address

    The relay agent address is configured.

    By default, no gateway address is configured on a DHCP relay interface.

  • (Optional) Run dhcp relay gateway-switch enable

    The function of switching the relay agent address is enabled.

    By default, DHCP relay gateway switching is disabled.

    If the DHCP relay agent fails to use the primary IP address to apply for IP addresses for DHCP clients, this function allows the DHCP relay agent to use the secondary IP address as a gateway address to apply for IP addresses for the DHCP clients.

Translation
Download
Updated: 2019-04-18

Document ID: EDOC1100039535

Views: 42713

Downloads: 25

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