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