Jump to content











Photo
* * * * * 2 votes

Tiny PXE Server

ipxe gpxe dhcp proxydhcp pxe boot sanboot http

  • This topic is locked This topic is locked
162 replies to this topic

#76 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 25 August 2013 - 10:50 AM

Thanks, excellent app. Would it be possible to make it installable as Windows service?

 

sebus

 

Hi Sebus,

Should be possible.

 

Thus, you could also launch it at the startup of your windows and use the start=1 in the config.ini.

 

Regards,

Erwan



#77 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14093 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 25 August 2013 - 11:16 AM

@sebus
You can try with SRVANY, but I would try first with nssm:
http://nssm.cc/
which is IMHO a very valid alternative :thumbup:.

:cheers:
Wonko
  • sebus likes this

#78 Jeff18MS

Jeff18MS

    Newbie

  • Members
  • 11 posts
  •  
    Philippines

Posted 29 August 2013 - 02:14 AM

Hi Erwan,

 

You are a Godsend to us IT People, thank you so much for your tool, I hope that you could improve it more.

 

I just want to have one request.. :-) 

 

did you build the ipxe-undionly.kpxe binary? if so, could you add this embed script to the binary :

 

#this script that persistently retries DHCP until it succeeds in obtaining a boot filename:

#!ipxe

:retry_dhcp
dhcp && isset ${filename} || goto retry_dhcp
echo Booting from ${filename}
chain ${filename}



#79 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 29 August 2013 - 06:07 AM

Hi Jeff18MS,

 

Thanks for these compliments  :suda:

 

About ipxe binaries, yes, I am building them from ipxe github.

I could embed that script indeed but why not add this script you have in the script that you can pass via TinyPXE Server?

See screenshot on how to first chain ipxe then chain a script.

 

Not everyone from to get a dhcp lease, some want to fix their ip.

 

Regards,

Erwan

 

Attached Thumbnails

  • ipxe_script.png


#80 Jeff18MS

Jeff18MS

    Newbie

  • Members
  • 11 posts
  •  
    Philippines

Posted 29 August 2013 - 09:13 AM

Hi Jeff18MS,

 

Thanks for these compliments  :suda:

 

About ipxe binaries, yes, I am building them from ipxe github.

I could embed that script indeed but why not add this script you have in the script that you can pass via TinyPXE Server?

See screenshot on how to first chain ipxe then chain a script.

 

Not everyone from to get a dhcp lease, some want to fix their ip.

 

Regards,

Erwan

 

Hi Erwan,

 

My problem is some of the computers is having a dhcp timeout (not sure if it's the correct term) it could load the ipxe-undionly.kpxe but unable to load the filename user class - menu.ipxe, i am getting connection timed out (http://ipxe.org/4c116035) error

 

Thanks,

Jeff



#81 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 215 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, Coreboot
  •  
    European Union

Posted 29 August 2013 - 10:19 AM

My problem is some of the computers is having a dhcp timeout

Give the exact name of network interface cards on which there is a problem. Maybe this is problem NIC & iPXE - not Tiny PXE Server.
I had a similar problem with a network card Realtek 8139 + iPXE - read this:
(solved) (renamed) DHCP timeout from Realtek 8139 card

#82 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 29 August 2013 - 10:28 AM

I'll update my zip file this afternoon so that it contains the latest release from ipxe (i compiled it yesterday).

May be that will solve that dhcp time out issue.

 

Erwan


  • Jeff18MS likes this

#83 Jeff18MS

Jeff18MS

    Newbie

  • Members
  • 11 posts
  •  
    Philippines

Posted 29 August 2013 - 11:11 AM

I'll update my zip file this afternoon so that it contains the latest release from ipxe (i compiled it yesterday).

May be that will solve that dhcp time out issue.

 

Erwan

Nice! Thanks Erwan, hopefully it could solve the DHCP Timeout issue,

 

@reboot12  I'm not sure if it's network card specific issue, because I have the same machines and same onboard nic that is working ok.

 

maybe STP or Fastport from the switches that is causing this, I'm not sure really.



#84 Jeff18MS

Jeff18MS

    Newbie

  • Members
  • 11 posts
  •  
    Philippines

Posted 29 August 2013 - 12:36 PM

I got my problem solved, I compiled a new undionly.kpxe using the http://rom-o-matic.eu/ website

and added the DHCP script loop that continuously retry DHCP until it receives the boot filename.

 

8qwe.png

 

 

This is the new compiled undionly.kpxe that continuously run DHCP until it receives a Boot Filename.

0jvu.jpg

 

 

It can now load my menu.ipxe after the 3rd tries of DHCP



#85 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 29 August 2013 - 04:20 PM

Good to know it works out for you.

Version ipxe 22a0 is indeed the one I compiled earlier today from github.

 

This dhcp time out is strange thus : you are using TinyPxe server? if so, can you send me the logs (right click in the log window, save to log file).

 

Thanks,

Erwan



#86 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 215 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, Coreboot
  •  
    European Union

Posted 29 August 2013 - 04:32 PM

It can now load my menu.ipxe after the 3rd tries of DHCP

Is it working always after the 3rd tries or random? Do you use ProxyDHCP? This is not normal because delay boot from filename. DHCP need working after first request. This is probably fault of the NIC driver in iPXE.
What kind of card you use, what model?

You have exactly the same error as me :-). Look at this one more time:
dhcperrorw.png

