I am doing a school project. There are 3 sites wich are connected trough vpn, i have my server infrastructure at the head office. Which would be the best option; have a seperate dhcp server at each location or is it possible to use dhcp relay via vpn so that i do not have to place any servers at the other locations? thanks
It would depend, to me, on whether there are any servers or other shared resources on-site in each remote office.
If there aren't servers or shared resources in each remote office that could be used independently of a VPN failure then there isn't much point in putting a DHCP server in the remote office. If the VPN has failed then not getting DHCP leases is probably the least of your problems.
If there is some capability for each office to function independently because of on-site servers or other shared resources then I'd strongly consider putting a DHCP server in each remote office. That gives the remote office some ability to function in the face of VPN failure.
Having a single DHCP server also implies a single point of failure but, also, a single point of administration. You'll have to weigh the pros-and-cons of that yourself. For ISC DHCPd or Windows DHCP servers I don't particularly care whether I'm administering one or several. Your feelings may vary.
As long as your VPN hardware (or some other device on each remote office network) supports DHCP relaying you'll have no trouble using a single central DHCP server from a technical feasibility perspective. The address assigned to the network interface of the device receiving / relaying the DHCP requests gets placed into the relayed DHCP request and will allow the DHCP server to serve the request out of the proper scope / subnet.
Depending on the capacity of the device and number of clients at the site, this might be worth taking advantage of.
This is particularly useful where there may be site specific configuration you want to push out via DHCP. For example, you might want to include a public DNS server in the list of DNS servers assigned, so in case the VPN fails, but the Internet is up, people at the remote site can access public resources even if your central DNS is unreachable.
It is also a lot easier to visualise/explain this way.