[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building EC2 images locally fails



2014/1/8 Tomasz Rybak <tomasz.rybak@post.pl>:

> There is strange URL in providers/ec2/tasks/host.py:
> metadata_url =
> 'http://169.254.169.254/latest/dynamic/instance-identity/document'
>
> 169.254.* is (Windows ?) IP used when there is no DHCP-given IP.
> From analysis of the code it looks like GetInfo is used by Connect
> to get information about instance and its region (to connect to AWS
> to register AMI) - but I'm not sure which instance.
> The one build-debian-cloud runs on, or the one which is being created?

The net 169.254.0.0/16 is a standard IPv4 Link Local Address (RFC
3927) and addresses in that net are only valid in the local net, thus
never forwarded by routers.

Each computer in a LAN can generate their own address in this net,
without any other net infrastructure (like DHCP) in ad-hoc nets. The
computer generates an address in the net and checks with ARP if that
one is reserved.  If so, it tries with another address until it get an
unique one.  So each hosts 169.254.0.0/16 address is unique in that
LAN segment (broadcast segment).

In IPv6 nets, all hosts interfaces connected to a LAN must generates
an IPv6 Link Local Address (RFC 4291).
See http://en.wikipedia.org/wiki/Link-local_address (In Debian you can
install package avahi-autoipd to get such addresses)

(Sorry for the slightly OT)

Yours,
Anders


Reply to: