Nethserver 7 DHCP and PXE-Boot with a TFTP server on another server

tftp
v7

(Tamás Szalai) #1

NethServer Version: 7
Module: DHCP

Hello everyone!

I would like to set a different TFTP server in the DHCP than the one in the net server, but I can’t manage it.
The other TFTP server is located on a Synology NAS and is configured and started:

$ tftp 172.16.1.196
tftp> status
Connected to 172.16.1.196.
Mode: netascii Verbose: off Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp>

In the web interface I have entered the IP address in the settings of the DHCP server in the form at the location of the TFTP server:

I also executed the following commands on the net server:

$ config setprop dhcp tftp-status disabled
$ signal-event nethserver-dnsmasq-save

With dhcpdump I see that the right DHCP options are being sent:

TIME: 2018-02-09 08:38:05.088
IP: 172.16.4.1 (00:80:41:ae:fd:7e) > 172.16.1.167 (8:0:27:b0:f2:55)
OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 1bb64129
SECS: 14
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 172.16.1.167
SIADDR: 172.16.4.1
GIADDR: 0.0.0.0
CHADDR: 08:00:27:b0:f2:55:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 5 (DHCPACK)
OPTION: 54 ( 4) Server identifier 172.16.4.1
OPTION: 51 ( 4) IP address leasetime 600 (10m)
OPTION: 67 ( 11) Bootfile name pxelinux.0
OPTION: 58 ( 4) T1 300 (5m)
OPTION: 59 ( 4) T2 525 (8m45s)
OPTION: 1 ( 4) Subnet mask 255.255.240.0
OPTION: 28 ( 4) Broadcast address 172.16.15.255
OPTION: 15 ( 13) Domainname net.local
OPTION: 66 ( 13) TFTP server name 172.16.1.196
OPTION: 6 ( 4) DNS server 172.16.4.1
OPTION: 3 ( 4) Routers 172.16.4.1

I started a virtual machine and connected it to the network via a network bridge. The PXE boot menu from the Nethserver still appears there, and besides, the dnsmasq doesn’t seem to work so well anymore.

Can someone help me with my problem? Am I missing something? Is the configuration correct?

TIA


(Bogdan Costin) #2

Is the TFTP server set correctly ?
Is it reachable for the whole subnet ? 172.16.1.1 -> 172.16.4.255 ?
Check that you have DHCP in NS set correctly.
You can try:

  • Set the DHCP and TFTP server in the same subnet 255 and see from there.
  • See if you can get the whole TFTP files default and /pxelinux.0

(fpausp) #3

I think you need the next-server option for the NethServer DHCP-Server?
I have done this to be able to work with “FOG Project” Clone-Server.

# make folder for template
mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf/

# create template-file
nano /etc/e-smith/templates-custom/etc/dnsmasq.conf/99fog

# content for 99fog
dhcp-boot=undionly.kpxe,,192.168.xxx.xxx

# expand template
expand-template /etc/dnsmasq.conf

You have to use the IP of your Synology-NAS…


(Tamás Szalai) #4

Thank you Ctek and fausp for your reactions to my questions.
My goal is to create a Relax-and-Recover-environment and to enable the recovery via PXE.

@Ctek
In the beginning it worked somehow already, even with the TFTP server on the NAS. Only when I wanted to undo the configuration or since I undoed it, there are these problems.

@fausp
That sounds promising to me at first. I’ll give it a try. Thank you! This FOG looks interesting. I’ll take a closer look at it.


(Tamás Szalai) #5

Hello again,

I’m just seeing the following entry in the /etc/dnsmasq.conf configuration:

80tftp

enable-tftp
dhcp-boot=pxelinux.0
tftp-root=/var/lib/tftpboot
dhcp-option=66,“172.16.4.1”

and my additionally added option:

dhcp-boot=undionly.kpxe,172.16.1.196

Can this work at all? I think the entries below “80tftp” are already wrong, don’t you think?


(Filippo Carletti) #6

This is in my todo list since two years ago. I never found time to test it. Please, keep me updated, if possible.

Regarding the tftp server, I have it running on a system that is not my dhcp server, I think it’s the same setup of yours.
In my dhcp server (running nethserver) I have the following custom template:

$ cat /etc/e-smith/templates-custom/etc/dnsmasq.conf/81bootp
# filippo - enable bootp on nethservice
dhcp-boot=net:en0,pxelinux.0,nethservice.nethesis.it,192.168.x.y

(fpausp) #7

Please tell me what your idea is, I think a tool for cloning and deploying software woud be a nice feature ? FOG can do this, do you know it ? FOG