PXE boot DHCP settings check
-
@Sebastian-Roth Maybe we need a service that would start ALL fog services, based on what the DB says.
Then, you could turn on/off services at will from the web interface as need presents itself.
For example,
IF…
SELECT settingValue FROM globalSettings WHERE settingKey = ‘FOGImageReplicatorEnabled’equals 1
then start FOGImageReplicator
-
@Wayne-Workman any/all services of this service would already be able to run automatically from this point forward if this were implemented. Why? Because all the fog services need are network and db to start properly. This would be the same for this referenced service as well.
-
@Tom-Elliott I’m not sure I follow your last two sentences… not sure about the first one either. You’re doing Tom-Speak again.
-
@Jbob Yeah, the RFC is definitely a good starting point. You might wanna check out the PXE spec as well: ftp://download.intel.com/design/archives/wfm/downloads/pxespec.pdf
Please let me know if I can assist in building the tool. I am happy to join in.
-
I don’t know if the source for dhcpdump would be of any help or just confuse the programming.
(just a brain dump here…)
From a support standpoint. It would be ideal if we could see all responding dhcp servers as well as their parameters being published by the dhcp server.
Things we need to identify is if more than one dhcp server responds to a dhcp request
The parameters returned by all dhcp servers (specifically dhcp options 66, 67 and maybe 1 if fog is in a routed network)
If there is a dhcpPROX (dnsmasq like service sending out data, I think via udp port 4011) in the environment providing additional parameters not supplied by the dhcp server.From that info we should be able to find out if the FOG external environment is setup correctly. Of course more information is alway helpful for strange issues. But the tool should be able to provide those values.
-
Jbob started of with a nice code sample in C# to send DHCP discovery and receive answer packets. Working on this I ran into a major problem trying to send packets with source address 0.0.0.0 (as one usually does not have a source IP when trying to get one via DHCP). It seems like some DHCP servers don’t mind DHCP discovery packets with proper source address but I feel this is not good and might tamper the results we get…
I have tried to build my own raw IP packets but C#/mono on Linux still try to be smart and set source address to one of my interface IPs.
-
@Sebastian-Roth maybe an interface without an address then (just for starters)?
-
@Wayne-Workman said:
maybe an interface without an address then (just for starters)?
Not sure what you mean by that? Can you explain? In C# you can use function SendTo without specifying a sender address (uses just any it finds) or you can tell it to use “any” (0.0.0.0 really) which gives me the same result. AFAIK there is no way to just specify a sender interface…
-
@Sebastian-Roth Set the interface to have the ip 0.0.0.0 and then try.
Also - I’ve been studying for RHCSA and this book I’ve got says that every hardware device is accessible via the file system, and you can send/receive data by reading and writing to the device files (wild stuff to me). I wonder if you could send a packet with just a shell script if you knew the device file?
-
@Wayne-Workman said:
Set the interface to have the ip 0.0.0.0 and then try.
Tried… magically uses my WLAN adapter address as source then! Funny thing, I can set source to 1.0.0.0 and I get 1.0.0.0 in wireshark. But as soon as I try 0.0.0.0 it does not want to play the game.
I wonder if you could send a packet with just a shell script if you knew the device file?
For sure we could but doesn’t help much here as we would like to have a platform independent solution to check on PXE information.
-
I found a way to send very much raw packets via AF_PACKET socket on Linux in plain C - allowing sender IP 0.0.0.0! This code could also be used as native library calls from C#. But AFAIK that won’t be portable to Windows as winsock does not have AF_PACKET or anything similar.
So I put that idea aside for now and played with PcapDotNet and SharpPcap. Where only the later one I could make work on Linux/mono - possibly because I don’t know mono/C# well enough. With SharpPcap I was able to send DHCP Discover packets with sender address 0.0.0.0 just fine. So I am wondering if this would be the way to go. What do you think @Jbob ? I will provide example code soon!
-
Ok, together with Jbob I seem to have figured out a working set of libraries (SharpPcap and PacketDotNet) and C# code to send and receive the packets we want. Hopefully we’ll have the first alpha version of a tool ready soon!