Page 1 of 1

DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Wed Apr 08, 2009 10:29 pm
by ricrc
Hello,

Has anyone tried to PXE Boot a Machine from a Mikrotik Device?

I have been trying to avoid moving the DHCP away from the Router, but i have not been able to make it work.

First problem i found was that the Mikrotik DHCP Server for some reason does not send DHCP-Option 66. I can confirm it on Packet Capture, and there is no Option 66 on the Lease Offer.

I then went and started using the TFTP Server now available on RouterOS, so it would target the Router IP for TFTP. The problem i have there now is that i can make a maching load pxelinux.0, but once it starts looking for pxelinux.cfg/default, even though it is there it can't load it for some reason. It can't load any file that is in the pxelinux.cfg/ folder.

I want to know if anyone else has tried this? I am trying to set up PXE Booting, and have been trying to avoid using my linux server as DHCP.

Thanks,
Ricrc

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Mon Apr 13, 2009 9:21 am
by mxso
me too!

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Mon Apr 13, 2009 7:08 pm
by makstex
and me!

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Sun Aug 02, 2009 12:47 am
by dssmiktik
I'm having a similar problem, but further along in the booting process.

First, you can specify option 66 "boot-file-name" by setting /ip dhcp-server network set <network> boot-file-name="pxelinux.0". This works great and pxelinux loads.

What I can't get working is the pxelinux config file. I'm using the new gpxelinux.0 from Syslinux. Pxelinux boots ok, but then fails to find a config file, even though pxelinux.cfg/default exists on my router. When I look in the Mikrotik log, it says the "reading from file", which means it should have passed it to the client. I'm using RouterOS 3.27 x86. I've tested this using VirtualBox and a physical machine booting from the network.

When I use the EXACT same setup using tftpd-hpa on linux everything works as expected.

When I use any other boot-file-name for loading in Mikrotik everything works as expected.

I'm wondering if Mikrotik is reading either TEXT or BINARY data from the pxelinux.cfg/default file, and pxelinux doesn't know how to handle it.

Mikrotik, can you shed some light on this? Normis, mrz?
A simple test:
- download syslinux here: http://www.kernel.org/pub/linux/utils/b ... .82.tar.gz
- extract gpxe/gpxelinux.0 and put in / of Mikrotik (/gpxelinux.0)
- create a folder in / of Mikrotik called pxelinux.cfg
- create an empty file inside called default with contents: SAY "Hello World"
- set boot-file-name="gpxelinux.0"
- allow TFTP access:
/ip tftp add req-filename=".*" allow=yes disabled=no
- boot a machine from the network. The message "Hello World" should be displayed. If it can't find pxelinux.cfg/default, you will get "Unable to locate configuration file" near the bottom of the screen.

Please test this and report back. This is primary reason I'm trying to use TFTP server on Mikrotik as it complements DHCP server nicely.

Thank you.


Here is a capture of the relevant log entries. The client IP is 192.168.33.252 and Router IP 192.168.33.1.
I'm not sure why incoming connection from is showing a weird IP. I have no idea who's IP that is. Mikrotik, could you also explain this while you're at it. Thanks.

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Fri Aug 07, 2009 4:04 pm
by janisk
solved in 3.28

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Tue Aug 25, 2009 6:31 am
by dssmiktik
There's a new issue in v3.28 and TFTP server that will not allow you to retrieve files larger than 512 bytes (512 B).

Should be fixed in 3.29

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Tue Sep 01, 2009 6:26 am
by elementalwindx
I upgraded to the 4.0 beta and I'm still having this same issue. CMON GUYS. :( I was looking forward to my first network install. What other ways did you guys go about getting that done?

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Tue Sep 01, 2009 8:31 am
by elementalwindx
actually how would I go about forwarding ports 67-69 to a desktop computer on the network in effort to use tftp on the desktop to do this? :)

Still trying to understand how to use the firewall and its not working the way I'm doing it.


Also is there a way to disable the TFTP on the MikroTik since its about as useless as can be?

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Tue Sep 01, 2009 10:38 am
by dssmiktik
Unfortunately I've had to use a Linux DHCP / TFTP setup for now as my Mikrotik won't function as needed for me. I'm using gpxelinux (part of the great syslinux project). gPXE works great on any other tftp / dhcp combination I've tried except Mikrotik's. I'm sorry to say after much emailing and requesting simple fixes and spending much time researching and providing great detail to Mikrotik staff, there is still no fix.

BTW, Mikrotik's dhcp won't work with gpxelinux because they don't "force" dhcp options to client, even if you manually specify per network options in the dhcp-server. This is a behavior of most other dhcp servers, most notably ISC DHCP.

I'm sorry to hear others are having issues with this as well.

Re: DHCP + TFTP + PXE Just Can't seem to get it working on ROS

Posted: Mon Sep 21, 2009 9:08 pm
by dssmiktik
There's a new issue in v3.28 and TFTP server that will not allow you to retrieve files larger than 512 bytes (512 B).

Should be fixed in 3.29
This issue is fixed in 3.30 (maybe 3.29 but I missed this release)