What is this IP address: 169.254.169.254?

I have always noticed an IP something "169.254.x.x" in my routing table even when I am not connected to any network in my Windows operating system.

In Linux, when I list my routing table.

$ ip route show 

I get an entry like

169.254.0.0/16 dev eth0  scope link  metric 1000 

Can somebody explain me what is this IP address actually. Whether its something like the 127.0.0.0/8 family.

Edit: In ec2, each instance can get meta-data regarding their own by making HTTP requests to this IP.

$ curl -s http://169.254.169.254/user-data/

So can someone tell me to whom this IP address is actually assigned ?


These are dynamically configured link-local addresses. They are only valid on a single network segment and are not to be routed.

Of particular note, 169.254.169.254 is used in Amazon EC2 and other cloud computing platforms to distribute metadata to cloud instances.


In almost all circumstances that's a IP assigned automatically by an interface that's set to get its IP via DHCP but can't get one.


It's a IPv4 link local address, as defined in rfc3927. Usually ZeroConfig/Bonjour/mdns et al enabled boxes are setup to have IPv4 ll address to enable (home) networking without the presence of an DHCP or unicast DNS server.


This is a special case of an APIPA address. The OP is not asking for 169.254.x.x

As well as being an APIPA address, this is the internal address used by AWS EC2 instances for EC2META queries via HTTP (curl, say).

curl http://169.254.169.254/latest/meta-data/instance-id

will return the instance id without a newline, and this is useful for scripting. It is not used for "distributing" the metadata. Instead, it is used for querying these attributes.


Found some info from this IANA page that is probably easier to digest than the RFC3927. Quoted below:

Special-Use Addresses

  • "Autoconfiguration" IP Addresses:

      169.254.0.0 - 169.254.255.255
    

    Addresses in the range 169.254.0.0 to 169.254.255.255 are used automatically by most network devices when they are configured to use IP, do not have a static IP Address assigned and are unable to obtain an IP address using DHCP.

    This traffic is intended to be confined to the local network, so the administrator of the local network should look for misconfigured hosts. Some ISPs inadvertently also permit this traffic, so you may also want to contact your ISP. This is documented in RFC 6890.

And, its following section provides a side-by-side comparison, for OP's second question "Can somebody explain me what is this IP address actually. Whether its something like the 127.0.0.0/8 family."

  • "Loopback" IP addresses:

      127.0.0.0 - 127.255.255.255
    

    Each computer on the Internet uses 127.0.0.0/8 to identify itself, to itself. 127.0.0.0 to 127.255.255.255 is earmarked for what is called "loopback". This construct allows a computer to confirm that it can use IP and for different programs running on the same machine to communicate with each other using IP. Most software only uses 127.0.0.1 for loopback purposes (the other addresses in this range are seldom used). All of the addresses within the loopback address are treated with the same levels of restriction in Internet routing, so it is difficult to use any other addresses within this block for anything other than node specific applications, generally bootstraping. This is documented in RFC 6890.