一、 实验要求及思路:

1. 使用eNSP模拟器搭建试验环境(拓扑如下),

2. 核心网配置ospf v3路由协议,R2R3配置VRRP ipv6

3. IP地址采用ipv6版本,PC机采用手动配置IPv6地址2001:DB8:C703:4416::4/64

4. 要求配置全网互通,VRRP实现冗余备份

 

二、 实验拓扑:

 

 

 

三、 IP地址规划:

R1

G0/0/0

12::1/64

G0/0/1

13:1/64

LO 0

11::1/64

R2

G0/0/0

23::2/64

G0/0/1

2001:DB8:C703:4416::2/64

G0/0/2

12::2/64

R3

G0/0/0

23::3/64

G0/0/1

2001:DB8:C703:4416::3/64

G0/0/2

13::3/64

 

 

 

 

 

四、 配置文件及步骤:

 

1.  R1的配置

 

1) IP配置

sy

[Huawei]sysname R1

[R1]ipv6  //开启路由器IPv6报文转发功能

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ipv6 enable  //开启路由器接口IPv6报文转发功能

[R1-GigabitEthernet0/0/0]ipv6 address 12::1 64  //配置接口的全球单播ipv6地址

[R1-GigabitEthernet0/0/0]undo shut

[R1]int g0/0/1

[R1-GigabitEthernet0/0/1]ipv6 enable

[R1-GigabitEthernet0/0/1]ipv6 address 13::1 64

[R1-GigabitEthernet0/0/1]undo shut

[R1-GigabitEthernet0/0/1]int lo 0

[R1-LoopBack0]ipv6 enable

[R1-LoopBack0]ipv6 address 11::1 64

[R1-LoopBack0]display ipv6 int b

 

 

2) 路由配置

 

[R1]ospfv3  //启动OSPFv3,进入OSPFv3视图

[R1-ospfv3-1]router-id 1.1.1.1  //配置Router ID

[R1-ospfv3-1]q

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ospfv3 1 area 0 //在接口上启用

Ospfv3,并让其属于区域0

[R1-GigabitEthernet0/0/0]int g0/0/1

[R1-GigabitEthernet0/0/1]ospfv3 1 area 0

[R1-GigabitEthernet0/0/1]int lo 0

[R1-LoopBack0]ospfv3 1 area 0

[R1-LoopBack0]q

 

display ospfv3 peer

 

display ospfv3 routing

 

 

 

2. R2的配置

 

1) IP配置

sy

[Huawei]sysname R2

[R2]ipv6

[R2]int g0/0/2

[R2-GigabitEthernet0/0/2]ipv6 enable

[R2-GigabitEthernet0/0/2]ipv6 address 12::2 64

[R2-GigabitEthernet0/0/2]undo shut

[R2-GigabitEthernet0/0/2]int g0/0/0

[R2-GigabitEthernet0/0/0]ipv6 enable

[R2-GigabitEthernet0/0/0]ipv6 address 23::2 64

[R2-GigabitEthernet0/0/0]undo shut

[R2-GigabitEthernet0/0/0]int g0/0/1

[R2-GigabitEthernet0/0/1]ipv6 enable

[R2-GigabitEthernet0/0/1]ipv6 address fe80::2 link-local  //手动配置接口的链路本地地址

[R2-GigabitEthernet0/0/1]undo shut

[R2-GigabitEthernet0/0/1]ipv6 addr 2001:DB8:C703:4416::2 64  //配置接口的全球单播ipv6地址

[R2-GigabitEthernet0/0/1]undo shut

[R2-GigabitEthernet0/0/1]undo ipv6 nd ra halt  //开启RA消息发布的功能,以便客户机获得路由设备的RA报文消息

[R2]display ipv6 int b

 

 

2) 路由配置

 

[R2]ospfv3

[R2-ospfv3-1]router-id 2.2.2.2

[R2-ospfv3-1]q

[R2]int g0/0/2

[R2-GigabitEthernet0/0/2]ospfv3 1 area 0

[R2-GigabitEthernet0/0/2]int g0/0/1

[R2-GigabitEthernet0/0/1]ospfv3 1 area 0

[R2-GigabitEthernet0/0/1]int g0/0/0

[R2-GigabitEthernet0/0/0]ospfv3 1 area 0

