huawei:switch:s5735:configuration_guide_ip_service
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
huawei:switch:s5735:configuration_guide_ip_service [2021/08/27 14:11] – aperez | huawei:switch:s5735:configuration_guide_ip_service [2021/08/27 14:22] (current) – aperez | ||
---|---|---|---|
Line 342: | Line 342: | ||
c. Return to the system view. | c. Return to the system view. | ||
+ | |||
+ | quit | ||
+ | | ||
+ | **(Optional) Configuring a Distributed VXLAN Gateway as a DHCP Relay Agent** | ||
+ | |||
+ | **Context** | ||
+ | In a distributed VXLAN gateway scenario, the DHCP relay function is configured on VBDIF interfaces of distributed gateways. The value of the GIADDR field carried in a request packet sent from a DHCP relay agent to the DHCP server is the IP address of the VBDIF interface. When returning a response packet, the DHCP server figures out the network segment on which the DHCP client resides based on information of this field. However, the response packet from the DHCP server may be forwarded to other distributed gateways (rather than the device that sends the request packet) because IP addresses of VBDIF interfaces on distributed gateways are the same. As a result, the user cannot obtain an IP address. | ||
+ | |||
+ | Two methods are available to resolve this issue: | ||
+ | |||
+ | **Method 1: Configure the re-routing function on the distributed gateway.** | ||
+ | |||
+ | After this function is enabled, the IP address of the VBDIF interface is still used for communication between the DHCP relay agent and DHCP server. When the DHCP relay agent sends a Request message, the VTEP IP address of the local device is carried in the Option 82 field to function as the return IP address; when the DHCP server sends a response message, this information is also carried in the message. When processing a response message from the DHCP server, the DHCP relay agent figures out whether the response message corresponds to the Request message sent from the distributed gateway based on the return IP address carried in the message. If so, the DHCP relay agent forwards the message to the client. If not, the DHCP relay agent performs re-routing based on the return IP address to forward the response message to the corresponding distributed gateway through a VXLAN tunnel. | ||
+ | |||
+ | **Method 2: Configure the source interface of DHCP relayed messages and configure the function of inserting the Link-selection suboption of the Option 82 field into messages.** | ||
+ | |||
+ | After the preceding configurations, | ||
+ | |||
+ | When the DHCP relay agent forwards a DHCP Request message, the Link-selection suboption of the Option 82 field is inserted in the message. The value of this suboption is the interface IP address of the DHCP relay agent. The DHCP server selects an address pool for the client based on the suboption to ensure that an IP address on the correct network segment can be allocated to the client. | ||
+ | |||
+ | The following table lists comparisons between the two methods. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Note: Only the S5720HI, S5730HI, S6720HI, S6720S-EI, and S6720EI support this function. | ||
+ | | ||
+ | **Prerequisites for Method 1** | ||
+ | |||
+ | Because the return IP address is carried in the Option82 field, you need to perform the following operations: | ||
+ | 1. Run the d**hcp option82 vendor-specific format vendor-sub-option 2 ip-address** // | ||
+ | 2. Run the dhcp option82 encapsulation vendor-specific-id command in the BD view to insert the sub-option customized by the vendor into the Option82 field. | ||
+ | 3. Run the dhcp option82 { insert | rebuild } enable command in the BD view to configure the Option82 field to be inserted into DHCP packets. | ||
+ | 4. Run the dhcp relay information enable command in the VBDIF interface view to enable the Option 82 function for the DHCP relay agent. | ||
+ | |||
+ | |||
+ | **Procedure** | ||
+ | |||
+ | 1. Enter the system view. | ||
+ | system-view | ||
+ | 2. Create a VBDIF interface and enter the VBDIF interface view. | ||
+ | interface vbdif bd-id | ||
+ | | ||
+ | Note: The number of a VBDIF interface must match an existing BD ID. | ||
+ | | ||
+ | 3. Select one configuration method. | ||
+ | + Method 1: When the DHCP server is not capable of parsing the Link-selection suboption: | ||
+ | |||
+ | Configure the re-routing function for the DHCP relay agent on a distributed gateway. | ||
+ | |||
+ | dhcp relay anycast gateway re-route enable | ||
+ | | ||
+ | By default, the re-routing function for the DHCP relay agent on a distributed gateway is disabled. | ||
+ | |||
+ | + Method 2: When the DHCP server is capable of parsing the Link-selection suboption: | ||
+ | |||
+ | a. Configure the source interface of DHCP relayed messages and enters the primary IP address of the interface into the giaddr field. | ||
+ | |||
+ | dhcp relay giaddr source-interface interface-type interface-number | ||
+ | |||
+ | By default, the source interface of DHCP relayed messages is not configured and the IP address of the DHCP relay agent is entered into the giaddr field. | ||
+ | |||
+ | Note: Ensure that the IP address of the source interface and the DHCP server can communicate with each other. | ||
+ | |||
+ | b. Configure the function of inserting the Link-selection suboption of the Option 82 field into DHCP messages. | ||
+ | |||
+ | dhcp relay information link-selection insert enable | ||
+ | |||
+ | |||
+ | By default, the Link-selection suboption of the Option 82 field is not inserted into DHCP messages. | ||
+ | |||
+ | Verifying the Configuration | ||
+ | |||
+ | Run the **display dhcp relay** command to check configuration information about the DHCP relay agent. | ||
+ | | ||
+ | **(Optional) Configuring the Processing Methods of DHCP Ack and DHCP Request Messages** | ||
+ | |||
+ | Context | ||
+ | |||
+ | If multiple DHCP servers are deployed on the network, the design of a server does not comply with standards, and a DHCP client requests for an IP address, the server does not provide an IP address for the DHCP client but still replies with a DHCP Ack message. Alternatively, | ||
+ | |||
+ | **Procedure** | ||
+ | 1. Enter the system view | ||
+ | |||
+ | system-view | ||
+ | 2. Configure the DHCP relay agent not to check the DHCP server identifier (Option 54) in a DHCP Request message to be forwarded. | ||
+ | |||
+ | undo dhcp relay request server-match enable | ||
+ | |||
+ | |||
+ | By default, a DHCP relay agent checks the DHCP server identifier (Option 54) in a DHCP Request message to be forwarded. | ||
+ | |||
+ | 3. Configure the DHCP relay agent to forward all DHCP Ack messages. | ||
+ | dhcp relay reply forward all enable | ||
+ | | ||
+ | By default, a DHCP relay agent forwards only the first received DHCP Ack message. | ||
+ | |||
+ | **Verifying the DHCP Relay Agent Configuration** | ||
+ | |||
+ | **Procedure** | ||
+ | |||
+ | - Run the **display dhcp relay { all | interface interface-type interface-number }** command to view information about the DHCP server or DHCP server group on the interface functioning as a DHCP relay agent. | ||
+ | |||
+ | - Run the **display dhcp server group [ group-name ]** command to view the configuration of the DHCP server group. | ||
huawei/switch/s5735/configuration_guide_ip_service.1630091494.txt.gz · Last modified: 2021/08/27 14:11 by aperez