IPv6 tutorial – Part 6: Site-local addresses and link-local addresses

本文介绍了IPv6中的本地使用单播地址类型,包括站点本地地址和链路本地地址,并对比了它们与IPv4中类似地址的区别。站点本地地址类似于IPv4中的私有地址,而链路本地地址则用于确保即使在DHCP失败的情况下也能实现主机间的通信。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://4sysops.com/archives/ipv6-tutorial-part-6-site-local-addresses-and-link-local-addresses/

In the last post of this IPv6 tutorial, you learned about the different address types and the new public IP addresses, the global unicast addresses.

Today I will introduce the so-called local-use, unicast addresses, which are those IPv6 addresses that are not routed across the public Internet.

There are two types of local-use, unicast addresses: site-local addresses and link-local addresses.

 

Site-local addresses  FEC0

Site-local addresses are equivalent to private IP addresses in IPv4.

The address space reserved for these addresses, which are only routed within an organization and not on the public Internet, is 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.

In IPv6, the first 10 bits of a site-local address are set to 1111111011, which is why these addresses always begin with FEC0.

The following 54 bits are the subnet ID, which you can use in your organization for hierarchical routing,

and the last 64 bits are the interface ID, which is the part that has to be unique on a link (local network on which hosts communicate without intervening routers).

Thus, the prefix of a site-local address is FEC0::/10.

Note:  Site-local addresses have been deprecated, but existing implementations can still continue use them.

Thus, they will probably stay around for a while.

The proper way to work with private addresses in IPv6 is the use of unique local addresses which I will discuss in my next post.

 

Link-local addresses  FE80

From IPv4, you might know APIPA (Automatic Private IP Addressing) or AutoNet.

Whenever automatic IP configuration through DHCP fails, Windows automatically assigns an autoconfiguration address in the range 169.254.0.1 to 169.254.255.254, which allows the computer to communicate with other machines on the link.

In IPv6, link-local addresses always begin with 1111111010 (FE80).

 

Unlike site-local addresses, link-local addresses are never forwarded by routers and therefore can only be reached on the link.

This is the reason why the next 54 bits are set to 0. The last 64 bits are set randomly by the operating system.

 

There is an important difference between IPv6 link-local addresses and IPv4 APIPA addresses.

Once a PC receives an IPv4 address from a DHCP server, the APIPA address is no longer reachable.

However, with IPv6, a network interface always has a link-local address even if you assign another IPv6 address manually or if the NIC receives an IPv6 address from a DHCP server.

This means that computers on a link can always communicate through IPv6 using link-local addresses, which is not the case in IPv4 because APIPA addresses are not in the same subnet as private or public IPv4 addresses.

Thus, if the local DHCP is unavailable, the computers can still access local services through IPv6 but won’t be able to reach the Internet or services in other links.

 

In the next post of this IPv6 tutorial, I will talk a little about the zone ID and unique local IPv6 unicast addresses.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值