Page 1 of 1

DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue May 26, 2015 2:54 pm
by dancms
When specifying dhcp-option 67 (bootfile-name), the bootfile-name packet header in the DHCP offer sent from the mikrotik is not populated:

ip dhcp-server lease print detail
;;; Example Lease
address=10.0.100.2 mac-address=xx:xx:xx:xx:xx:xx lease-time=5m dhcp-option="bootfile"

ip dhcp-server option print detail
;;;Example Option
name="bootfile" code=67 value="'filename.ext'" raw-value="66696c656e616d652e657874"

Results in the following when client does not specifically request option 67, bootfile-name is not populated and option 67 is not present:

Bootstrap Protocol (Offer)
Message type: Boot Reply (2)
Hardware type: Ethernet (0x01)
Hardware address length: 6
Hops: 0
Transaction ID: 0x7e1ed939
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 10.0.100.2 (10.0.100.2)
Next server IP address: 10.0.100.1 (10.0.100.1)
Relay agent IP address: 10.0.100.1 (10.0.100.1)
Client MAC address: xxxx (xx:xx:xx:xx:xx:xx)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (53) DHCP Message Type (Offer)
Option: (54) DHCP Server Identifier
Option: (51) IP Address Lease Time
Option: (1) Subnet Mask
Option: (3) Router
Option: (6) Domain Name Server
Option: (255) End

If the client specifically requests option 67, mikrotik will return the following, again bootfile-name is not populated but option 67 is present-

Boot file name not given
Magic cookie: DHCP
Option: (53) DHCP Message Type (Offer)
Option: (54) DHCP Server Identifier
Option: (51) IP Address Lease Time
Option: (1) Subnet Mask
Option: (3) Router
Option: (6) Domain Name Server
Option: (67) Bootfile Name
Length: 12
Bootfile Name: filename.ext
Option: (255) End

Per testing with other DHCP servers (windows/cisco) when specifying option 67, the bootfile-name packet header is always populated and the Option: (67) packet header is not present. This stands true both when client requests and does not request option 67.

When I refer to the client requesting option 67, I am referring to "Option (55): Parameter Request List" sent in the DHCP discover.

Not sure if I have a miss-configuration or this is a potential bug, any thoughts or insight?

Thanks,
-dan

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue May 26, 2015 3:17 pm
by pukkita
I'm using 6.27 but have been using this setting since 6.19 and works without problems with thomson VoIP phones:
[admin@R01] /ip dhcp-server> /ip dhcp-server option print detail
 0 name="tftp-server-name" code=66 value="'192.168.2.195'" raw-value="c0a802c3" 

 1 name="Boot file name" code=67 value="'provisionado-sip.txt'" raw-value="70726f766973696f6e61646f2d7369702e747874" 
 

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue May 26, 2015 3:26 pm
by dancms
I'm on v6.28, and its working for some of my client device types as well. I'm running into issues where client devices don't request option 67 but I need to send to them anyways. I mainly wanted to point out there is a difference between how mikrotik handles option 67 when it comes to the bootfile-name packet header vs other DHCP server vendors.

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue May 26, 2015 3:28 pm
by dancms
Also, I tested specifying bootfile-name at the network level and it works correctly -

ip dhcp-server option print detail

;;;Example Network
address=10.0.100.0/22 gateway=10.0.100.1 dns-server="" wins-server="" ntp-server="" caps-manager="" domain="domain.com" next-server=10.0.100.1 boot-file-name="filename.ext" dhcp-option=""

Bootfile-name header is populated in this case.

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Wed Sep 23, 2015 11:32 pm
by nahuelon
I have the same problem using the 6.31 firmware. When I specified the Boot File Name in the DHCP Network setting the DHCP Offer package goes with the "Boot file name: MyBootFile.bin". But when I use a custom DHCP Option 67 to specify the boot file name in particular DHCP lease, I capture (with Wireshark) a DHCP Offer package with "Boot file name not given".
The DHCP Offer has the option 67 specified with the file name, but as "dancms" said the problem is visible in the DHCP "header".

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Mon Nov 09, 2015 3:54 pm
by nahuelon
Sorry to bother, anyone could help us solving the problem that dancms and I wrote at top. Thank you very much.

Posted: Mon Nov 09, 2015 6:25 pm
by jarda
Just try not to use 6.31. Use 6.30.4 or 6.32.3 instead.

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue Nov 10, 2015 7:22 pm
by nahuelon
Jarda, thank for your quick response. I have update to the last RouterOS 6.33 version and I test it again. I attach you the configuration and packet capture of a Working and a NotWorking DHCP Offer packet. If I remove the Boot File Name in the DHCP Network configuration, the clients are not able to connect or accept the DHCP Offer because the packet is not specifing the boot file name (check the CaptureNotWorking image). Have a look at the ConfigNotWorking image and you could check that I sent the Option 67 with the same TFTP file name. The option 67 "Serv5M" is working correctly in other devices, so this is not the problem.
If it helps, I have attached the log.
AGAIN, THANK YOU VERY MUCH!!!

Posted: Wed Nov 11, 2015 10:23 am
by jarda
I am not sure exactly with this. Maybe you should send the mail to support, it can be some kind of bug they can correct.

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Sat Nov 26, 2016 4:34 pm
by nahuelon
I tried contact the support but they ask me for a lot of information and then, they never response. Someone could solve this issue? Thanks!

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue Mar 13, 2018 4:20 pm
by nahuelon
Sorry to bother. Anyone knows if it is fixed?. Thanks!

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Mon Apr 13, 2020 7:47 pm
by nahuelon
Good afternoon. Sorry to bother again. Someone are expereincing the same issue? Thank you. Regards.

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue Jul 21, 2020 7:01 pm
by DaviV
Good afternoon. Sorry to bother again. Someone are expereincing the same issue? Thank you. Regards.
Hello, did you try to use bootfile name and DHCP Option Set in DHCP network rather than in DHCP Server ?

It worked for me.

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue Jul 21, 2020 7:36 pm
by dancms
If you are working with bootp clients, you need to use next-server and boot-file-name instead of dhcp options. Bootp is not compatible with dhcp options.

-dan

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue Jul 21, 2020 7:48 pm
by nahuelon
Thanks for your responses. Yes, I must use the 'Boot File Name' from the DHCP Network configuracion. I was searching a way to specify the 'Boot File Name' based on an individual Lease, as I do with a DHCP Option parameter. Some devices work with the DHCP Option 67, but other need the Boot File Name.
Thank you again. Regards.

Re: DHCP Option 67 not populating bootfile-name bootp header

Posted: Tue Jul 21, 2020 8:02 pm
by dancms
You can do that by creating individual entries under /ip dhcp-server network

Just specify the address for each entry as x.x.x.x/32, then set boot-file-name.