DHCP relay on NX-OS

Hey everyone,

I am trying to get an understanding of some behaviour I am seeing on my N7Ks regarding DHCP relay.

I have two identically configured Vlans interfaces both configured with the same two dhcp relay servers in the same order. The only difference between the two vlans is that one is HSRP active on the A side switch and the other is active on B side switch. All clients in Vlan136 (active on B side) are getting DHCP leases from the first of the two dhcp relay servers configured while all clients on Vlan 137 (active on A side) are getting DHCP leases from the second of the two dhcp relay servers.

Can anyone shed some light on why this is occurring? I would expect that all clients on both vlans would get leases from the first relay server configured unless that device was unavailable.

DHCP relay on NX-OS

Tim,

Yes thats what exactly is happening. With respect to you seconds query, the DHCP requests will be forwarded the VLAN SVI as its Gia address in DHCP request request.The DHCP server uses the GIADDR to determine the subnet on which the relay agent received the broadcast, and allocates an IP address on that subnet.

Your clients from the respective VLANS should receive the IP address from the DHCP server which is reachable and gets the request first.Which server a client selects is strictly up to the client IP stack implementation. Also, the DHCP RFCs do not dictate the behavior of the server, so how it reserves, manages, and issues the IP addresses is strictly up to each implementation. Should two servers choose to share IP addresses, it is up to those servers to keep themselves synchronized.

This is exactly the behaviour you are seeing and you can not really change much unless your both the servers are synchronized and you are running a heartbeat message between them for state and Lease synchronization.

This is actually a pretty cool feature, i didn't even know it existed until I was looking for a solution to advertise a subnet (prefix in BGP talk), only if a certain condition existed. This is exactly what conditional advertisements does
"Th...
view more

Attached policy provides CLI access to the Cisco 4G router over text messaging. Two files are in the attached .tar file:
1. commandoversms.tcl
2. PDF with instructions on how to load and use the .tcl file.