mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-04-25 07:05:56 +03:00
[GH-ISSUE #283] USB image - Network unreachable #1659
Labels
No labels
Hacktoberfest
Hacktoberfest
bootloader
bsd
bug
confirmed
documentation
duplicate
enhancement
enhancement
enhancement
eol
experimental-merged
freebsd
help wanted
invalid
investigate
ipxe
linux
live-os
memdisk
menu
no-issue-activity
no-issue-activity
pull-request
released
todo
upstream
windows
windows
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/netboot.xyz#1659
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @abitrolly on GitHub (Nov 1, 2018).
Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/283
netboot.xyz.usbUSB image from https://boot.netboot.xyz/ipxe/netboot.xyz.usb fails to reach the network. Not from real hardware connected to LAN, not from QEMU on this laptop. The error message is the same.@abitrolly commented on GitHub (Nov 1, 2018):
While debugging it appears that
nslookupresolves addresses as IPv6.http://ipxe.org/cmd/nslookup
But my network doesn't support IPv6.
@abitrolly commented on GitHub (Nov 1, 2018):
Route command shows two net0 addresses too.
My router seems to be IPv6 compatible, and that's probably the reason I get IPv6 address and get resolve names, but it seems that upstream provider is not. How to make iPXE fallback to IPv4 is IPv6 fails?
@pali commented on GitHub (Nov 1, 2018):
Same problem there. It is because iPXE itself has broken IPv6 support.
I compiled my own iPXE version with disabled IPv6 support. Then network in this iPXE started working correctly.
But because https://boot.netboot.xyz/menu.ipxe is doing "Attempting to chain to latest version..." it is not possible to use my own working version of iPXE with netboot.xyz. netboot.xyz just replace working iPXE with its own iPXE version with broken IPv6 support and therefore netboot.xyz is unusable.
@antonym commented on GitHub (Nov 1, 2018):
Hmmm... yeah, I think I see the problem. I'm just using the dhcp command so it's trying all interfaces and trying all types of networking regardless to if the network upstream can support it.
I could try doing:
ifconf -c dhcp || ifconf -c ipv6 || goto netconfig
https://github.com/antonym/netboot.xyz/blob/master/ipxe/disks/netboot.xyz#L18
That may force ipv4 first, then fallback to ipv6 and then go to manual config. (http://ipxe.org/cmd/ifconf)
@antonym commented on GitHub (Nov 2, 2018):
Just dumping notes here, but I could also do some validation to ensure we can hit boot.netboot.xyz:
ping --count 1 boot.netboot.xyz && goto ipv4_good || goto ipv4_bad
@abitrolly commented on GitHub (Nov 3, 2018):
@antonym
ifconf -c dhcpstill configures ipv6. Seems like there is no way to disable it. I asked here http://lists.ipxe.org/pipermail/ipxe-devel/2018-November/006337.html still waiting for replies.ping: command not found.
netboot.xyz 1.04
@NiKiZe commented on GitHub (Feb 20, 2019):
ping could be disabled (by firewalls), i would suggest trying to hit a http/https endpoint to determine if it is good and then have fallback, maybe even check the error code.
@abitrolly I remember there being a few other discussions on the list about ipv6 recently, maybe that could help.
Just to have it in text ... error in image is http://ipxe.org/280a6011 Network unreachable
@hugalafutro commented on GitHub (Oct 7, 2020):
Hi, I am hitting this exact same issue with netboot.xyz running inside a docker container, is there any way to make this work? I use OpenWRT router, I tried disabling the ipv6 interfaces, but it just killed my internet even though I don't use ipv6 nor does my isp provide it.
@github-actions[bot] commented on GitHub (Nov 24, 2020):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@abitrolly commented on GitHub (Nov 24, 2020):
@hugalafutro if your ISP doesn't support ipv6, how could disabling it kill the internet? Can you post what you do?
@pali commented on GitHub (Nov 24, 2020):
@abitrolly: I have not tested iPXE again but at the time when I wrote my last commit it was because iPXE prefered IPv6 connection and if there was none from ISP then it it obiously killed the internet. Note that on the local network can be running DHCPv6 server or RA packets with just non-routable ULA addresses, it is perfectly fine to have assigned ULA or LL address even when you do not have IPv6 internet connection.
@abitrolly commented on GitHub (Nov 24, 2020):
@pali do you mean iPXE device could access the network, but could not access the internet?
@pali commented on GitHub (Nov 24, 2020):
@abitrolly: basically yes.
And there was also another issue in iPXE. On statefull DHCPv6-only network (when ISP or other router provides real IPv6 internet) iPXE detected that it is IPv6 capable (probably via RA) and prefered to use IPv6. But iPXE was not able to assign IPv6 address from statefull DHCPv6 server (maybe it did not have implemented statefull DHCPv6 client?) and just throwed error that Network unreachable.
@pali commented on GitHub (Nov 24, 2020):
So in both cases, completely disabling IPv6 in iPXE fixed those issues. iPXE in never tried to use IPv6 and so it use IPv4 which worked.
@razamatan commented on GitHub (Jan 2, 2021):
I'm hitting this issue chainloading netboot.xyz from my working ipxe with no ipv6 support...
@lukyrys commented on GitHub (Mar 9, 2021):
Same problem via PXE, tried many version, both DHCP or DHCP-undionly tested with same result.
when i hit to "Manual network configuration" and I'll just go through it without change any value then its working. (https still same error but http works).
I think the eth0 linkup is late before the dhcp request is in progress. Some extra check if eth is up or sleep may help?
@romanchyla commented on GitHub (Mar 20, 2021):
was facing the same issue (v2.0.33), on OpenWrt disabling IPv6 solved it:
@woeisme commented on GitHub (Oct 23, 2021):
Came across the same issue today, afaik ipv6 already disabled on my network (openwrt / lede)
@xeijin commented on GitHub (Oct 31, 2021):
@woeisme the option in OpenWRT is buried pretty deep, but it worked for me after unticking the box:
@github-actions[bot] commented on GitHub (Mar 15, 2022):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@razamatan commented on GitHub (Mar 15, 2022):
still a problem... still needs some love.
@foxt commented on GitHub (Apr 11, 2022):
Can confirm, on all 3 machines I've tried netboot on, all of them required me to go into manual configuration and press enter a few times to get it to work
@github-actions[bot] commented on GitHub (May 12, 2022):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@hello-smile6 commented on GitHub (May 12, 2022):
STILL BROKEN, BOT! STOP CLOSING IT!
@Openanonwriter commented on GitHub (May 20, 2022):
Having the same issue, we do not have IPV6 on the IPXE machine. Did a capture using wireshark, I can see that it is looking up AAAA records and failing as it should, but does not look for IPV4 after, just hard fails. Manually setting IPv4 it works, but dhcp does not.
@donhector commented on GitHub (Jun 3, 2022):
I was also getting the
network unreachableerror message when trying to spin up a Libvirt VM that was configured to boot from its NIC interface (virtio). This VM uses the default BIOS firmware (not UEFI)The NIC was configured to be attached to the host network (ie not attached to the libvirt's
defaultnetwork, which usesnatvia its ownvirb0device, but to a custom libvirt network I had created that usesbridgemode via thebr0host device.)This allows the libvirt VM to receive an IP in the same range as the Libvirt host and pretty much any other devices in my home LAN (ie 192.168.1.0/24)
My home LAN router is OpenWRT, which provides DNS, DHCP (ie, is the one leasing those 192.168.1.0/24 IPS) and TFTP amongst other stuff.
In the OpenWRT UI I had configured TFPT to serve directly from the url
http://boot.netboot.xyz/ipxe/netboot.xyz.kpxe(since my VM is not configured for UEFI)On boot, the VM would receive an IP in the desired 192.168.1.0/24 range, and would also receive the desired TFPT url provided by OpenWRT, but then it would fail trying to pull the actual
netboot.xyz.kpxefile from the web with the dreadednetwork unreachableerror message.Thanks to the pointers here around IPv6 being the culprit and following @xeijin suggestion, totally disabling DHCPv6 in OpenWRT for my LAN fixed the problem for me:
Hope that helps other people as well as a temporary workaround until the ipxe file itslef handles resorting to IPv4 when needed
NOTE: In my setup, using
httpsin the url did not work, I had to settle usinghttp.NOTE2: Your mileage might vary, but it was no big deal for me to disable IPv6 inside my Lan.
@steve6375 commented on GitHub (Oct 13, 2022):
My ISP does not support ipv6. Any fix for netboot.xyz.iso ?
Seems to be magically working now! Maybe my ISP changed something?
@SimonMcN commented on GitHub (Oct 31, 2022):
okay. I'm stumped. If I do m at boot and choose all the options it presents it works. but it doesn't work automatically ?
@joshenders commented on GitHub (Feb 16, 2023):
This was my experience as well.
I'm using:
HP Microserver Gen10+ with Intel i350-based 1GbE directly connected to the ONT of an IPv4-only fiber ISP.
@dedene commented on GitHub (Apr 28, 2023):
I'm observing the same with latest version, regardless of ipv6 configured on the network or not.
Was it working for you with that version?
@joshenders commented on GitHub (Apr 28, 2023):
I ended up trying the .iso version written to a usb flash drive using balena etcher.
@gema-arta commented on GitHub (Jun 7, 2023):
in
or use
or basically
result
show ip6getlocal linkaddress who added automaticallyThis is
qemuproblem?@razamatan commented on GitHub (Jun 7, 2023):
it's not specific to qemu. i'm still having this issue on physical/standalone pc's.
@gema-arta commented on GitHub (Jun 7, 2023):
@razamatan
This is globally ipxe ipv6/dns name resolving and dual v4/v6 stack trouble. But the
ipv6=offqemu workaround works for me.qemu-system-x86_64 -nic user,ipv6=off,tftp=.,bootfile=http://boot.netboot.xyz/ipxe/netboot.xyz.lkrn -nographic@antonym commented on GitHub (Jun 10, 2023):
The issue is really upstream with iPXE, I could probably build images that were separate single stack to see if that would work better but ideally I wouldn't have to create more images.
If v6 is enabled on the network, it prefers the v6 DNS regardless of whether or not it'll work, and I haven't found a good way to shut off the stack and prefer v4 DNS if v6 is present. Trying to disable or work around it doesn't work in the script.
@dedene commented on GitHub (Jun 11, 2023):
Is there any pointer you could give on how to build these single stack (i.e. ipv4 only) images? I’d be happy to play around with it and see if it solves the issue.
I agree ideally it should be solved in iPXE but in the meanwhile this could be a good workaround.
@antonym commented on GitHub (Jul 9, 2023):
I made a few changes to the boot-loader in development to see if it can more gracefully handle v4/v6 hybrid scenarios so the end result is that you end up in the menu and I can hopefully avoid having to split the disks up into separate stacks. Can anyone experiencing the issue try these boot-loaders out and see if it helps any in the scenario that usually doesn't work for you? I'm not currently utilizing v6 in my environment so it's difficult to simulate.
https://s3.amazonaws.com/dev.boot.netboot.xyz/9a04a0741e078c770c54c99bce5fdfb960507e98/index.html
If it see's
netX/dns6set from DHCP, it'll attempt v6 connectivity first. If that fails, it'll clear out thenetX/dns6variable and attempt another reload. IfnetX/dns6is not set, it should abandon trying to use the v6 stack and fall back to booting over v4.Actual changes are:
github.com/netbootxyz/netboot.xyz@5e9d77fefagithub.com/netbootxyz/netboot.xyz@9a04a0741e@dedene commented on GitHub (Jul 10, 2023):
@antonym Awesome, thx for having a look at this! I can confirm it is an improvement: with the new images it automatically boots into the Netboot.xyz menu without manually setting the network config.
However after selecting an image (for installation or live cd) I still get the same Network Unreachable error. I made a small screen recording to show: https://cln.sh/97kZdn2WNTqcM50ZCkMp You can see when booting in the menu it says "attempting IPv4..." but then after selecting a distro it fails again probably due to ipv6?
@antonym commented on GitHub (Jul 10, 2023):
It looks like it's failing on https but passing on http. The menu can be pulled from either, but anything pulled from Github is going to be https so it may be worth digging into why it's unable to load https. Date/time on machine might be one issue.
@dedene commented on GitHub (Jul 15, 2023):
@antonym Sorry for the late reply. Indeed it's failing on https. But when pressing 'm' and just hitting enter for manual network config, https seems to works just fine. Also, NTP is running on the host, so I'm quite sure the Date/Time is configured correctly for the VM.
Any ideas why the https could be failing for the automatic flow, but working using the failsafe menu and manual (ipv4) network configuration?
@ManuLinares commented on GitHub (Jun 7, 2024):
Hasn't been any news on this. Still on my network I have all ipv6 dhcp6 disabled, but when I start my machine I always have to press "m" to enter failsafe mode, then accepts the defaults and it works. Automatically it doesn't.
Any fix for this? Any workaround?
@nrvale0 commented on GitHub (Jul 3, 2024):
I guess I'm not adding much here except to say I'm seeing the exact same behavior as @ManuLinares et al.
@nrvale0 commented on GitHub (Aug 19, 2024):
After following the above link to the iPXE mailing list and then learning that iPXE will default to IPv6 for assets if it gets an AAAA record during DNS query, I adjusted my gateway's DNS settings (Unbound) to block all AAAA queries and the PXE-booting node is now able to download its boot images without a "Network unreachable..." message.
I think iPXE still needs better logic (and perhaps some tunables) to address this issue but here is a work-around config for Unbound:
@joshenders commented on GitHub (Aug 19, 2024):
Globally disabling AAAA responses/IPv6 on your network feels too heavy handed of a solution to me.
Here's an alternate solution to only filter AAAA responses for just netboot.xyz:
Copy the script below to
/etc/unbound.https://gist.github.com/FiloSottile/e2cffde2bae1ea0c14eada229543aebd
Modify the domains dict to just one entry of
netboot.xyz.:Update your
/etc/unbound/unbound.confto contain the following directives:Ideally, this could be scoped even further to specific source addresses but this is probably better than filtering out half the internet over an iPXE bug 😃.
@nrvale0 commented on GitHub (Aug 19, 2024):
Neither my internal network nor my upstream ISP supports IPv6 so those records aren't of any use to me. And its not the first time I've had problems with IPv6 records in DNS replies. Yes, if someone's upstream ISP requires IPv6 that's going to be too Big Hammer.
Regardless, it's a data point to suggest that the iPXE "heuristic" is a bit...well, it could use some more attention. ;)
@joshenders commented on GitHub (Aug 19, 2024):
Just exhausted seeing low effort "disable IPv6" solutions. Your internal network likely does support it, you've just not bothered to set it up or disabled it 🤪. It's 2024, all major hardware and operating systems made in the last 20 years support IPv6 and half the Internet is accessible over IPv6, it's time to move on.
@nrvale0 commented on GitHub (Aug 20, 2024):
You should refrain from assuming my requirements and whether or not they are "low effort". I can assure you that the x-vendor support for IPv6 is barely better now than it was 20 years ago because I worked at a research lab that helped with a number of the implementations.
The fact that we are here discussing a work-around for this half-hearted iPXE "heuristic" says a lot about about the community's understanding and the ecosystem's support of the technology as well.
@joshenders commented on GitHub (Aug 20, 2024):
I find it odd that you consider a one line change higher effort than the complicated multi-step Python solution I posted.
Users are going to discover your solution via search engine and needlessly block access to half the internet on their network as a work around; it's irresponsible.
You're not wrong. I hope this gets fixed in iPXE. Again, in 2024 it's inexcusable to not have a working IPv6 stack.
@foxt commented on GitHub (Aug 20, 2024):
You're right. My internal network, and all the devices on it do support IPv6, and of course a lot of the internet supports IPv6. But, I don't have a ethernet cable long enough to run to Big Ben, that's even if The Elders would let me directly plug in, so there has to be someone in between my local network and The Internet, and at least in the UK, your chances are 50/50 if you'll get an IPv6, or get told there's still enough v4 left
@nrvale0 commented on GitHub (Oct 27, 2024):
FWIW, I have now been running for months with my "irresponsible" solution above with zero negative consequences. I am at least two hops from any network supporting IPv6 and upstream routers handle that transition without my intervention.
This as a data point to suggest viability of either shipping a binary without IPv6 support or, preferably, providing a working config option to disable it until the iPXE IPv6 support is properly sorted.
@joshenders commented on GitHub (Oct 27, 2024):
Please stop encouraging people to disable IPv6.
Disabling IPv6 on your network "works" as a solution in the same way that taking the bus fixes a flat tire.
The root cause here is that the rfc6555 implementation is currently broken in iPXE. Future conversations in this issue should focus on that.
Even if upstream routers are IPv6 capable, if you do not have end-to-end IPv6 connectivity, you do not have a working IPv6 connection. You can test that here: https://test-ipv6.com
The solution I posted above will effectively filter IPv6 from iPXE's broken implementation while leaving your network in a ready state for upstream IPv6 connectivity.
@nrvale0 commented on GitHub (Oct 27, 2024):
As a status check I disabled the work-around for the broken IPv6 DNS resolution this morning and am now able to boot PXE clients cleanly. So something in netboot.xyz or iPXE has changed since my last updates and thus that work-around is no longer necessary.
Which the added benefit that I can now Kill File all future interactions with jhenders who does not seem to have ever committed to this repo anyway. Which is a rather nice for of "low effort" in the end.
@abitrolly commented on GitHub (Oct 28, 2024):
I wonder if there is a way to test these IPv4/IPv6 glitches in Actions CI?
@drebes commented on GitHub (Jan 9, 2025):
Faced the same issue, my subnet runs ULA IPv6 (non-routable) and RFC1918 NATed IPv4 (routable), and this is by design. I can confirm this is an issue with iPXE, and tried different workarounds to try to get iPXE to give up on the IPv6 DNS server config. The main problem is that
dns6andnetX/dns6cannot be cleared (I tested both on an iPXE shell), so this effectively fails silently, and the re-attempt that is supposed to happen over IPv4 happens again over IPv6.Would publishing a boot_domain that returns A records only be an option (eg:
boot-v4.netboot.xyz), and overriding it with one of the local scripts?@NiKiZe commented on GitHub (Dec 30, 2025):
Agree with most of this, except the statement of happy eyeballs being broken in iPXE, there is a lack of support for a feature that hides broken IPv6 configurations, lack of support for this feature is not the same as broken.
If you have a device on the network that does RA (Router Advertisements) iPXE will and should assume that it provides access to the internet and try and route traffic thru it.
The best approach here is to make sure you have proper working IPv6, and if possible, even go IPv6 only.