Using IPv6 To Find And Access Headless Devices
Originally Published July 2020
I wanted to reprogram an old Raspberry Pi 2 with ARM Linux; but not deal with hooking it up to a monitor/keyboard/mouse to finish setting it up for a headless fileserver role. I remembered that with IPv6, operating systems generate a unique “fe80” address for multicast networking to other local peers.
- Related to my own needs, I got a ready-to-use SDcard image, and applied it with Balena Etcher. Then I installed the card & the device.
- On Windows, you will want to unblock ICMPv6 for inbound & outbound (this is required for doing pings with WSL & other programs).
- Open up a terminal or PowerShell session.
- On Linux, Linux on Windows, or MacOS, use
ip ato find your fe80 address for your Ethernet or WiFi adapter. It should be the same adapter that has other working IPv4 & IPv6 addresses on it. - If not using Windows, you can use
ping6 -I fe80::restofaddress ff02::1 - On Windows, using regular
pingreturns theff02::1address and not the other fe80 addresses. You have to usenetsh interface ipv6 show neighborsto get the actual results. - If you’re testing against a web interface, try different addresses in your web browser using a format such as
https://[fe80::restofaddress]:portnumber - If you’re using SSH, that should already be available to you on newer versions of Windows, as well as the other operating systems. For Windows, Bitvise and PuTTY work too. In any of these, you should be able to use the fe80 address without the brackets.
Update: link-local (fe80) addresses usually need a zone ID telling your computer which network adapter to use, since every adapter has its own fe80 network. Append it with a
%:
- Linux / macOS: the interface name, e.g.
ssh user@fe80::restofaddress%eth0(or%en0on a Mac;ip aorifconfigwill show the name).- Windows: the interface number, e.g.
ssh user@fe80::restofaddress%12(ipconfigshows it at the end of your own fe80 address).Without it, you may get “invalid argument” or “no route to host” errors, though Windows will sometimes guess the right adapter. For step 7, most browsers don’t accept zone IDs in URLs at all, so a link-local web interface often won’t load; use the device’s regular (global or ULA) IPv6 address, or its
.localhostname if it supports mDNS, instead.