I have a vlan interface with secondary ip address configured.
ip address 10.10.1.254 255.255.255.0
ip address 10.10.3.254 255.255.255.0 secondary
ip helper-address 10.10.4.1
I have confgured my DHCP for both 10.10.1.0/24 & 10.10.3.0/24 network.
How the IP address will be distributed among with vlan 10 users. DHCP pool will allocate first from 10.10.1.0/24 network and then from 10.10.3.0/24?
Or it will allocate from the primary address of the interface?
How can I handle this situation?
This depends on your DHCP server. I haven't read the RFC recently, but I do not believe that it is defined. I have run two different DHCP servers and have always had to tell the server if a physical interface had multiple logical networks (shared-network) associated with it, but at least from memory, have only had a pool(s) associated with one of the logical networks. In some cases, I do have multiple pools associated with an interface (though, all on the same logical network) and my server tends to rotate through all the addresses from least to greatest before wrapping around again. I would assume that if I had multiple pools on different logical networks that it would do the same thing.
Take a look at the dhcp smart-relay feature - it might just do what you want.
"[...]you only need the ip dhcp smart-relay command configured if you have secondary addresses on that interface and you want the router to step through each IP network when forwarding DHCP requests. Without the smart relay agent configured, all requests are forwarded using the primary IP address on the interface."