[R2-GigabitEthernet0/0/0]q

[R2]display ospfv3 peer

 

[R2]display ospfv3 routing

 

3) ipv6 vrrp

 

[R2]int g0/0/1

[R2-GigabitEthernet0/0/1]vrrp6 vrid 1 virtual-ip fe80::1 link-local  //创建备份组,并配置虚拟ipv6地址(飘移地址)为链路本地地址

[R2-GigabitEthernet0/0/1]vrrp6 vrid 1 virtual-ip 2001:DB8:C703:4416::1  //创建备份组,并配置虚拟ipv6地址(飘移地址)为全球单播地址

 

[R2-GigabitEthernet0/0/1]vrrp6 vrid 1 priority 115  //设置优先级为115(默认是100,监听的上行口每挂一个就减10,这里要求当G0/0/2G0/0/0都挂了的时候才被BACKUP抢占),让路由器R2成为master负责转发数据流量

[R2-GigabitEthernet0/0/1]vrrp6 vrid 1 preempt-mode timer delay 0  //设置抢占时间为0,即立即抢占,默认就是0可不输入这条命令

[R2-GigabitEthernet0/0/1] vrrp6 vrid 1 track int g0/0/2  //监听上行口

[R2-GigabitEthernet0/0/1] vrrp6 vrid 1 track int g0/0/0 //监听上行口

[R2]display vrrp6 b

 

 

 

 

3. R3的配置

 

1) IP配置

sy

[Huawei]sysname R3

[R3]ipv6

[R3]int g0/0/2

[R3-GigabitEthernet0/0/2]ipv6 enable

[R3-GigabitEthernet0/0/2]ipv6 address 13::3 64

[R3-GigabitEthernet0/0/2]undo shut

[R3-GigabitEthernet0/0/2]q

[R3]int g0/0/0

[R3-GigabitEthernet0/0/0]ipv6 enable

[R3-GigabitEthernet0/0/0]ipv6 address 23::3 64

[R3-GigabitEthernet0/0/0]undo shut

[R3]int g0/0/1

[R3-GigabitEthernet0/0/1]ipv6 enable

[R3-GigabitEthernet0/0/1]ipv6 address fe80::3 link-local  

[R3-GigabitEthernet0/0/1]ipv6 addr 2001:DB8:C703:4416::3 64

[R3-GigabitEthernet0/0/1]undo shut

[R3-GigabitEthernet0/0/1]undo ipv6 nd ra halt

[R3]display ipv6 int b

 

 

2) 路由配置

 

[R3]ipv6

[R3]ospfv3

[R3-ospfv3-1]router

[R3-ospfv3-1]router-id 3.3.3.3

[R3-ospfv3-1]q

[R3]int g0/0/2

[R3-GigabitEthernet0/0/2]ospfv3 1 a

[R3-GigabitEthernet0/0/2]ospfv3 1 area 0

[R3-GigabitEthernet0/0/2]int g0/0/1

[R3-GigabitEthernet0/0/1]ospfv3 1 area 0

[R3-GigabitEthernet0/0/1]int g0/0/0

[R3-GigabitEthernet0/0/0]ospfv3 1 area 0

[R3-GigabitEthernet0/0/0]q

[R3]display ospfv3 peer

 

 

[R3]display ospfv3 routing

 

 

 

 

3) ipv6 vrrp

 

[R3]int g0/0/1

[R3-GigabitEthernet0/0/1]vrrp6 vrid 1 virtual-ip fe80::1 link-local

[R3-GigabitEthernet0/0/1]vrrp6 vrid 1 virtual-ip 2001:DB8:C703:4416::1

[R3-GigabitEthernet0/0/1]vrrp6 vrid 1 preempt-mode timer delay 0

[R3]display vrrp6 b

 

 

 

 

五、 结果验证 :

 

 

 

Ping R1环回口的

 

跟踪路由

 

 

 

 

R2g0/0/2g0/0/0shut,先查看vrrp6的状态

 

 

 

再跟踪到R1环回口111的路由

 

在实验过程中曾出现master路由器R2在上行 down且优先级比R3小的时候, vrrp状态依然是master,同时R3也是master,这就有了2master,

原因可能是:一是延迟,二是模拟器问题