For some reason a network i need to connect my raspberry pi to uses the ip ranges 169.254.x.x and the pi won't connect. I understand that the range 169.254.x.x is supposed to be reserved for some special purpose, but pretty much any other device connected to this network works.

Is there any way to get the raspberry pi to work here as well?

Other details: RPI 4 Latest raspbian

  • Whoever set-up that network doesn't understand the link local address block. Private networks should use 10.xxx.xxx.xxx/8 172.[16-31].xxx.xxx/16 or 192.168.xxx.xxx/24 networks.
    – Dougie
    Commented Apr 17, 2020 at 21:50
  • That may be, but this is how they have set up their network and i have to adapt to it. Commented Apr 17, 2020 at 22:01
  • It's wrong, so go and ask the owner of the network how you're expected to connect to it and what routes need to be used.
    – Dougie
    Commented Apr 17, 2020 at 22:04
  • Hah, i barely got access to the network in the first place. In certain sectors of industry people have a preferred way of doing things and are quite protective about it. I've gotten clear indications that if i make any kind of fuss for the operators, i'm out. Commented Apr 17, 2020 at 22:06

2 Answers 2


The 169.254.x.x range (technically a /16 network) known as fe80::/10 for IPv6 is used when a DHCP server is not found on the local network or cannot issue a new IP address to the requesting device. At this point the Automatic Private IP Addressing, or APIPA kicks in.

You can set the address up manually using dhcpcd.conf in Stretch / Buster along the lines of:

interface eth0
static ip_address=
static routers=
static domain_name_servers=

BUT there are a few things that you need to understand:

  • Its bad practice. Its possible that the next device will automatically assign itself a used address thought they should use ARP to stop this...
  • Some switches and routers will not pass data out of this network e.g. to WiFi or other switches
  • Some routers will not apply NAT for these addresses so Internet connection is not possible
  • Some devices assign random addresses each time they boot. Others use the MAC address of the card to calculate the address

Saying all of that - I use IPv6 link local as my router will not pass these and my ISP will not say when (or IF) they will provide IPv6 functionality :-)

Personally, I would set a DHCP server up (e.g. PI-HOLE or ISC-DHCP) and let it control the network.

  • Oh, so you can set up the static config and it will work? I have limited options when it comes to controlling the network (industrial with grumpy admins...), but i can ask for a reserved address. Why they have used this range i have no idea, but it is not the first time i have encountered it. Seems like a common thing in some circles i suppose. Last time i encountered it i had a raspberry pi 3 (couple of years ago) and that worked fine. Commented Apr 17, 2020 at 15:14
  • I would get them to issue you a static address from the DHCP server - they will need the MAC address of the Pi though. One argument I have seen for this is if the network is hacked its 'harder' to find your way around (its not but what the heck).
    – user115418
    Commented Apr 17, 2020 at 16:28
  • @Andyroo You can, of course do this, BUT the Pi, in common with standard procedures already has a Link-local address I would guess the device is designed to connect to a DHCP server.
    – Milliways
    Commented Apr 18, 2020 at 1:07
  • 1
    You are right with your warnings, so for my opinion it's not a good idea to show how to set a static link local ip address. B.t.w. these ip addresses are defined only for local use, so ALL routers will not route these ip addresses, otherwise they violate the specification.
    – Ingo
    Commented Apr 18, 2020 at 17:31
  • ufortunately, the solution posted does not work. The Pi is assigned the address, but is unable to reach anyone on the network. Other machines on the network are however able to reach the pi. Seems like there is some setting that simply prevents the pi from even trying. Commented Apr 24, 2020 at 9:42

There is no such thing as a "169.254.x.x network" This is a Link-local address

This indicates the Pi was unable to obtain an IP Address.

  • This network uses that range. Everything else gets addresses in those ranges and are able to reach other machines on that network. Commented Apr 17, 2020 at 7:30
  • What is this mysterious "network"? Link-local address are NOT routable - they work ONLY on the link level.
    – Milliways
    Commented Apr 17, 2020 at 9:16
  • It is an industrial network at a wastewater treatment plant. I have pretty much zero say in the network topology. I do however have a router here and i set it up with the dhcp 169.254.1.x for testing. I connected two PCs to it and they got 1: and 2: They can communicate fine, but the pi, not so much. Commented Apr 17, 2020 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.