Some people have previously raised questions about DHCP relay configuration of Huawei switches. I conducted a simple test to share the test results with you.
Test the topology:
Sys # Go To The System View
Sysname dhcptest # rename the device
Dhcp enable # enable DHCP
Vlan 2 # create vlan 2
Port GigabitEthernet 0/0/1 to 0/0/10 # Add ports in batches
Quit # exit the interface View
Vlan 5 # create vlan 5
Port GigabitEthernet 0/0/11 to 0/0/20 # Add ports in batches
Quit # exit interface View
Interface vlanif 2 # Go To The VLANIF interface View
Ip address 192.168.1.1 24 # Add the IP address of the VLANIF Interface
Dhcp select relay # allocate IP addresses through relay
Quit # exit interface View
Interface vlanif 5 # Go To The VLANIF interface View
Ip address 192.168.5.1 24 # configure the ip address of the VLANIF Interface
Ip relay address 192.168.1.5 # Add the IP relay address of the VLANIF Interface
Dhcp select relay # allocate IP addresses through relay
Quit # exit the interface View
System-view # Go To System view
Ip relay address 192.168.1.5 vlan 2 # configure the DHCP server address and vlan
--- End
Check Configuration results
View statistics of DHCP relay
Display dhcp relay statistics
View the DHCP relay Address Configuration of the interface
Display dhcp relay address vlan-id
After correct configuration, insert the test notebook into the corresponding vlan to obtain the correct CIDR block address.
This article is from the "Kang Jianhua" blog