Welcome to LQ!
Your question is a little hard to read. What is your network set up? Do you have one computer working as a gateway/dhcp server? Or do you have multiple gateways and want your dhcp server to figure out which one to use? I used dnsmasq for dhcpd since it is easily configurable and has an enormous amount of options for configuration. I can't give you specific instructions since I'm not quite sure what you are asking, but if you install dnsmasq, the /etc/dnsmasq.conf file is filled with comments/examples and should tell you what you need to know.