[ipxe-devel] Subnet mask 255.255.255.255 doesn't work
Clive Eisen
clive at hildebrand.co.uk
Fri Jun 26 19:29:13 UTC 2015
> On 26 Jun 2015, at 20:11, Michael Brown <mcb30 at ipxe.org> wrote:
>
> On 26/06/15 18:55, Josh Jameson wrote:
>> I am having an issue where I need to provide /32 DHCP request where the
>> gateway is outside the subnet.
>>
>> For example consider the following DHCP offer;
>> IP: 10.0.0.50
>> Netmask: 255.255.255.255
>> Gateway: 10.1.0.1
>>
>> iPXE doesn't seem to communicate right. It times out when trying to get
>> a HTTP request at http://10.1.0.1/.
>
> That doesn't surprise me. By specifying a subnet mask of 255.255.255.255, you are telling iPXE (or any other client) that there is one and only one IP address on that network, which is the 10.0.0.50 address itself. You have not provided any way for the client to reach 10.1.0.1.
>
>> If I boot the same machine and
>> network config into Linux or Windows I can access the URL.
>
> That _does_ surprise me. I tested it just now: as expected, Linux fails to communicate with 10.1.0.1. (Specifically, it refuses to even add 10.1.0.1 as the default gateway, since that address is not within the designated local network range of 10.0.0.50-10.0.0.50).
>
> I'm not sure what network topology you're actually trying to create. Is the iPXE client in the same broadcast domain as the gateway (i.e. if you send a broadcast such as an ARP request from the iPXE node, do you expect it to reach the gateway)? If so, then you are probably using a subnet mask of 255.0.0.0.
>
> See https://en.wikipedia.org/wiki/Subnetwork#IPv4_subnetting for some basic introduction to subnet masks.
Sorry to butt in but this is bridging
And we only have half the story here - the bit that’s missing is the route commands
Have a look at how OVHs explain it for virtual machines bridging to the host NIC and thus its gateway - much better than I could
http://docs.ovh.ca/en/guides-network-bridging.html
You CAN have the gateway outside your subnet with a /32 netmask
They key is in the routing scripts AIUI
Now don’t forget this is on the same NIC there is only one
--
Clive Eisen
GPG: 75056DD0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20150626/3c48ed69/attachment.sig>
More information about the ipxe-devel
mailing list