Linux Networking — What is IP Address 169.254.169.254?

Tony
4 min readOct 13

The IP address 169.254.169.254 is a link-local address used by cloud environments, including Google Cloud Platform (GCP), Amazon Web Services (AWS), and others. This IP address is used to provide metadata to instances running in the cloud environment.

If you run the ip route command, you will see the following:

$ ip route show | grep 169.254.169.254
169.254.169.254 dev eth0

In different cloud platforms, you will see different output.

GCP Context

In the context of GCP (Google Cloud Platform), instances can query 169.254.169.254 to access instance metadata, project metadata, and other information about the instance or running processes. The metadata server is a read-only server that provides instance-specific data.

You can access the metadata server from your instance using curl or any HTTP method. Here is an example of a curl command:

$ curl "http://metadata.google.internal/computeMetadata/v1/instance/?" -H "Metadata-Flavor: Google"
attributes/
cpu-platform
description
disks/
guest-attributes/
hostname
id
image
licenses/
machine-type
maintenance-event
name
network-interfaces/
preempted
remaining-cpu-time
scheduling/
service-accounts/
tags
virtual-clock/
zone

AWS Context

In the context of AWS, the IP address 169.254.169.254 is used as the endpoint for the instance metadata service. The AWS EC2 metadata service provides a way for EC2 instances to retrieve instance-specific information and configuration details.

When an EC2 instance makes a request to 169.254.169.254, it can access a range of metadata about the instance itself. This metadata includes information such as the instance ID, instance type, security group IDs, public and private IP addresses, IAM role, availability zone, and much more.

For example:

$ curl http://169.254.169.254/latest/meta-data/
ami-id
ami-launch-index
ami-manifest-path
autoscaling/
block-device-mapping/
events/
hostname
iam/
identity-credentials/
instance-action
instance-id
instance-life-cycle
instance-type
local-hostname
local-ipv4
mac
metrics/
network/
placement/
profile
public-keys/
reservation-id
security-groups…