Multiple dhcp relay process
dhcp1 at thehobsons.co.uk
Thu May 6 17:17:08 UTC 2021
Renuka Devi <renukaraaj at gmail.com> wrote:
> Do we have to enable any flags or modify ISC dhcp relay code to make it working ?
Asa far as I know (I don't use it myself, but it shares code with the client and server), all you have to do is invoke it with arguments that mean each instance uses different config, PID, etc files. I suspect most distro startup files don't allow for this, so you'll be needing to roll your own.
There is one area I don't know about. I thought that the relay agent might have to listen on the interface through which it talks to the server - but I'm not sure about that. If it does, then the upstream interfaces need to be different.
But it's also possible that it uses ordinary unicast packets passed through the hosts IP stack to talk to the server(s).
I raise this as I have a vague memory of seeing issues with this discussed here, but it's only vague. Hopefully someone with a better grasp can shed some light.
So as I read the man page, and if it uses the host IP stack, then you'd invoke the different instances like this :
dhcrelay -4 [some options] -i eth0 -i eth1 192.168.1.123
dhcrelay -4 [other options] -i eth2 192.168.57.66
I see it doesn't have a config file or any storage (leases file), so those problems are gone. If your process management system uses PID files, then you'll need to make sure that they are different.
More information about the dhcp-users