0

I created a static IP address for eth0 to use with a USB dongle (connected to my PC) in dhcpcd.conf file.

interface eth0
static ip_address=169.254.2.13/16
static routers=169.254.11.25

Is there anything I'm doing wrong?

2
  • What exactly is your definition of "not working" here, and why would you use static addresses together with DHCPCD instead of one or the other?
    – RalfFriedl
    Feb 3, 2019 at 8:31
  • I was looking up on how to create static address, and that came up. Apparently, /etc/network/interface is the "old way" Feb 3, 2019 at 8:56

1 Answer 1

1

169.254.2.13/16 is a Link-local address

This is not routable, and makes no sense.

5
  • I thought that was fine since it was possible with the old /etc/interfaces method? Feb 3, 2019 at 0:40
  • No matter how you set it it is not routable
    – Milliways
    Feb 3, 2019 at 0:42
  • 1
    Although not best practice (link local addresses may well clash as are allocated for non-addressed devices by the OS) I do think it should work on a local network segment (though I could be wrong). OP - do you see the IP address assigned to the interface (through ifconfig for example), as if not then routing isn't even an issue yet.
    – Dave
    Feb 3, 2019 at 0:53
  • Nothing showed up. I decided to just use /etc/network/interface, even though it's the "old way" Feb 3, 2019 at 8:57
  • If you decide to use /etc/network/interfaces then you should notice the second line in it: Please note that this file is written to be used with dhcpcd and take care of Differences between /etc/dhcpcd.conf and /etc/network/interfaces?.
    – Ingo
    Feb 3, 2019 at 12:53

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.