$ sudo apt-get install dhcp3-server
Editando o arquivo dhcp.conf:
$ sudo vim /etc/dhcp/dhcp.conf
Exemplo de dhcp.conf para duas redes.
### CONFIGURACAO DHCP SERVER
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
### REDE 10.16.0.0 --> eth1
option subnet-mask 255.255.0.0;
option broadcast-address 10.16.0.255;
option routers 10.16.0.254;
option domain-name-servers 10.16.0.254;
option domain-name "mercurio.home.local";
subnet 10.16.0.0 netmask 255.255.0.0 {
range 10.16.0.10 10.16.0.250;
}
### REDE 10.17.0.0 --> eth2
option subnet-mask 255.255.0.0;
option broadcast-address 10.17.0.255;
option routers 10.17.0.254;
option domain-name-servers 10.17.0.254;
option domain-name "mercurio.home.local";
subnet 10.17.0.0 netmask 255.255.0.0 {
range 10.17.0.10 10.17.0.250;
}
### IP FIXO POR MAC ADDRESS
host marte {
hardware ethernet 00:00:00:00:00:00;
fixed-address 10.16.0.10;
}
### IP FIXO POR MAC ADDRESS
host plutao {
hardware ethernet 00:00:00:00:00:00;
fixed-address 10.17.0.10;
}
Agora é preciso configurar as interfaces de rede no Ubuntu Server:
No arquivo de configuração das interfaces que fica em /etc/network/interfaces deverá estar assim:
auto eth1
iface eth1 inet static
address 10.16.0.254
net 10.16.0.0
netmask 255.255.0.0
gateway 10.16.0.254
auto eth2
iface eth2 inet static
address 10.17.0.254
net 10.17.0.0
netmask 255.255.0.0
gateway 10.17.0.254