and read this: Guys, I have good news !!! mcb30 make some patch's mdelay, iodelay and new readw. All patch's working but official commit readw
After apply patch all working good. Look at this log:
iPXE 1.0.0+ (e411) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: AoE HTTP iSCSI DNS TFTP SRP bzImage ELF MBOOT PXE PXEXT Menu
REALTEK 0xbeea0 receive buffer is at [1fe03eb0,1fe05eb0,1fe066a6)
REALTEK 0xbeea0 media status is 10
DHCP (net0 00:80:48:1c:cd:59)....... ok
menu.ipxe... ok
I worked on it a few days together with Michael Brown :-)

Edited by reboot12, 29 August 2013 - 04:52 PM.


#87 Jeff18MS

Jeff18MS

    Newbie

  • Members
  • 11 posts
  •  
    Philippines

Posted 30 August 2013 - 03:46 AM

Good to know it works out for you.

Version ipxe 22a0 is indeed the one I compiled earlier today from github.

 

This dhcp time out is strange thus : you are using TinyPxe server? if so, can you send me the logs (right click in the log window, save to log file).

 

Thanks,

Erwan

 

Yes, I'm using TinyPxe Server

 

Here's the log - http://www.mediafire..._Server_log.txt

 

screenshot of my settings - http://www.mediafire...m7f/tinyPXE.png

 

 

 

Is it working always after the 3rd tries or random? Do you use ProxyDHCP? This is not normal because delay boot from filename. DHCP need working after first request. This is probably fault of the NIC driver in iPXE.
What kind of card you use, what model?

You have exactly the same error as me :-). Look at this one more time:
dhcperrorw.png

and read this: Guys, I have good news !!! mcb30 make some patch's mdelay, iodelay and new readw. All patch's working but official commit readw
After apply patch all working good. Look at this log:

iPXE 1.0.0+ (e411) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: AoE HTTP iSCSI DNS TFTP SRP bzImage ELF MBOOT PXE PXEXT Menu
REALTEK 0xbeea0 receive buffer is at [1fe03eb0,1fe05eb0,1fe066a6)
REALTEK 0xbeea0 media status is 10
DHCP (net0 00:80:48:1c:cd:59)....... ok
menu.ipxe... ok
I worked on it a few days together with Michael Brown :-)

 

Yes, if it didn't receive DHCP on the first try it will receive it after 3rd try,

Some of the machines I encounter this on Dell Optiplex 755 with Intel® 82566DM Gigabit Ethernet LAN

 

Weird thing is that it's working ok on other Optiplex 755 same NIC, my PC's are on the same switches.



#88 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 30 August 2013 - 06:04 AM

In the extra option field, you may want to try these ipxe options : 175.6.1.1.1.176.1.1.

175 means we want ipxe options, has total length =6, option 1 length 1 value 1, option 176, length 1, value 1.

 

It will tell ipxe to use your tiny pxe server dhcp first (option 1) and also to not wait for any proxydhcp packet (option 176)

 

More details here : http://ipxe.org/howto/dhcpd.

 

It could be that you have another dhcp server on your network confusing ipxe (an internet box, etc).

 

/Erwan



#89 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 215 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, Coreboot
  •  
    European Union

Posted 30 August 2013 - 07:15 AM

