Você não faria isso por meio do arquivo /etc/network/interfaces
compartilhado.
Para isso, use dnsmasq
DHCP
server. De man dnsmasq
:
The dnsmasq DHCP server supports static address assignments and multiple networks. It automatically sends a sensible default set of DHCP options, and can be configured to send any desired
set of DHCP options, including vendor-encapsulated options. It includes a secure, read-only, TFTP server to allow net/PXE boot of DHCP hosts and also supports BOOTP. The PXE support is
full featured, and includes a proxy mode which supplies PXE information to clients whilst DHCP address allocation is done by another server.
The dnsmasq DHCPv6 server provides the same set of features as the DHCPv4 server, and in addition, it includes router advertisements and a neat feature which allows nameing for clients
which use DHCPv4 and stateless autoconfiguration only for IPv6 configuration. There is support for doing address allocation (both DHCPv6 and RA) from subnets which are dynamically dele‐
gated via DHCPv6 prefix delegation.
Por meio da leitura cuidadosa de man dnsmasq
, você verá como atribuir endereços IP específicos a endereços de MAC
de 48 bits específicos (o campo HWaddr
de ifconfig
output).