I have not implemented one on Dynamic C. But there are two that I use on my PC and I believe they have source for them. You might want to give them a look as follows:
If I am setting up an independent network (usually for testing) I use a cheap ADSL router for this as they all usually support working as a DHCP server. WiFi routers are also handy for this and most come with a 4 port switch built in as well which means a small 4 node network can be put together without needing a switch as well.
It is usually cheaper to use something like this than anything else and lots of people have old routers lying in a cupboard gathering dust.
Thanks for the responses, these are good ideas. Unfortunately my application requires more of an embedded solution that does not allow me to use a workstation with Linux or Windows.
Actually, after I posted the question I found what I was looking for in the Dynamic C examples. I had overlooked this earlier: