[ipxe-devel] Detecting if server is on the same subnet

Richard Hornbaker Richard at Hornbaker.com
Tue Jan 28 17:37:39 UTC 2014


Not knowing the limits of the scripting language, I can think of these techniques:
* ANDing the subnet mask against the IPs
* Compare the ARP entries for the default gateway IP vs. the server's IP - if they're different, the server is probably same-subnet.

FWIW,
Richard

Sent from a mobile device - pardon the typos!

On Jan 28, 2014, at 8:27, Michael Brown <mcb30 at ipxe.org> wrote:

> On 23/01/14 12:10, Alexandre Blanchette wrote:
>> Is there a way in iPXE to know if a server/host is on the same subnet as
>> the booting client? The most obvious way would be ping -TTL but there's
>> not such parameter in iPXE's implementation.
> 
> Not within the iPXE scripting language.  You could quite easily perform this calculation on the server side.
> 
> Michael
> _______________________________________________
> ipxe-devel mailing list
> ipxe-devel at lists.ipxe.org
> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
> 



More information about the ipxe-devel mailing list