Jump to content











Photo

Bug Reports, Requests, HowTo's about Tiny PXE Server

pxe network boot

  • Please log in to reply
874 replies to this topic

#426 erwan.l

erwan.l

    Platinum Member

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

Posted 07 January 2016 - 02:01 PM

Hi Erwan,

 

Is it possible to run Tiny PXE without the DHCP part enabled?

 

At my work we have a Linux DHCP server that I don't have full access it provides IP's to the clients and redirects all the PXE requests to my windows server where I would like to run TinyPXE instead of Tftpd32.

 

 

Do you think this is possible to make this work without messing with the DHCP requests received by the other server?

 

TIA.

 

tick proxydhcp.

 

stop/start for the change to take effect.



#427 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 201 posts
  •  
    Portugal

Posted 08 January 2016 - 10:36 AM

Exactly !

 

This is what proxydhcp is meant for : it will not act a dhcp server anymore but only "complete" the request with extra details (boot filename, etc).

 

The DHCP redirect we have already answer to PXE requests for some machines, I don't think the proxyDhcp work the same way.

 

I'm testing now I find that the 1st DHCP is already specifying the boot file as pxelinux.0 and TinyPXE isn't overwriting this value to ipxe-undionly.kpxe including with the opt67 set.

 

By the way the option Bind IP isn't respecting the setting on the INI, I can't put this option disabled by default as I need because I have 2 network cards and want to receive requests on both.



#428 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 January 2016 - 11:18 AM

@Rui Paz

Don't take it the wrong way :), but you are IMHO making attempts to help you more difficult than needed.

 

Post a DETAILED, EXHAUSTIVE description of your setup (the EXACT specific "Linux" PXE Server and how it is configured - or at least what pacjets it sends) AND a complete, full description of ALL the settings you have in TFTP32 (provided that it is working in your setup ) AND a complete full fescription of ALL the setting you have currently in TinyPXE.

 

Describe also your hardware, it is not common to have a PC with two network cards that gets both net addresses by DHCP (at least this is the first time I hear of such a setup : :blush: ) AND describe your goal, i.e. WHAT EXACTLY are you try to PXE boot and how this is setup/configured.

 

It seems to me like you have a complex setup, it needs a complete description.

 

Otherwise, you will likely have another suggestion, and that will be non-working because of some other detail that you either did not provide or have mis-configured, and then you will loop through yet another one, that again will result in a failure, so you will add some other snippet of info and loop again ...

 

There are REASONS why the "Standard Litany" is "standard" ;):

http://homepage.ntlw...ard-litany.html

 

 

:duff:

Wonko



#429 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 201 posts
  •  
    Portugal

Posted 08 January 2016 - 11:43 AM

Hi Wonko,

 

My current setup works as this:

 

- Main server running linux its the DHCP server with PXE enabled for some clients to all the others requesting boot it sends a next-server IP pointing to my Windows Server

- The Windows Server is running TFTPD32 with pxelinux.0 as boot file this is working just fine to boot several tools ranging from MemTest to several WindowsPE

 

Now my goal is to replace TFTPD32 with Tiny PXE Server because I want to transfer wim files using http and benefit of using wimboot from ipxe

 

The Windows Server have two network cards for two different networks but for now I'm binding to only one IP address until this works.


Edited by Rui Paz, 08 January 2016 - 12:57 PM.


#430 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 January 2016 - 01:49 PM

Hi Wonko,

 

My current setup works as this:

 

