码迷,mamicode.com
首页 > 其他好文 > 详细

配置IPV6网络

时间:2017-12-17 19:18:24      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:ospf v3   vrrp ipv6   

一、 实验要求及思路:

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配置

<Huawei>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

 

<R1>display ospfv3 peer

技术分享图片 

<R1>display ospfv3 routing

技术分享图片 

 

 

2. R2的配置

 

1) IP配置

<Huawei>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配置

<Huawei>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,

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


配置IPV6网络

标签:ospf v3   vrrp ipv6   

原文地址:http://blog.51cto.com/9674639/2051534

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!