netboot.xyz icon indicating copy to clipboard operation
netboot.xyz copied to clipboard

USB image - Network unreachable

Open abitrolly opened this issue 6 years ago • 49 comments

netboot.xyz.usb USB 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.

$ md5sum netboot.xyz.usb
10f28984666d1e836f7b650615088708  netboot.xyz.usb

$ sudo dd if=netboot.xyz.usb of=/dev/sdc
2752+0 records in
2752+0 records out
1409024 bytes (1.4 MB, 1.3 MiB) copied, 2.20912 s, 638 kB/s

$ sudo qemu-system-x86_64 -hda /dev/sdc

image

abitrolly avatar Nov 01 '18 16:11 abitrolly

While debugging it appears that nslookup resolves addresses as IPv6.

iPXE> nslookup address ipxe.org
iPXE> echo ${address}
2001:ba8:0:1d4::6950:5845

http://ipxe.org/cmd/nslookup

But my network doesn't support IPv6.

abitrolly avatar Nov 01 '18 17:11 abitrolly

Route command shows two net0 addresses too.

iPXE> route
net0: 192.168 ...
net0: fe80:: ...

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?

abitrolly avatar Nov 01 '18 17:11 abitrolly

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.

pali avatar Nov 01 '18 20:11 pali

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 avatar Nov 01 '18 21:11 antonym

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

antonym avatar Nov 02 '18 14:11 antonym

@antonym ifconf -c dhcp still 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

abitrolly avatar Nov 03 '18 14:11 abitrolly

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

NiKiZe avatar Feb 20 '19 17:02 NiKiZe

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.

hugalafutro avatar Oct 07 '20 00:10 hugalafutro

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.

github-actions[bot] avatar Nov 24 '20 01:11 github-actions[bot]

@hugalafutro if your ISP doesn't support ipv6, how could disabling it kill the internet? Can you post what you do?

abitrolly avatar Nov 24 '20 03:11 abitrolly

@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.

pali avatar Nov 24 '20 09:11 pali

@pali do you mean iPXE device could access the network, but could not access the internet?

abitrolly avatar Nov 24 '20 09:11 abitrolly

@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 avatar Nov 24 '20 09:11 pali

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.

pali avatar Nov 24 '20 09:11 pali

I'm hitting this issue chainloading netboot.xyz from my working ipxe with no ipv6 support...

razamatan avatar Jan 02 '21 06:01 razamatan

Same problem via PXE, tried many version, both DHCP or DHCP-undionly tested with same result.

obrazek

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?

lukyrys avatar Mar 09 '21 23:03 lukyrys

was facing the same issue (v2.0.33), on OpenWrt disabling IPv6 solved it:

'sysctl -w net.ipv6.conf.all.disable_ipv6=1',
        'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6',
        'sysctl -w net.ipv6.conf.default.disable_ipv6=1'```

romanchyla avatar Mar 20 '21 02:03 romanchyla

Came across the same issue today, afaik ipv6 already disabled on my network (openwrt / lede)

woeisme avatar Oct 23 '21 10:10 woeisme

@woeisme the option in OpenWRT is buried pretty deep, but it worked for me after unticking the box:

Screenshot 2021-10-31 at 16 33 43 Screenshot 2021-10-31 at 16 27 00

xeijin avatar Oct 31 '21 16:10 xeijin

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.

github-actions[bot] avatar Mar 15 '22 02:03 github-actions[bot]

still a problem... still needs some love.

razamatan avatar Mar 15 '22 04:03 razamatan

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

foxt avatar Apr 11 '22 16:04 foxt

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.

github-actions[bot] avatar May 12 '22 03:05 github-actions[bot]

STILL BROKEN, BOT! STOP CLOSING IT!

hello-smile6 avatar May 12 '22 03:05 hello-smile6

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.

Openanonwriter avatar May 20 '22 00:05 Openanonwriter

I was also getting the network unreachable error 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 default network, which uses nat via its own virb0 device, but to a custom libvirt network I had created that uses bridge mode via the br0 host 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)

image

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.kpxe file from the web with the dreaded network unreachable error 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:

image

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 https in the url did not work, I had to settle using http.

NOTE2: Your mileage might vary, but it was no big deal for me to disable IPv6 inside my Lan.

donhector avatar Jun 03 '22 12:06 donhector

My ISP does not support ipv6. Any fix for netboot.xyz.iso ? Seems to be magically working now! Maybe my ISP changed something?

steve6375 avatar Oct 13 '22 08:10 steve6375

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 ?

SimonMcN avatar Oct 31 '22 16:10 SimonMcN

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 ?

This was my experience as well.

I'm using:

# netboot.xyz bootloaders generated at Thu Feb 16 00:54:02 UTC 2023
# iPXE Commit: https://github.com/ipxe/ipxe/commit/cff857461be443339aa39d614635d9a4eae8f8b2
...
f9432f382b8c507d15f7ad17a4f432e91a89d0e680fb95fa80d29cedd96d959f *netboot.xyz.iso

HP Microserver Gen10+ with Intel i350-based 1GbE directly connected to the ONT of an IPv4-only fiber ISP.

joshenders avatar Feb 16 '23 01:02 joshenders

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 ?

This was my experience as well.

I'm using:


# netboot.xyz bootloaders generated at Thu Feb 16 00:54:02 UTC 2023

# iPXE Commit: https://github.com/ipxe/ipxe/commit/cff857461be443339aa39d614635d9a4eae8f8b2

...

f9432f382b8c507d15f7ad17a4f432e91a89d0e680fb95fa80d29cedd96d959f *netboot.xyz.iso

HP Microserver Gen10+ with Intel i350-based 1GbE directly connected to the ONT of an IPv4-only fiber ISP.

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?

dedene avatar Apr 28 '23 16:04 dedene