Hi all!
How do I configure RouterOS so that it knows what to do with incoming PXE Boot requests?
I know it has to go in the DHCP server config, but I am a bit unclear on how to configure it exactly…
(I do have a tftp server up and running)
Hi all!
How do I configure RouterOS so that it knows what to do with incoming PXE Boot requests?
I know it has to go in the DHCP server config, but I am a bit unclear on how to configure it exactly…
(I do have a tftp server up and running)
what do you want to boot and why does this involve routeros?
I want to boot a CDROM-less machine (so that I can install a Linux OS on it), and PXE uses DHCP, so I need to configure the DHCP server of RouterOS so that it passes the correct parameters to the client… ![]()
I would be interested in the answer also, because I could not find it in this forum or with the help of Google. I have a Mikrotik router which act as the DHCP server and a Windows workstation which run the TFTP server. The image is ready and I know what DHCP options shall I configure as I already tried the whole thing with a Windows DHCP server and it was working perfectly. The problem is that I want to keep the DHCP server on Mikrotik and it seems that even if I configure the same options which were working on the Window server, it’s still not working on Mikrotik. I found a website somewhere which said, that Mikrotik does not support the necessary options for PXE and I have to use another DHCP server. Is that true? If yes, then it is possible somehow to use two DHCP servers (with relaying or something), so Mikrotik would still handle the leases and the other DHCP server would not contain any scopes, just answer the option requests?
Any feedback from a developer or froma Mikrotik expert would be appreciated as there is really nothing out there about this subject…
packet sniff the two dhcp requests, one from mikrotik and one from windows, and see what the differences are. . . they should work the same if using options.
Already enabled dhcp logging on Mikrotik and got the following result. For me it seems that the option requests remain unanswered by Mikrotik…
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet server1 received request with id 394265823 from 0.0.0.0
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet ciaddr = 0.0.0.0
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet chaddr = 00:0F:20:2D:68:DC
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet Msg-Type = request
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet Client-Id = 01-00-0F-20-2D-68-DC
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet Address-Request = 192.168.0.13
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet Host-Name = “Pince13”
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet Unknown(81) = 00-00-00-50-69-6E-63-65-31-33-2E
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet Class-Id = “MSFT 5.0”
2008-01-07 21:35:28 Local7.Debug 192.168.0.1 dhcp,debug,packet Parameter-List = Subnet-Mask,Domain-Name,Router,Domain-Server,NETBIOS-Name-Server,Unknown(46),Unknown(47),Unknown(31),Static-Route,Unknown(249),Vendor-Specific
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet server1 received request with id 394265823 from 0.0.0.0
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet secs = 1024
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet ciaddr = 0.0.0.0
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet chaddr = 00:0F:20:2D:68:DC
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet Msg-Type = request
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet Client-Id = 01-00-0F-20-2D-68-DC
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet Address-Request = 192.168.0.13
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet Host-Name = “Pince13”
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet Unknown(81) = 00-00-00-50-69-6E-63-65-31-33-2E
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet Class-Id = “MSFT 5.0”
2008-01-07 21:35:32 Local7.Debug 192.168.0.1 dhcp,debug,packet Parameter-List = Subnet-Mask,Domain-Name,Router,Domain-Server,NETBIOS-Name-Server,Unknown(46),Unknown(47),Unknown(31),Static-Route,Unknown(249),Vendor-Specific
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet server1 received request with id 394265823 from 0.0.0.0
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet secs = 2816
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet ciaddr = 0.0.0.0
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet chaddr = 00:0F:20:2D:68:DC
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet Msg-Type = request
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet Client-Id = 01-00-0F-20-2D-68-DC
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet Address-Request = 192.168.0.13
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet Host-Name = “Pince13”
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet Unknown(81) = 00-00-00-50-69-6E-63-65-31-33-2E
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet Class-Id = “MSFT 5.0”
2008-01-07 21:35:39 Local7.Debug 192.168.0.1 dhcp,debug,packet Parameter-List = Subnet-Mask,Domain-Name,Router,Domain-Server,NETBIOS-Name-Server,Unknown(46),Unknown(47),Unknown(31),Static-Route,Unknown(249),Vendor-Specific
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet server1 received discover with id 2772512033 from 0.0.0.0
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet secs = 4
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet flags = broadcast
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet ciaddr = 0.0.0.0
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet chaddr = 00:0F:20:2D:41:A5
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Msg-Type = discover
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Parameter-List = Subnet-Mask,Unknown(2),Router,Unknown(5),Domain-Server,Unknown(11),Host-Name,Unknown(13),Domain-Name,Unknown(16),Unknown(17),Unknown(18),Vendor-Specific,Server-Id,Class-Id,Unknown(67),Unknown(128),Unknown(129),Unknown(130),Unknown(131)
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet ,Unknown(132),Unknown(133),Unknown(134),Unknown(135)
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Unknown(57) = 04-EC
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Unknown(97) = 00-0A-12-4D-99-5A-5B-D9-11-BB-D8-20-2D-41-A5-00-0F
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Unknown(93) = 00-00
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Unknown(94) = 01-02-01
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Class-Id = “PXEClient:Arch:00000:UNDI:002001”
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,info,debug server1 deassigned 192.168.0.11 from 00:0F:20:2D:41:A5
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet server1 sending offer with id 2772512033 to 255.255.255.255
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet flags = broadcast
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet ciaddr = 0.0.0.0
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet yiaddr = 192.168.0.11
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet siaddr = 192.168.0.1
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet chaddr = 00:0F:20:2D:41:A5
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Msg-Type = offer
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Server-Id = 192.168.0.1
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Address-Time = 259200
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Subnet-Mask = 255.255.255.0
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Router = 192.168.0.1
2008-01-07 21:35:45 Local7.Debug 192.168.0.1 dhcp,debug,packet Domain-Server = 192.168.0.1,213.46.246.51,213.46.246.52
First, if you are simply wanting to provide the DHCP option to tell your machine where it’s tftp server is located, that is easy. Just google for “dhcp options” or just look here: http://www.networksorcery.com/enp/protocol/bootp/options.htm. To add the options to MT, you just add the option/code/value under “/ip dhcp-server options”, then add the option name under “/ip dhcp-server network”.
If you want more than that, I don’t believe there is a way to make the MT be a pxe boot server. I am not familiar enough with the pxe process to know for sure. It is possible that the dhcp server just provides the name and location of the boot file via dhcp options. If that is the case, then look to the first part of this post for guidance.
As I wrote in my first post, I already added the necessary options to DHCP (Options 13, 43, 60, 66 and 67). With the same options, the network boot working fine with a Windows DHCP server, but does nothing with Mikrotik.
In the case of the windows dhcp server, is the bootfile located on the windows server, or is it pointing to some other server location? I wish I were more familiar with pxe and perhaps I could offer more information. There are a number of options that are pxe related (208-211), so perhaps it is just a matter of putting the bootfile in the correct location and getting the options right. I’ll do a little bit of reading as I have time to see if I can learn a bit more about how pxe works.
Thanks for your efforts Butch!
In the case of the Windows DHCP server the TFTPD was on the same computer, but somehow I don’t think that the problem is with TFTP. In the DHCP log (which I included above) it can be seen that the client requested several DHCP options from the server and I can’t see any answers for those from Mikrotik.
Err…this may be a really dumb question, but you did add the options to the network configuration, right?
/ ip dhcp-server option
add name="TFTP" code=66 value="192.168.4.145"
/ ip dhcp-server network
add address=192.168.5.0/24 gateway=192.168.5.1 dhcp-option=TFTP
Hehe… It was not a dumb question… ![]()
I am using Winbox and noticed the Options tab in the DHCP-Server window, but did not realize that I have to add the configured options in the Networks window also…
The network boot is still not working because DHCP does not provide the IP address of the TFTPD to the client, but at least I can see that the other options are passed. I guess I have to figure out what should be the proper value for option 43, which tell the client if the TFTPD is on the same server or somewhere else. But this is just a matter of little googling…
Thanks a lot, you helped much to put me back on the track… ![]()
Thanks again!
Csaba
Ehh… I still need help if anybody did PXE with Mikrotik as the DHCP server…
I set up DHCP options and configured the the Windows workstation as the PXE server with option 43 (with tag 6, 8, 9 and 10). After that the workstation (which I try to boot with PXE) gets an IP address, get the address of the PXE server correctly (192.168.0.250 in my case), try to connect and nothing… I did some packet sniffing and noticed that it try to communicate on port 4011 and not on the TFTP port. After reading the PXE specifications, I found that the PXE server should answer also to a DHCP request on that port before the TFTP session start. As I don’t want to run a DHCP on that computer too, my second idea was to remove option 43 from Mikrotik DHCP (letting the PXE client to believe that the PXE server on the Mikrotik also) and when the TFTP communication begin, those packets should be redirected to the real TFTP server. I tried this with doing NAT on udp packets coming with source port 2070 and 2071, but not much luck with that either. Client send the file request packet, which is acknowledged and the server send the first data block, but acknowledgment don’t arrive after that.
Is there anybody with a suggestion how a PXE environment could be established with Mikrotik as the DHCP server and a standalone Windows(XP) workstation as the TFTP server?
Thanks in advance!
I believe you need to add the following:
/ip dhcp-server option
add code=66 name=boot-server value="IP_of_PXE_Server"
add code=67 name=boot-file value="pxelinux.0"