One would put the Slave IP in a list through the masters webinterface, so that the master knows what slave exist.
And, presumably, what group it belongs to.
The slave (client, really) then would send its IP to the server, so the server can decide what group it is in, and, therefore, what to send back to it.