Weird thing is that it's working ok on other Optiplex 755 same NIC, my PC's are on the same switches.

Are all Dell computers have exactly the same hardware configuration? Identical RAM modules and size, CPU etc. ?

Edited by reboot12, 30 August 2013 - 07:17 AM.


#90 Jeff18MS

Jeff18MS

    Newbie

  • Members
  • 11 posts
  •  
    Philippines

Posted 30 August 2013 - 07:53 AM

Are all Dell computers have exactly the same hardware configuration? Identical RAM modules and size, CPU etc. ?

Yes same RAM and size and identical CPU

 

In the extra option field, you may want to try these ipxe options : 175.6.1.1.1.176.1.1.

175 means we want ipxe options, has total length =6, option 1 length 1 value 1, option 176, length 1, value 1.

 

It will tell ipxe to use your tiny pxe server dhcp first (option 1) and also to not wait for any proxydhcp packet (option 176)

 

More details here : http://ipxe.org/howto/dhcpd.

 

It could be that you have another dhcp server on your network confusing ipxe (an internet box, etc).

 

/Erwan

Thanks Erwan, I will try this settings



#91 Jeff18MS

Jeff18MS

    Newbie

  • Members
  • 11 posts
  •  
    Philippines

Posted 30 August 2013 - 07:58 AM

In the extra option field, you may want to try these ipxe options : 175.6.1.1.1.176.1.1.

175 means we want ipxe options, has total length =6, option 1 length 1 value 1, option 176, length 1, value 1.

 

It will tell ipxe to use your tiny pxe server dhcp first (option 1) and also to not wait for any proxydhcp packet (option 176)

 

More details here : http://ipxe.org/howto/dhcpd.

 

It could be that you have another dhcp server on your network confusing ipxe (an internet box, etc).

 

/Erwan

 

Erwan will that be an issue if there's another MS DHCP server running on our network? but they are in separate scope of IP addresses, they don't overlap.

 

i.e :

 

MS DHCP 10.164.194.100-254

TinyPXE 10.164.194.10  - Pool size = 20



#92 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 30 August 2013 - 08:10 AM

Erwan will that be an issue if there's another MS DHCP server running on our network? but they are in separate scope of IP addresses, they don't overlap.

 

i.e :

 

MS DHCP 10.164.194.100-254

TinyPXE 10.164.194.10  - Pool size = 20

 

Hi Jeff,

 

Could be an issue : the dhcp client wont care about your scopes.

It will broadcast a dhcp request and will randomly take one or the over.

The options below will secure your process in the second stage (once ipxe is download, it downloads the script) but not the first stage (pxe downloading ipxe boot strap).

I am working on a proxydhcp option for the next version.

 

Not saying this your option thus.

 

You seem to have issue stage 2 (ipxe sending a dhcp offer).

Use options below to ensure the best setup.

These options are for free :)

Regards,

Erwan



#93 Jeff18MS

Jeff18MS

    Newbie

  • Members
  • 11 posts
  •  
    Philippines

Posted 30 August 2013 - 08:30 AM

Hi Jeff,

 

Could be an issue : the dhcp client wont care about your scopes.

It will broadcast a dhcp request and will randomly take one or the over.

The options below will secure your process in the second stage (once ipxe is download, it downloads the script) but not the first stage (pxe downloading ipxe boot strap).

I am working on a proxydhcp option for the next version.

 

Not saying this your option thus.

 

You seem to have issue stage 2 (ipxe sending a dhcp offer).

Use options below to ensure the best setup.

These options are for free :)

Regards,

Erwan

Hi Erwan,

 

What is my best option?  :yess:



#94 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 30 August 2013 - 09:15 AM

Hi Erwan,

 

What is my best option?  :yess:

 

I would use the option above in Tiny PXE server.

At worse, it wont change anything.

At best, it will speed up ipxe when this one sends a dhcp request over your network.

 

Next tiny pxe server version will have a proxydhcp option which will enable tiny pxe server to co exist "peacefully" next to another dhcp server.

For now, it is some sort of a racing condition : first one (dhcp server) to answer wins...



#95 sebus

sebus

    Frequent Member

  • Advanced user
  • 305 posts

Posted 31 August 2013 - 08:49 PM

It does seem that Tiny PXE can be used as proxyDHCP only with another existing local DHCP

 

zg7j.png

 

With following config.ini entries:

 

