use dhcp function