This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
/
Aula-25-InstalandoDHCP
53 lines (43 loc) · 1.58 KB
/
Aula-25-InstalandoDHCP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Comandos utilizados nesse vídeo: Aula 25 – Configuração do Serviço de DHCP Server
#Verificando o status do Servidor DHCPD
sudo service isc-dhcp-server status
#Fazendo o backup do arquivo de configuração do DHCP Server dhcpd.conf
sudo cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bkp
#Editando o arquivo de configuração do DHCP Server dhcpd.conf
sudo vim /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ddns-updates on;
option domain-name "pti.intra";
option domain-name-servers 192.168.1.10;
option ntp-servers 192.168.1.10;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
option domain-name "pti.intra";
option domain-name-servers 192.168.1.10 8.8.8.8 8.8.4.4;
option netbios-name-servers 192.168.1.10;
option netbios-dd-server 192.168.1.10;
option netbios-node-type 8;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option ntp-servers 192.168.1.10
default-lease-time 600;
max-lease-time 7200;
allow unknown-clients; <-- no vídeo está faltando o "s" no final do "clients"
}
#Sair e salvar no editor VIM
ESC
Shift : x
#Verificando as configurações do arquivo dhcpd.conf
sudo dhcpd -cf /etc/dhcp/dhcpd.conf
#Parando e iniciando o serviço do DHCP Server
sudo service isc-dhcp-server stop
sudo service isc-dhcp-server start
sudo service isc-dhcp-server status
#Verificando a porta de conexão do DHCP Server
sudo netstart -tupenl | grep -i 67
#Verificando o arquivo de Lease do DHCP Server
sudo cat /var/lib/dhcp/dhcpd.lease