我正在云端建立一个虚拟实验室环境来试验 IPv6 网络。
请耐心等待,我是网络新手,我对整个 IPv6 主题的掌握非常不稳定。如果我误解了任何 IPv6 概念或我的术语错误等,请纠正我。
所以我想要做的是创建一个由唯一本地地址 (ULA) 组成的链接(或子网)。
关于RFC 4193,结构如下:
Prefix FC00::/7 prefix to identify Local IPv6 unicast
addresses.
L Set to 1 if the prefix is locally assigned.
Set to 0 may be defined in the future. See
Section 3.2 for additional information.
Global ID 40-bit global identifier used to create a
globally unique prefix. See Section 3.2 for
additional information.
Subnet ID 16-bit Subnet ID is an identifier of a subnet
within the site.
Interface ID 64-bit Interface ID as defined in [ADDARCH].
我正在努力生成伪随机全局 ID。RFC 4193还指定了一种算法来执行此操作:
The algorithm described below is intended to be used for locally
assigned Global IDs. In each case the resulting global ID will be
used in the appropriate prefix as defined in Section 3.2.
1) Obtain the current time of day in 64-bit NTP format [NTP].
2) Obtain an EUI-64 identifier from the system running this
algorithm. If an EUI-64 does not exist, one can be created from
a 48-bit MAC address as specified in [ADDARCH]. If an EUI-64
cannot be obtained or created, a suitably unique identifier,
local to the node, should be used (e.g., system serial number).
3) Concatenate the time of day with the system-specific identifier
in order to create a key.
4) Compute an SHA-1 digest on the key as specified in [FIPS, SHA1];
the resulting value is 160 bits.
5) Use the least significant 40 bits as the Global ID.
6) Concatenate FC00::/7, the L bit set to 1, and the 40-bit Global
ID to create a Local IPv6 address prefix.
This algorithm will result in a Global ID that is reasonably unique
and can be used to create a locally assigned Local IPv6 address
prefix.
步骤 2) 是我遇到的问题。https://cd34.com/rfc4193/使用 MAC 地址实现 RFC 4193 算法。
但是我使用什么 MAC 地址?
我相信,如果我只使用家用 PC 的物理以太网接口的 MAC 就好了,对吗?如果我理解正确,我只能遇到全局 ID不是唯一的问题,如果有人在完全相同的时间生成具有相同 MAC 地址的全局 ID 。