I see that it is of no use attempting to get from you any relevant info, given that the topic is of very little interest to me, no further attempts will be made, sorry for my interjection :(.

 

:duff:

Wonko



#431 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 201 posts
  •  
    Portugal

Posted 08 January 2016 - 05:13 PM

Hi,

 

I found a way to make this work for me...

 

The linux server is running ISC DHCP server and I suspect because it answers to PXE request, TinyPXE doesn't get any requests on port 4011

 

What I did was to change the ISC DHCP configuration adding this lines:

class "pxeclients" {
    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    option vendor-class-identifier "PXEClient";
    vendor-option-space PXE;

 

    if exists user-class and option user-class = "iPXE" {
      filename "http://tinyPXE_server/menu.ipxe";
    } else {
      filename "ipxe-undionly.kpxe";
    }

}

 

On the first DHCP-PXE request the client receives ipxe-undionly.kpxe and on the second call the filename is set to load the iPXE menu, basically this ignores almost all the settings done inside TinyPXE!

 

Note: The ISC DHCP already set the next-server option to the tinyPXE_server


Edited by Rui Paz, 08 January 2016 - 05:17 PM.


#432 erwan.l

erwan.l

    Platinum Member

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

Posted 08 January 2016 - 05:38 PM

 if exists user-class and option user-class = "iPXE" {
      filename "http://tinyPXE_server/menu.ipxe";
    } else {
      filename "ipxe-undionly.kpxe";
    }

So by default you are serving (thru local tftp) ipxe-undionly.kpxe, and as ipxe bootstrap first task is to push a new dhcp request (with user-class="ipxe"), your dhcp server will serve (thru remote http) menu.ipxe.

 

In that case, you are only using the http part of TinyPXE Server.

You could probably make your setup simpler with a local http daemon like nginx, lighthttpd, etc

 

Or Proxydhcp mode would work for you if your linux dhcp server was a "plain" dhcp server (i.e not pushing pxe options) : you could then split dhcp services (ISC) from pxe services (TinyPXE Server) .

 

Also, Next-server ISC directive is there to point to another TFTP server (not a HTTP server).

If not specified, the localhost is used as TFTP server, unless overuled by specific conditions (like in your case).



#433 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 201 posts
  •  
    Portugal

Posted 08 January 2016 - 05:54 PM

Hi,
 

So by default you are serving (thru local tftp) ipxe-undionly.kpxe, and as ipxe bootstrap first task is to push a new dhcp request (with user-class="ipxe"), your dhcp server will serve (thru remote http) menu.ipxe.
 
In that case, you are only using the http part of TinyPXE Server.
You could probably make your setup simpler with a local http daemon like nginx, lighthttpd, etc

 
Actually in my case the ipxe-undionly.kpxe is downloaded from TinyServer using tftp.
 
I did think about adding some http server to the TFTPD32 configuration I have but using two different programs seems overkill...
 
Now is probably more clear why I ask about disabling the DHCP part :)



#434 erwan.l

erwan.l

    Platinum Member

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

Posted 08 January 2016 - 08:08 PM

 

Now is probably more clear why I ask about disabling the DHCP part :)

 

Actually not :)

But I am happy (for you ) that you did find a solution.



#435 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 201 posts
  •  
    Portugal

Posted 09 January 2016 - 06:03 PM

Thanks Erwan.

 

