Is it possible to configure network interface via the DHCP server hosted on the same machine?
Currently, I have next records in my /etc/network/interfaces:
auto enp0s8 iface enp0s8 inet dhcp
Also, dnsmasq listening to enp0s8.
But I can't achieve the desired effect that way. (OS: Ubuntu server 16)
I'm configuring a virtual network for educational purposes. So, it is just an interest: how to touch as less files as possible while configuration? And is it possible to make dnsmasq to handle that case?
I have a central node with the dnsmasq and some other nodes in the same network. Central node has two interfaces:
- enp03 which faces the host network. It configured by host network DHCP and has a dynamic IP address.
- enp08 which faces the virtual network. dnsmasq is listening this interfase.
Now, if have the next central node configuration:
auto lo iface lo inet loopback auto enp03 iface enp03 inet auto auto enp08 iface enp08 inet static address 10.0.5.15
The problem starts if I make a mistake and assign some static IP for enp0s8 out of the dhcp-range. So now I have to maintain the consistency between /etc/network/interfaces and /etc/dnsmasq.conf