Estou construindo uma rede com um servidor DHCP (192.168.201.2), um servidor TFTP / NFS (192.168.201.3) e outras máquinas que vão inicializar a partir das duas, todas as máquinas rodam o Ubuntu 16.04.4. / p>
Quando eu ligo um, após o post, ele recebe com sucesso um IP do servidor DHCP, ele se conecta ao servidor TFTP, carrega vmlinuz e initrd.img mas quando ele tenta pegar o IP novamente ele dá essa mensagem:
IP-Config: eth0 hardware address xx:xx:xx:xx:xx:xx mtu 1500 DHCP
IP-Config: no response after 2 secs - giving up
IP-Config: eth0 hardware address xx:xx:xx:xx:xx:xx mtu 1500 DHCP
IP-Config: no response after 3 secs - giving up
e assim por diante.
Minha configuração
/etc/dhcp/dhcpd.conf
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
allow booting;
allow bootp;
subnet 192.168.201.0 netmask 255.255.255.0 {
default-lease-time 3600;
max-lease-time 86400;
option routers 192.168.201.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 208.67.222.222, 8.8.8.8;
option broadcast-address 192.168.201.255;
range 192.168.201.3 192.168.201.254;
filename = "gpxelinux.0";
next-server 192.168.201.3;
}
host tftp {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.201.3;
}
/tftpboot/pxelinux.cfg/default
MENU LABEL Ubuntu DISKLESS
KERNEL vmlinuz-4.4.0-127-generic
APPEND boot=nfs root=/dev/nfs nfsroot=192.168.201.3:/srv/nfsroot/installer/ default,ro initrd=initrd.img-4.4.0-127-generic ipv6.disable=1 ip=dhcp net.ifnames=0 biosdevname=0
/etc/initramfs-tools/initramfs.conf (no sistema no servidor NFS)
MODULES=netboot
BUSYBOX=auto
COMPCACHE_SIZE=""
COMPRESS=gzip
DEVICE=eth0
NFSROOT=auto
BOOT=nfs
Eu encontrei o este bug, mas ele foi corrigido no klibc - 2.0.4 -8ubuntu1.16.04.1, e essa é a versão que estou executando.
Eu tentei executar o dhcpdump no servidor DHCP e recebo isto:
TIME: 2018-06-05 11:22:59.057
IP: 0.0.0.0 (xxx) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 4dae1bf8
SECS: 4
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: xxx
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 55 ( 36) Parameter Request List 1 (Subnet mask)
2 (Time offset)
3 (Routers)
4 (Time server)
5 (Name server)
6 (DNS server)
11 (Resource location server)
12 (Host name)
13 (Boot file size)
15 (Domainname)
16 (Swap server)
17 (Root path)
18 (Extensions path)
22 (Maximum datagram reassembly size)
23 (Default IP TTL)
28 (Broadcast address)
40 (NIS domain)
41 (NIS servers)
42 (NTP servers)
43 (Vendor specific info)
50 (Request IP address)
51 (IP address leasetime)
54 (Server identifier)
58 (T1)
59 (T2)
60 (Vendor class identifier)
66 (TFTP server name)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
YIADDR: 0.0.0.0 significa que o servidor está recebendo a solicitação, mas não está respondendo, correto? Mas por quê?
Outras coisas que eu tentei estão mudando ip = dhcp para ip = bootp e ip =: 192.168.201.2 :::: eth0: dhcp mas nada muda.
Se eu definir um IP estático manualmente com:
ip=192.168.201.55:192.168.201.2:192.168.201.1:255.255.255.0:ubuntu:eth0:static
tudo funciona, mas a rede vai ter muitos clientes, eu preciso automatizar tudo.
Eu não consigo descobrir o que estou fazendo de errado.
Editar:
O servidor DHCP está respondendo:
TIME: 2018-06-05 11:23:24.857
IP: 192.168.201.2 (xxx) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 8d449854
SECS: 0
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 192.168.201.11
SIADDR: 192.168.201.3
GIADDR: 0.0.0.0
CHADDR: xxx
SNAME: .
FNAME: gpxelinux.0.
OPTION: 53 ( 1) DHCP message type 2 (DHCPOFFER)
OPTION: 54 ( 4) Server identifier 192.168.201.2
OPTION: 51 ( 4) IP address leasetime 3164 (52m44s)
OPTION: 1 ( 4) Subnet mask 255.255.255.0
OPTION: 3 ( 4) Routers 192.168.201.1
OPTION: 6 ( 8) DNS server 208.67.222.222,8.8.8.8
OPTION: 15 ( 11) Domainname example.org
OPTION: 28 ( 4) Broadcast address 192.168.201.255
e tudo parece certo para mim, mas então por que o cliente não está recebendo isso?