1.地址解析
1)R1配置
[R1]ipv6
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ipv6 enable
[R1-GigabitEthernet0/0/0]ipv6 address 2001:12::1 64
2)R2配置
[R2]ipv6
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ipv6 enable
[R2-GigabitEthernet0/0/0]ipv6 address 2001:12::2 64
3)R1、R2连通性测试
[R1]ping ipv6 2001:12::2
PING 2001:12::2 : 56 data bytes, press CTRL_C to break
Reply from 2001:12::2
bytes=56 Sequence=1 hop limit=64 time = 60 ms
4)抓包查看NS、NA
2.跟踪邻居状态
(RFC2461中定义了5种邻居状态,分别是:未完成(INCOMPLETE)、可达(REACHABLE)、陈旧(STALE)、延迟(DELAY)、探查(PROBE))
1)R1、R2未通信,查看邻居,无表项
[R1]display ipv6 neighbors
2)R1、R2连通性测试
[R1]ping ipv6 2001:12::2
PING 2001:12::2 : 56 data bytes, press CTRL_C to break
Reply from 2001:12::2
bytes=56 Sequence=1 hop limit=64 time = 70 ms
3)R1查看邻居(可达reachabl)
[R1]display ipv6 neighbors
[R1]display ipv6 neighbors
IPv6 Address : 2001:12::2
Link-layer : 00e0-fc9b-25af State : REACH
Interface : GE0/0/0 Age : 0
VLAN : - CEVLAN: -
VPN name : Is Router: TRUE
4)R2查看邻居(未知stale)
[R2]display ipv6 neighbors
IPv6 Address : 2001:12::1
Link-layer : 00e0-fcb1-6158 State : STALE
Interface : GE0/0/0 Age : 1
VLAN : - CEVLAN: -
VPN name : Is Router: TRUE
Secure FLAG : UN-SECURE
5)R1、R2连通性测试
[R1]ping ipv6 2001:12::2
PING 2001:12::2 : 56 data bytes, press CTRL_C to break
Reply from 2001:12::2
bytes=56 Sequence=1 hop limit=64 time = 40 ms
6)在stale状态下,如果AR1向AR2发送数据,则邻居状态变为由未知(stale)变为延时(Delay)
[R2]display ipv6 neighbors
IPv6 Address : 2001:12::1
Link-layer : 00e0-fcb1-6158 State : DELAY
Interface : GE0/0/0 Age : 2
VLAN : - CEVLAN: -
VPN name : Is Router: TRUE
3.重复地址检测DAD
1)R1配置
[R1]ipv6
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ipv6 enable
[R1-GigabitEthernet0/0/0]ipv6 address 2123::1 64
2)R2配置
[R2]ipv6
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ipv6 enable
[R2-GigabitEthernet0/0/0]ipv6 address 2123::2 64
3)R3配置
[R3]ipv6
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ipv6 enable
[R3-GigabitEthernet0/0/0]ipv6 address 2123::2 64
4)R3抓包
源IP为"::",表示R3还未获取到地址,目的IP为要检测的单播IPV6地址2123::2对应的被请求节点组播地址。FF02::1:FF00:2,MAC地址为对应的3333-FF00-0002。
5)R2抓包
源IP为2123::2/64 目的IP为FF02::1(IPV6所有节点组播地址)。源MAC为自己,目的MAC为目的IP对应的组播MAC,AR3收到报文后,发现改地址已经被使用,则放弃使用该地址。
4.路由发现
1)默认情况下,路由器发布RA报文是处于抑制状态(也就是不发送),避免占用链路带宽,需要使用命令undo ipv6 nd ra halt,解除抑制RA报文发送。
[R1]ipv6
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ipv6 enable
[R1-GigabitEthernet0/0/0]ipv6 address 2001::1 64
[R1-GigabitEthernet0/0/0]undo ipv6 nd ra halt
2)R1抓包查看信息
type=134.路由器会周期发送RA报文,里面包含前缀2001::/64,报文的源IP为R1的G0/0/0的链路本地地址,目的IPV6地址为FF02::1所有节点组播地址;源MAC是R1的MAC,目的MAC是目的IP对应的组播MAC(3333-0000-0001)
3)RA报文中的Flags字段
4)前缀字段里面的Flags
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容