binl=1

start=1
opt67=undionly.0
opt66=192.168.50.50
opt60=PXEClient
opt43=0.0.0.0
 

I do not even have to have (as in picture) ProxyDHCP Boot File Name entry

 

sebus



#96 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 31 August 2013 - 09:50 PM

Proxydhcp works like this (it is currently mostly implemented with the TinyPXE Server BINL option, as spot by Sebus) :

 

1/

It sits on a subnet and sniff out PXE-based DHCPDISCOVER traffic (port 67 and/or 4011), and broadcasts back, alongside the corresponding DHCPOFFERs (from other server(s)).

The biggest difference being that ProxyDHCP sends null IP addresses (it focuses on extra information such as boot filename, etc).

 

2/

The client with then send DHCPREQUEST to both the dhcp server (port 67) and to the proxydhcp (port 4011).

 

3/

Both server will respond with a DHCPACK : the dhcp server with ip details and the proxydhcp with extra details like the boot file name.

 

In your case Sebus, I am not sure the TinyPXE Servr binl/proxydhcp did the trick actually.

I believe TinyPXE Server simply "won the race" this time.

 

But you are on the right track indeed : once I have completely the last bits of the proxydhcp it will work exactly like you mentionned.

With one exception : you should then read dhcpd4011:DHCP_xxx sent ... xxx being either an ACK or OFFER.

Basically, when you are set as proxydhcp, you dont want to send anything from port 67.

 

Today my socket on port 4011 will only answer to RIS/WDS requests.

 

/Erwan



#97 sebus

sebus

    Frequent Member

  • Advanced user
  • 305 posts

Posted 31 August 2013 - 10:28 PM

You are right, as the IP range picked up by Tiny is the same, then client gets IP from Tiny & all works (on small network anyway)

 

Long day, ofcourse pdhcp is only 4011, and 67 is DHCP

 

It would be great if you could "divorce" pdhcp from DHCP some time soon

 

sebus



#98 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 31 August 2013 - 11:28 PM

You are right, as the IP range picked up by Tiny is the same, then client gets IP from Tiny & all works (on small network anyway)

 

Long day, ofcourse pdhcp is only 4011, and 67 is DHCP

 

It would be great if you could "divorce" pdhcp from DHCP some time soon

 

sebus

 

Version 1.0.0.14 implementing proxydhcp is ready and works fine at my place.

I need to test it further with different computers, pxe bootstraps but so far so good  :good:

 

I will probably release it tomorrow.

Regards,

Erwan


  • sebus likes this

#99 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2249 posts
  • Location:Nantes - France
  •  
    France

Posted 01 September 2013 - 12:02 PM

Latest version 1.0.0.14 now support ProxyDHCP features.

 

In short :

 

TinyPXE Server can now co exist "peacefully" with another dhcp server on the same LAN.

No more race conditions where first one (dhcp server) to answer wins the lease.

 

With ProxyDHCP option enable, TinyPXE Server will now "only" provide the boot file name information (and only to proxydhcp clients) : the client will then use/combine the dhcp offers from both servers (lease+boot file name).

 

Feedback welcome : I could only test (with success) the following boot straps in my home environement  fow now:

ipxe , gpxe , pxelinux , startrom.0 , pxeboot.com 

Cheers,

Erwan

 

edit1 :

beware that since you have a dhcp server potentially different than your tftp server, you may have to review the use of {$dhcp-server} versus {$next-server} when chainloading to another file.

 

edit2:

Grub4dos does not seem to like proxdydhcp mode.

To use grub4dos your PXE server must also be the DHCP server

Attached Thumbnails

  • tinypxeserver_proxydhcp.png

  • Jeff18MS likes this

#100 sebus

sebus

    Frequent Member

  • Advanced user
  • 305 posts

Posted 01 September 2013 - 02:48 PM

What are the config options?

I figured out

 

proxydhcp=1

 

But if I use start=1 then DHCP starts as well - pdhcpd on UPD port 67 & 4011 (same if I press Online)

 

And what about the option for Boot file Filename ?

 

filename=undionly.0
 

does NOT stick/shows in GUI

 

I have no idea how to use proxyDHCP using config.ini only, sorry

 

Seems that I must use start=0, then in GUI select the bootfile (as config entry does not stick), then tick proxydhcp

 

But nothing on UDP 67,4011

 

sebus






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users