I know this gets asked a lot, but none of the answers are working for me.

I have a USB to ethernet dongle on my Windows PC that I would like to connect to a raspberry pi (version 4.14.71-v7+). On the windows side, I have the ethernet adapter set to a static IPv4 address:, subnet mask, and default gateway

On the raspberry pi, if I type the command sudo ifconfig eth0, everything works fine, I can ping and connect the two systems.

To make the pi boot with this address automatically, I modified /etc/dhcpcd.conf, adding this to the bottom:

interface eth0
static ip_address=
static routers=
static domain_name_servers=

But this isn't working. Even after rebooting, I just get:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::30ca:fe09:1545:1b84  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:ef:d6:df  txqueuelen 1000  (Ethernet)
        RX packets 153  bytes 12781 (12.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35  bytes 3963 (3.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And I can't ping from either direction. Running sudo service dhcpcd status I get:

Nov 04 19:15:32 raspberrypi dhcpcd[518]: eth0: using static address
Nov 04 19:15:32 raspberrypi dhcpcd[518]: eth0: adding route to
Nov 04 19:15:32 raspberrypi dhcpcd[518]: eth0: adding default route via
Nov 04 19:15:32 raspberrypi dhcpcd[518]: eth0: deleted route to
Nov 04 19:15:41 raspberrypi dhcpcd[518]: eth0: no IPv6 Routers available

FYI, I did not modify /etc/network/interfaces, so it is still the default:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

What am I missing here?

  • Your config looks good. Educated guess: this is a problem with the fact you are trying to use a link-local subnet (169.254.x.x/24) together with a static configuration in dhcpcd. Try using (say) addresses in instead and see if the problem is magically fixed. – Rob Bricheno Nov 4 '18 at 22:30
  • none of the answers are working for me .... why not? – jsotola Nov 5 '18 at 3:43
  • "I can't ping from either direction" – user2913869 Nov 5 '18 at 18:58
  • Is there also a router in addition to the Windows PC and RasPi and does it has the ip address You should not use this ip range, instead use addresses from e.g. – Ingo Nov 8 '18 at 10:44
1 is a Link-local address so it is pointless trying to use as a static IPv4 address.

It is even more futile trying to use for a router as Link-local addresses are not routable.

See How to set up Static IP Address

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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