【实验说明】
在R1与R2之间以太网地址上使用IPv6 link-local地址,其中link-local的主机位使用Modified EUI-64格式地址。
【实验拓扑】
【实验配置步骤】
在R1与R2的以太网接口上启用IPv6
使用link-local地址验证R1与R2的连通性
【实验分析】
IPv6中的 link-local, site-local, and global unicast 地址的区别?
如何查看link-local地址
什么是 EUI-64 地址,它设计的目的和作用是什么?
【实验配置】
R1 & R2:
interface FastEthernet0/0
ipv6 enable
no shutdown
【实验验证】
R1#show int f0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is cc00.460c.0000 (bia cc00.460c.0000)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:06, output 00:00:02, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 1000 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
14 packets input, 2072 bytes
Received 14 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
16 packets output, 2192 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
R1#show ipv6 interface f0/0
FastEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::CE00:46FF:FE0C:0
No global unicast address is configured
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF0C:0
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
R2#show ipv6 interface fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::CE01:46FF:FE0C:0
No global unicast address is configured
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF0C:0
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
R1#ping FE80::CE01:46FF:FE0C:0
Output Interface: FastEthernet0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::CE01:46FF:FE0C:0, timeout is 2 seconds:
Packet sent with a source address of FE80::CE00:46FF:FE0C:0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/30/68 ms
【实验总结】
- IPv6的 link-local 地址是一个以 1111111010, 或者FE80::/10 开头的IPv6格式的地址。
- 本地链路地址,有“链路本地范围”之称,这意味着数据包源自或去往一个链路本地地址不能离开本地链路。
- 本地链路地址使用ICMPv6来发现邻居,用于在未配置全局单播地址时通过自动配置实现设备之间通信,以及重复地址监测。
- 当在接口上启用IPv6或者配置了IPv6全区单播或任播地址时,link-local 地址将使用以FE80::/64开头的 Modified EUI-64主机地址。
- link-local地址也可以手工配置,如下面输出结果所示
R1(config-if)#ipv6 address ?WORD General prefix nameX:X:X:X::X IPv6 link-local addressX:X:X:X::X/<0-128> IPv6 prefixautoconfig Obtain address using autoconfiguration
- Modified EUI-64地址来自于路由器的以太网接口的MAC地址,如果没有以太网接口,选用本路由器中其他接口最小的MAC地址(如串行或隧道接口)。
- EUI-64地址是如何来的
- 首先FFEE插入到MAC地址的中间
- 64位的MAC地址中的第七位翻转(0和1互换)
因此R1的本地链路地址为FE80::CE00:46FF:FE0C:0
cc00.46 0c.0000
FE80::CE00:46FF:FE0C:0
CC -->11001100
CE -->11001110
FF:FE 被插入的字段
CE 被转换的字段
FE80::被加入的开头
00.460c.0000 原有没发生变化的MAC地址
本文转自zcm8483 51CTO博客,原文链接:http://blog.51cto.com/haolun/992242