Hi, I am having a problem with DHCP. I have two 3850 switches connected through a trunk, the DHCP works across switches when I connect my PC to either one, the issue comes when I disconnect the PC from switch 1 and connect it to switch 2 or viceversa then the DHCP IP address assignment is not completed properly and the PC stays without an IP adress. After 5-10 minutes have passed is when the IP address is successfully reassigned to the PC. This scenario is causing issues with mobile clients which connect to an ap in a given Switch and then change to another AP connected to other Switch witch cant sucessfully get an IP adress assigned. I dont have DHCP snooping activated anywhere so this is not the issue because the problem occurs when I move fromm one switch to the other after being assigned an IP adress, I think that this maybe has to do with mac adress, security or something like that but cannot really tell because I´ve tried many options.
Thanks for your help,
are you using spanning-tree portfast under the switchports? or port security with aging time for inactive MAC addresses?
Please share both switch configuration.
This should't matter, but do you have Ip arp inspection enabled? As a precaution I would add " Ip arp inspection trust" and "ip dhcp snooping" trust on a port on each switch and see if the problem continues. This will rule out any inspection issue, also where is your dhcp server? and are you on the same vlan when you move to another switch?
The Dchp server is switch 1 and yes it is the same vlan when one moves from one switch to the other.
Is there any other devices on the same vlan when you move the device to the other switch? The reason that I ask is that the vlan will not come online until you have a device on that vlan. This might be the reason of why you have a delay in the device getting a dhcp address.
as Julio already mentioned, configure your access ports with the 'spanning-tree portfast' command, otherwise the DHCP broadcasts might not make it to the server in time. Also, if you have only one trunk link, use portfast on the trunk as well:
switchport access vlan 20
switchport mode trunk
spanning-tree portfast trunk