Could some one kindly explain what is the difference between IPv6 Unique Local Addressing and Link-Local addressing? I understand that Link-Local is for within a network, but isn't Unique Local Addressing similar to that?
IPv6 link-local addresses are required addresses, and they cannot be routed. They are confined to a single link, and every link has the same link-local network. The link-local address range is
fe80::/10. From RFC 4291, IP Version 6 Addressing Architecture:
2.5.6. Link-Local IPv6 Unicast Addresses
Link-Local addresses are for use on a single link. Link-Local addresses have the following format:
| 10 | | bits | 54 bits | 64 bits | +----------+-------------------------+----------------------------+ |1111111010| 0 | interface ID | +----------+-------------------------+----------------------------+
Link-Local addresses are designed to be used for addressing on a single link for purposes such as automatic address configuration, neighbor discovery, or when no routers are present.
Routers must not forward any packets with Link-Local source or destination addresses to other links.
ULA addresses can be routed (except on the public Internet). There are some rules to ULA addressing. The ULA address range is
fc00::/7, but the first half of the addresses,
fc00::/8, is reserved for assignment by a global authority. The second half of the ULA address range,
fd00::/8, is available for local use, but the 40-bit Global ID must be randomly chosen. From RFC 4193, Unique Local IPv6 Unicast Addresses:
This document defines an IPv6 unicast address format that is globally unique and is intended for local communications [IPV6]. These addresses are called Unique Local IPv6 Unicast Addresses and are abbreviated in this document as Local IPv6 addresses. They are not expected to be routable on the global Internet. They are routable inside of a more limited area such as a site. They may also be routed between a limited set of sites.
Local IPv6 unicast addresses have the following characteristics:
- Globally unique prefix (with high probability of uniqueness).
- Well-known prefix to allow for easy filtering at site boundaries.
- Allow sites to be combined or privately interconnected without creating any address conflicts or requiring renumbering of interfaces that use these prefixes.
- Internet Service Provider independent and can be used for communications inside of a site without having any permanent or intermittent Internet connectivity.
- If accidentally leaked outside of a site via routing or DNS, there is no conflict with any other addresses.
- In practice, applications may treat these addresses like global scoped addresses.
Link local addresses are local to a link*. Packets to/from link local addresses cannot cross any router. Furthermore to use a link local address requires knowing what interface it relates to. The trouble is interface IDs are a machine local concept and not nessacerally stable. These restrictions severely limit the utility of link local addresses.
Unique local addresses are akin to the RFC1918 addresses of IPv4. They can be routed within a site or a group of cooperating sites but they can't be advertised on the Internet. They are treated like global scope addresses by applications, there is none of that interface ID BS.
One problem with RFC1918 addresses was when an interconnection needed to be established between two private networks that had not been previously connected. There was a substatial chance that the two networks would use overlapping RFC1918 space and hence interconnection would be difficult. ULAs were designed to mitigate this problem.
The ULA block was split into two parts, the lower half (FC00::/8) was intended to be allocated by a registry body that gave a gaurantee of uniqueness. However this never actually happened** and these addresses are therefore considered reserved.
The upper half (FD00::/8) was allocated to probabalistically unique addresses. Sites are supposed to pick a /48 prefix pesudo-randomly (an algorithm is suggested but not mandated in the standard) from FD00::/8. This means that the probablity of an address collision in a group of n sites is roughly n2/(2*240).
My guess is your confusion comes from a home/small buisness perspective on networking. In a home/small buisness network it is rare for there to be more than one "link" within a private network. On the other hand in larger organisations it is more common for there to be complex private networks with many "link"s and routing between those links.
* a Link being a group of machines that are connected by a protocol at a lower level than IP. For example a single Ethernet VLAN (or a single ethernet network without VLANs)
** There were concerns about the blurring line between private addresses and provider independent global addresses.