DHCP packets are not forwarded by the S5700 switch at L2

Publication Date:  2016-09-30 Views:  416 Downloads:  0
Issue Description

Scenario : 

As shown in the below figure, a DHCP server (SwitchB) is deployed on an enterprise network to dynamically allocate IP addresses to terminals from VLAN 200 and 300. The intermediate switch, SwitchA 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 200.0.0.1 255.255.255.0                                                                                                

 dhcp select interface    

#                                                                                                                                   

interface Vlanif300                                                                                                                

 ip address 113.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 113.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     

-------------------------------------------------------------------------------

643e-8c43-2a7f 200/-                             GE0/0/2           dynamic  

28d2-443c-0c2c 300/-                             GE0/0/2            dynamic  

 

-Collected a packet capture 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 capture 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 capture, 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.

 

END