0

Is it possible that a system running a DHCP server can become a DHCP client if connected to a network which already has a DHCP server running?

We have a situation where we want to run isc-dhcp-server on an Ubuntu box, there will be several IP cameras connecting to this box and we want the cameras to be assigned IP addresses.

However we then want to be able to take this Ubuntu box out of that network and connect it another network already running a DHCP server and then it should receive a IP address from the other DHCP server.

Is there any way to achieve this and if so how might it be achieved.

  • Do you have two NIC's or can you add another NIC? Can't you dedicate one to each of these needs? – chicks Jun 07 '17 at 20:42
  • Ideally would need to dedicate a single NIC to both needs as it is the only Gigabit Ethernet interface available. There is also a 100Mbit interface as well as Wi-Fi, but we would prefer to use the high speed interface for both functions. – Richard Rigby Jun 08 '17 at 03:01

1 Answers1

0

You could add a startup check to see if the interface has DHCP assigned lease when bind starts. You'd also want to probe for an external DHCP server at the same time.

Checking for DHCP from shell

janos97
  • 36
  • 5
  • Yeah, thanks. It's starting to look like the only way to go will be to look for another DHCP server when the system starts and if not found then only start the DHCP server. – Richard Rigby Jun 09 '17 at 01:21