Huawei switch series is one of Huawei’s most important network equipment product series, of which S5700 series is also an important part of the switch series. During the operating, we noticed DHCP packets are not forwarded by the S5700 switch at L2? What’s the issue? How to configuration of DHCP server? How to solve the issue? This article will tell us how to do it.
Issue Description
As shown in the below figure, a DHCP server (Switch B) is deployed on an enterprise network to dynamically allocate IP addresses to terminals from VLAN 200 and 300. The intermediate switch, Switch A has two VLANIF in vlan 200,300 , where the vlanif 200 interface is configured as a DHCP client while the vlanif 300 is configured with a static IP.
Problem:
The DHCP client belonging to VLAN 200 can obtain an IP address from the server but the DHCP client belonging to VLAN 300 is not able to even though the devices are correctly configured to allow communication in VLAN 300 between the client and server.
Configuration of DHCP server:
vlan 200 300 # interface Vlanif200 ip address x.0.0.1 255.255.255.0 dhcp select interface # interface Vlanif300 ip address x.1.1.1 255.255.255.0 dhcp select interface # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 200 300 #
Configuration of switch A((S5710 V200R005C00SPC300)
vlan batch 200 300 # interface Vlanif200 ip address dhcp-alloc # interface Vlanif300 ip address x.1.1.2 255.255.255.0 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 200 300 # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 200 300 #
Handling Process
-Verified that the MAC-address of the client that cannot obtain an IP address is learnt on switch A
[R6_U24_S5710_Stack]display mac-address
------------------------------------------------------------------------------- MAC Address VLAN/VSI Learned-From Type ------------------------------------------------------------------------------- X-8c43-2a7f 200/- GE0/0/2 dynamic X-443c-0c2c 300/- GE0/0/2 dynamic
-Collected a packet on the switch by using the port mirroring command to verify if the DHCP request sent by the client is received and sent by it.
According to the packet we can observe that the switch receives the DHCP request from the client but does not forward them further even though between the client and the server we have L2 connectivity. Given the packet, we can conclude that the packets are dropped by the switch.
Solution
To solve the problem, we enabled the DHCP function on the switch by running the “dhcp enable “command in order to have the received DHCP packets processed and forwarded by the CPU of the switch.
After further investigation we noticed, that the problem in question appears in the vlans that do not have the dhcp function enabled in the situation where the switch is configured as a DHCP client in an interface with the “ip address dhcp alloc-ip” command without having the DHCP function globally enabled globally.
Have you ever encountered such a problem? Through this article, we can confirm the problem firstly, and then solve the problem according to the above steps. If you have any questions, please contact: CSD@telecomate.com.
Leave a comment