zoukankan      html  css  js  c++  java
  • IPv6 tutorial – Part 7: Zone ID and unique local IPv6 unicast addresses

    The zone ID is used to distinguish ambiguous link-local and site-local addresses.

    Unique local IPv6 unicast addresses are another way to address the problem of ambiguous IPv6 addresses.

    In the last post of this IPv6 tutorial, I introduced link-local and site-local IPv6 addresses.

    The problem with local-use unicast addresses is that they are not unique because they can be reused.

    Everything is fine as long as duplicate addresses are in networks of different organizations (sites).

    However, within in an organization, local-use addresses can also be assigned multiple times.

    IPv6 zone ID

    Nic is short for Network Interface Card 网卡

    The purpose of zone IDs is to distinguish these addresses.

    For instance, if host A has two NICs that are connected to two different links (subnets),

    the same local-link address could have been used for NIC 1 on host A and on host B

    that[the same local-link address] is on the link of host A’s NIC 2.

    To distinguish this ambiguous link-local address, host A uses the interface index of NIC 1 as the zone ID for the local IP address.

    For site-local addresses, the operating system uses the site ID (also called the scope ID).

    If a host is only connected to one site, this ID is always 1.

    You can display the interface indexes on a host with the command “netsh interface ipv6 show address level=verbose”.

    If you launch the ipconfig command, you can see the local-link and site-local addresses with their zone IDs.

    The syntax for identifying the zone is address%zone_ID.

    This is an example of a link-local IP address with zone ID 11: fe80::bd0f:a8bc:6480:238b%11.

    Note that the zone ID is only known at the local host that assigned it.

    I think in practice you will seldom be bothered with zone IDs as you don’t have to configure them manually.

    Unique local IPv6 unicast address

    Even with the use of zone IDs, you should probably avoid having ambiguous IP addresses in your network.

    Instead of site-local addresses, you can work with unique local IPv6 unicast addresses.

    These local-use addresses are also not routed across the Internet; however, like global IPv6 addresses, they are unique. Well, more or less, as you will soon see.

    The prefix of unique local IPv6 unicast addresses is FC00::/7.

    The eighth bit is the Local flag and is set to 1 for local addresses.

    A Local flag with 0 has not yet been defined.

    Perhaps this could be a way to make local IPv6 addresses global?

    Anyway, until IPv6, creators have made up their mind, the prefix of unique local IPv6 unicast addresses is FD00::/8.

    Don’t worry if you don’t really understand this; all you really have to know about unique local IPv6 unicast addresses is this:

    The next 40 bits are for the global ID and are randomly set.

    The following 16 bits are the subnet ID, which you can use for hierarchical addresses within your organization. As usual, the last 64 bits are the interface ID.

    The trick with the random global ID is that it makes it somewhat unlikely for duplicate local addresses to occur on a site or even in the networks of two merging organizations.

    Actually, the probability that two organizations use the same global ID for their unique local IPv6 addresses is 1/240=9.1 10-13.

    Winning the Lotto jackpot is a few magnitudes more likely.

    However, what the IPv6 creators didn’t take into account is that Murphy’s Law rules墨菲定律 in all networks.

    Hence, “relatively unique local IPv6 unicast addresses” would probably have been a better name.

    In the next post in this IPv6 tutorial, I will discuss the special IPv6 addresses: unspecified address, IPv4-mapped address, 6to4 addresses, IPv6 multicast address, and solicited-node address.

  • 相关阅读:
    多表连接查询
    从0开始独立完成企业级Java电商网站开发(服务端)
    ThreadLocal小试牛刀
    svn版本控制
    策略模式和工厂模式搭配使用
    MyBatis-Plus
    github骚操作
    【测试】 Java如何优雅的生成测试数据
    【随笔】开源之殇
    【Maven】maven 插件开发实战
  • 原文地址:https://www.cnblogs.com/chucklu/p/4838388.html
Copyright © 2011-2022 走看看