I found on the forum that we can change the http port using (it's missing on the sample config):

 

[web]
port=xxxx

 

Is it possible to disable directory browsing using http?



#436 erwan.l

erwan.l

    Platinum Member

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

Posted 17 February 2016 - 06:57 PM

Updated version (minor)

 

added : in analysedata, will exit loop as soon as a dhcp message (1 to 9) is found
added : in analysedata, will prevent (byte)offset>255
added : offline button will terminatethread if still active (53,67,4011)
fixed : no more high cpu usage on random occasions
added : new options skip_dhcp_inform & skip_dhcp_discarded
added : forcerenew dhcp messages logged


#437 The_Immortal

The_Immortal

    Newbie

  • Members
  • 11 posts
  •  
    Russian Federation

Posted 23 February 2016 - 03:09 AM

Hi there!

 

Guys, it seems DHCP-server doesn't work for me properly.

 

I've enabled proxyDHCP and put IP (192.168.94.1) for the next-server option (66). Then I started PXE-client: it shows DHCP-server is 192.168.94.254. Next ipxe.pxe was loaded this the following script:

echo ${next-server}

And output of this command was:

 

192.168.94.254

 

So it's not correct IP. I expected to see 192.168.94.1 because I set this ip for 66 option (next-server).

 

 

Could you tell me please what's the problem?

 

Thank you!

 

P.S. Host machine's OS - Windows 8.1 x64. PXE Cient - VMWare with e1000e network adapter.


Edited by The_Immortal, 23 February 2016 - 03:11 AM.


#438 Sfor

Sfor

    Newbie

  • Members
  • 24 posts
  •  
    Poland

Posted 23 February 2016 - 05:22 AM

As far as I understand the Proxy DHCP concept, the proxy DHCP server does not set IP in the client computer.

 

The PXE client sends DHCP discovery query, and proxy dhcp sends just the PXE data with the IP fields set as 0. So, PXE client gets the IP from the DHCP server, and PXE data from proxy DHCP server. In oter words, IP related fields should not work in proxy DHCP mode.



#439 erwan.l

erwan.l

    Platinum Member

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

Posted 23 February 2016 - 07:08 AM

As far as I understand the Proxy DHCP concept, the proxy DHCP server does not set IP in the client computer.

 

The PXE client sends DHCP discovery query, and proxy dhcp sends just the PXE data with the IP fields set as 0. So, PXE client gets the IP from the DHCP server, and PXE data from proxy DHCP server. In oter words, IP related fields should not work in proxy DHCP mode.

 

Correct : options like 54,51,1,3,6,28,15, etc are set by DHCP not PROXYDHCP.

 

However, The_Immortal mentions option 66 I believe.



#440 erwan.l

erwan.l

    Platinum Member

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

Posted 23 February 2016 - 07:09 AM

Hi there!

 

Guys, it seems DHCP-server doesn't work for me properly.

 

I've enabled proxyDHCP and put IP (192.168.94.1) for the next-server option (66). Then I started PXE-client: it shows DHCP-server is 192.168.94.254. Next ipxe.pxe was loaded this the following script:

echo ${next-server}

And output of this command was:

 

So it's not correct IP. I expected to see 192.168.94.1 because I set this ip for 66 option (next-server).

 

 

Could you tell me please what's the problem?

 

Thank you!

 

P.S. Host machine's OS - Windows 8.1 x64. PXE Cient - VMWare with e1000e network adapter.

 

 

Just to be sure I get it right, you are in proxydhcp mode, you set option 66 = 192.168.94.1 and you get option 66 = 192.168.94.254?

 

Thus, are you sure you are not confusing option 66 (boot server hostname = other tftp server) and option 54 (dhcp-server) ?


  • The_Immortal likes this

#441 The_Immortal

The_Immortal

    Newbie

  • Members
  • 11 posts
  •  
    Russian Federation

Posted 23 February 2016 - 01:13 PM

> Just to be sure I get it right, you are in proxydhcp mode, you set option 66 = 192.168.94.1 and you get option 66 = 192.168.94.254?

 

Yup, you're correct.

 

> Thus, are you sure you are not confusing option 66 (boot server hostname = other tftp server) and option 54 (next-server) ?

 

So, "${next-server}" (in iPXE) is 54 option? If so, I still got 192.168.94.254 for next-server output inspite of my 54 option set to 192.168.94.1

 

Input:

opt. 54 = 192.168.94.1

opt. 66 = 192.168.94.1

 

Output (thru iPXE):

${next-server} = 192.168.94.254

${dhcp-server} = 192.168.94.254


Edited by The_Immortal, 23 February 2016 - 01:16 PM.


#442 erwan.l

erwan.l

    Platinum Member

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

Posted 23 February 2016 - 02:07 PM

> Just to be sure I get it right, you are in proxydhcp mode, you set option 66 = 192.168.94.1 and you get option 66 = 192.168.94.254?

 

Yup, you're correct.

 

> Thus, are you sure you are not confusing option 66 (boot server hostname = other tftp server) and option 54 (dhcp-server) ?

 

So, "${next-server}" (in iPXE) is 54 option? If so, I still got 192.168.94.254 for next-server output inspite of my 54 option set to 192.168.94.1

 

Input:

opt. 54 = 192.168.94.1

opt. 66 = 192.168.94.1

 

Output (thru iPXE):

${next-server} = 192.168.94.254

${dhcp-server} = 192.168.94.254

 

Ok I get it : 

192.168.94.254 is your dhcp server (i.e "dhcp-server")

192.168.94.1 is your proxydhcp server also acting as a boot server i.e tftp server i.e "next-server".

 

Have a look here : is not this the bug issue you are encountering?

this behavior is usually a result of the PXE
spec: if a DHCP and a ProcyDHCP response both specify a boot server, the
spec says that DHCP overrules ProxyDHCP

...

To work around this, consider embedding an iPXE script into your
chainloaded iPXE.pxe:

#!ipxe
dhcp
set next-server ${proxydhcp/next-server}
set filename ${proxydhcp/filename}
chain $filename

  • The_Immortal likes this

#443 The_Immortal

The_Immortal

    Newbie

  • Members
  • 11 posts
  •  
    Russian Federation

Posted 23 February 2016 - 04:50 PM

Thank you very much!

 

Now I've the following:

 

Input:

opt. 54 = 192.168.94.1

opt. 66 = 192.168.94.2 /*just for testing*/

 

Output (thru iPXE):

${proxydhcp/next-server} = 192.168.94.1 /*why? I excpected to see here 192.168.94.2*/

${proxydhcp/dhcp-server}= 192.168.94.1

 

So it seems it's impossible to get value from opt. 66... That's really strange. And for me option 66 is just useless at all :( For example if i'd like to use another TFTP server 66 option will not help me here. By the way, the same problem with DHCP-server (when proxydhcp is inactive).

 

But anyway thank you, Erwan!


Edited by The_Immortal, 23 February 2016 - 05:14 PM.


#444 erwan.l

erwan.l

    Platinum Member

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

Posted 23 February 2016 - 08:22 PM

Same here.

In proxydhcp mode, option 66 seems simply useless...

May be abusing another option is an idea?

 

My settings.

 

dWcM3YG.png

 

dhcp (my dhcp server is 192.168.1.250)

 

t9pzQO1.png

 

proxydhcp (my proxydhcp server is 192.168.1.99)

 

eqmU0Ss.png

 

wireshark where one can see that option 66 is being pushed to the client

 

YXo2CGn.png


  • The_Immortal likes this

#445 The_Immortal

The_Immortal

    Newbie

  • Members
  • 11 posts
  •  
    Russian Federation

Posted 23 February 2016 - 10:06 PM

erwan.l, I'm entrapped.... :mega_shok:

So what's conclusion then? 66 option will be eventually ignored when proxyDHCP is enabled?


Edited by The_Immortal, 23 February 2016 - 10:11 PM.


#446 erwan.l

erwan.l

    Platinum Member

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

Posted 24 February 2016 - 09:33 AM

if you use 3 different servers, dhcp + proxydhcp + tftp, then yes opt 66 is useless.

i'll try a few other possibilities later this week.

 

if you use 2 servers, dhcp/tftp + proxydhcp OR dhcp + proxydhcp/tftp then you are fine with opt 66.


  • The_Immortal likes this

#447 The_Immortal

The_Immortal

    Newbie

  • Members
  • 11 posts
  •  
    Russian Federation

Posted 24 February 2016 - 11:13 AM

erwan.l, could you please explain how to identify how many different servers I use?

 

My settings

 

02.24.2016-14.09.png

 

 

dhcp (my dhcp server is 192.168.94.254)

 

02.24.2016-14.11.png

 

 

proxydhcp (my proxydhcp server is 192.168.94.1)

 

02.24.2016-14.12.png

 

 

tfpt (my tfpt server is the same as proxydchp - 192.168.94.1)

 

 

So it seems I use 2 servers, don't I? Nevertheless 66 option is useless in that example...


Edited by The_Immortal, 24 February 2016 - 11:43 AM.


#448 The_Immortal

The_Immortal

    Newbie

  • Members
  • 11 posts
  •  
    Russian Federation

Posted 24 February 2016 - 04:16 PM

erwan.l, it was just a theory before... Now let me show you the real problem.

For example, I'd like to use an external TFTP server just by setting its IP (thru 66 opt.) and its bootfile (thru 67 opt.) into Tiny.

How to do it?


Edited by The_Immortal, 24 February 2016 - 04:17 PM.


#449 ostapvoip

ostapvoip
  • Members
  • 5 posts
  •  
    Ukraine

Posted 25 February 2016 - 03:03 PM

erwan.l, really, I also could not find how to do it.

 

1_800.jpgi.gif

 

Although Serva external TFTP working

 

2016_02_25_17_00_20__800.jpgi.gif
 

One more question.
Where can I find the detailed description to the optextra options that could be used in Tiny?
 
Thank you for an excellent program!

Edited by ostapvoip, 25 February 2016 - 03:49 PM.


#450 erwan.l

erwan.l

    Platinum Member

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

Posted 25 February 2016 - 04:21 PM

erwan.l, could you please explain how to identify how many different servers I use?

 

My settings

 

02.24.2016-14.09.png

 

 

dhcp (my dhcp server is 192.168.94.254)

 

02.24.2016-14.11.png

 

 

proxydhcp (my proxydhcp server is 192.168.94.1)

 

02.24.2016-14.12.png

 

 

tfpt (my tfpt server is the same as proxydchp - 192.168.94.1)

 

 

So it seems I use 2 servers, don't I? Nevertheless 66 option is useless in that example...

 

if you use 2 servers only, dont bother with option 66 and use ${proxydhcp\next-server}







Also tagged with one or more of these keywords: pxe, network boot

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users