拓扑图如下:
条件三台路由
型号: AR1220
配置命令如下
==============================================
三台路由ipv6地址如下:
AR-1
2001:12::1 64
AR-2:
2001:12::2 64
2001:23::2/64
AR-3:
2001:23::3/64
=============================================
AR-1命令如下
<Huawei>system-view //进系统视图
[Huawei]sysname AR-1 //修改主机名
[AR-1]ipv6 //在系统视图上敲一下ipv6命令
[AR-1]int g0/0/0 //进g0/0/0接口
[AR-1-GigabitEthernet0/0/0]ipv6 enable //开启ipv6
[AR-1-GigabitEthernet0/0/0]ipv6 address 2001:12::1 64 //配置ipv6地址和掩码
启用ospfv3命令如下
[AR-1]ospfv3 1 //在系统视图上敲ospfv3 1
[AR-1-ospfv3-1]router-id 1.1.1.1 //设置个ID名为1.1.1.1
[AR-1-ospfv3-1]q //退到系统视图
[AR-1]int g0/0/0 //进g0/0/0接口
[AR-1-GigabitEthernet0/0/0]ospfv3 1 area 0 //在接口上配置ospfv3 1 并设置骨干区域
===========================================
AR-2命令如下
<Huawei>system-view //进系统视图
[Huawei]sysname AR-2 //修改主机名
[AR-2]ipv6 //在系统视图上敲一下ipv6命令
[AR-2-GigabitEthernet0/0/1]ipv6 enable //开启ipv6
[AR-2-GigabitEthernet0/0/1]ipv6 address 2001:12::2 64 //配置ipv6地址和掩码
[AR-2-GigabitEthernet0/0/1]int g0/0/0 //切换接口
[AR-2-GigabitEthernet0/0/0]ipv6 enable //开启ipv6
[AR-2-GigabitEthernet0/0/0]ipv6 address 2001:23::2 64 //配置ipv6地址和掩码
启用ospfv3命令如下
[AR-2]ospfv3 1 //在系统视图上敲ospfv3 1
[AR-2-ospfv3-1]router-id 2.2.2.2 //设置个ID名为2.2.2.2
[AR-2-ospfv3-1]q //退到系统视图
[AR-2]int g0/0/1 //进g0/0/1接口
[AR-2-GigabitEthernet0/0/1]ospfv3 1 area 0 //在系统视图上敲ospfv3 1 并设置骨干区域0
[AR-2-GigabitEthernet0/0/1]int g0/0/0 //切换接口
[AR-2-GigabitEthernet0/0/0]ospfv3 1 area 1 //在系统视图上敲ospfv3 1 并设置非骨干区域1
========================================================
AR-3命令如下
<Huawei>system-view //进系统视图
[Huawei]sysname AR-3 //修改主机名
[AR-3]ipv6 //在系统视图上敲一下ipv6命令
[AR-3]int g0/0/1 //进g0/0/1接口
[AR-3-GigabitEthernet0/0/1]ipv6 enable //开启ipv6
[AR-3-GigabitEthernet0/0/1]ipv6 address 2001:23::3 64 //配置ipv6地址和掩码
启用ospfv3命令如下
[AR-3]ospfv3 1 //在系统视图上敲ospfv3 1
[AR-3-ospfv3-1]router-id 3.3.3.3 //在系统视图上敲ospfv3
[AR-3-ospfv3-1]q //退到系统视图
[AR-3]int g0/0/1 //进g0/0/1接口
[AR-3-GigabitEthernet0/0/1]ospfv3 1 area 1 //在接口上配置ospfv3 1 并设置非骨干区域1
===========================================================
查看ipv6地址命令如下:
[AR-1]dis ipv6 interface brief //此命令查看ipv6地址
Interface Physical Protocol
GigabitEthernet0/0/0 up up
[IPv6 Address] 2001:12::1
验证测试如下:
在AR-2上查看ospfv3 邻接表
[AR-2]display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/DR 00:00:38 GE0/0/1 0
OSPFv3 Area (0.0.0.1)
Neighbor ID Pri State Dead Time Interface Instance ID
3.3.3.3 1 Full/Backup 00:00:37 GE0/0/0 0
============================================
测试ping ipv6
[AR-1]ping ipv6 2001:23::3
PING 2001:23::3 : 56 data bytes, press CTRL_C to break
Reply from 2001:23::3
bytes=56 Sequence=1 hop limit=63 time = 60 ms
Reply from 2001:23::3
bytes=56 Sequence=2 hop limit=63 time = 40 ms
Reply from 2001:23::3
bytes=56 Sequence=3 hop limit=63 time = 50 ms
Reply from 2001:23::3
bytes=56 Sequence=4 hop limit=63 time = 30 ms
Reply from 2001:23::3
bytes=56 Sequence=5 hop limit=63 time = 30 ms--- 2001:23::3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/42/60 ms