This has been a known deficiency of both the GNU inetutils ifconfig
and the NET-3 net-tools ifconfig
for a long time. If your interface has multiple IP version 4 addresses, as will be the case if it has both a DHCP-assigned one and a link-local one, those two ifconfigs
will only show you one of the addresses, in this case the link-local one. The GNU inetutils ifconfig
moreover will not show you any IP version 6 addresses for the interface at all.
This has not been addressed in well over a decade in those tools. People did make patches for this, including one back in 2009 for the NET-3 net-tools one. It reached Bernd Eckenfels 4 years later, who never accepted it.
Having a second link-local IP version 4 address in 169.254.0.0/16 in addition to the "routable" one in 192.168.0.0/16 is not actually a problem for your network interface itself, and you could leave your system configured this way, with (as you observed) little to no ill-effect whatsoever, as long as no more than one network interface does this. Aside from the surprise to you that your system has this address, and that it has a concomitant route and will bind local sockets to this address when trying to connect to other link-local addresses, it is really only a significant problem for those two ifconfig
tools.
As you note, ip
will show you all of the IPv4 addresses.
So too will my ifconfig
.
Further reading
ip a
, which shouldn't be different. A 169.254 address is a zeroconf address implying something in your network configuration failed. – muru Jun 21 '15 at 18:48