Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generate random numbers on ipxe shell??
2014-01-19, 10:10
Post: #11
RE: Generate random numbers on ipxe shell??
This is what i have been able to conjure up, i have appended this to my menu file and seems to be doing the job. I have not used iseq here.

dhcp net0 && echo IP address: ${net0/ip} ; echo Subnet mask: ${net0/netmask}
########## MENU ITEMS #######################
dhcp net0 && echo IP address: ${net0/ip} ; echo Subnet mask: ${net0/netmask} && chain || goto retry_dhcp


(2014-01-16 18:04)oblivionv Wrote:  It is very unlikely that 2 hosts (we have close to 60 machines in the VLAN)
were to assume the same IP from among the 65024(minus a few) possible IP's for the duration of ipxe chain-loading the file (hardly 1 to 2 minutes). And if it were to happen, then well, so be it. Point #2,3 sounds good for me. A DHCP retry script might do the job. I will try to get it to work and post the script here for reference. I'll also try to discover more about ipxe.priority.
Thanks a lot.


(2014-01-16 14:28)mcb30 Wrote:  
(2014-01-16 07:40)oblivionv Wrote:  It is very unlikely that 2 clients assume the same address with randomization if we were to use a class B address for example.

Not as unlikely as you may think:

Quote:I agree that conflicting configurations from the DHCP server is not a sane option. But our environment is being used for testing with people setting up DHCP servers on cisco routers etc for academic purpose (by design). We faced a similar kind of issue with winpe wpeinit. But i was able to counter this with a batch script. And thank you for

If you really need to hack around this problem rather than solve it, then you could try any of the following:

- use the "dhcp" command only to obtain an IP address, ignore any boot configuration, and "chain" from a hardcoded URI

- retry "dhcp" in a scripted loop until you get a configuration you are prepared to accept (e.g. using "isset" to check that you have a boot filename, or "iseq" to check that your default gateway is set to a specific IP address, etc.)

- use the undocumented (and not guaranteed to remain stable) "ipxe.priority" DHCP option to cause iPXE to prefer a specific DHCP server.

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Generate random numbers on ipxe shell?? - oblivionv - 2014-01-19 10:10

User(s) browsing this thread: 1 Guest(s)