OSPFv3实验配置(GNS3)
实验目的
1. 掌握 OSPFv3(v2) 的配置方法
2. 掌握在帧中继环境下 OSPFv3 (v2)的配置方法
3. 掌握 OSPFv3(v2) NSSA 的配置方法
4. 掌握外部路由汇总的配置
5. 掌握区域间路由的汇总配置
实验拓扑图

IPv4地址表
|
Device |
Interface |
IP Address |
|
R1 |
F 0/0 |
10.1.81.1 |
|
S 1/0 |
192.168.81.1 |
|
|
R3 |
S 1/0 |
192.168.81.3 |
|
R4 |
S 1/0 |
192.168.81.4 |
|
R5 |
F 0/0 |
10.1.81.5 |
|
S 1/0 |
12.1.81.5 |
|
|
R6 |
F 0/0 |
10.1.81.6 |
|
F 0/1 |
11.1.81.6 |
|
|
R8 |
F 0/1 |
11.1.81.8 |
|
S 1/0 |
12.1.81.8 |
步骤1:开启帧中继交换功能
R2(config)#frame-relay switching
步骤2:配置接口封装
R2(config)#int s 1/2
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000
R2(config-if)#encapsulation frame-relay
R2(config)#int s 1/0
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000
R2(config-if)#encapsulation frame-relay
R2(config)#int s 1/1
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000
R2(config-if)#encapsulation frame-relay
(3) 步骤3:配置LMI类型
R2(config)#int s 1/2
R2(config-if)#frame-relay lmi-type cisco
R2(config-if)#frame-relay intf-type dce
R2(config)#int s 1/0
R2(config-if)#frame-relay lmi-type cisco
R2(config-if)#frame-relay intf-type dce
R2(config)#int s 1/1
R2(config-if)#frame-relay lmi-type cisco
R2(config-if)#frame-relay intf-type dce
(4) 步骤4:配置帧中继交换表
R2(config)#int s 1/2
R2(config-if)#frame-relay route 103 interface s 1/0 301
R2(config-if)#frame-relay route 104 interface s 1/1 401
R2(config)#int Serial 1/0
R2(config-if)#frame-relay route 301 interface Serial1/2 103
R2(config)#int Serial 1/1
R2(config-if)#frame-relay route 401 interface Serial1/2 104
此时“show frame-relay route”
检查帧中继交换机是否正常

(5)步骤5:配置R1、R3、R4,使得它们能够互相通信
R1(config)#int s 1/0
R1(config-if)#ip address 192.168..81.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#encapsulation frame-relay
R1(config-if)#frame-relay lmi-type cisco
R1(config-if)#no frame-relay inverse-arp //关闭自动映射
R1(config-if)#frame-relay map ip 192.168.81.3 103 broadcast
R1(config-if)#frame-relay map ip 192.168.81.4 104 broadcast
R3(config)#int s 1/0
R3(config-if)#ip address 192.168.81.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#encapsulation frame-relay
R3(config-if)#no frame-relay inverse-arp
R3(config-if)#frame-relay map ip 192.168.81.1 301 broadcast
R4(config)#int s 1/0
R4(config-if)#ip address 192.168.81.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#encapsulation frame-relay
R4(config-if)#no frame-relay inverse-arp
R4(config-if)#frame-relay map ip 192.168.81.1 401 broadcast
进行ping命令测试
从R1ping到R3与R4

R1#show frame-relay PVC
发现已有两条本地连接

步骤6:开始配置ospf
先配置外部路由器ospf (R6、R1为例,R5.R8同理)
R6(config)#router ospf 1
R6(config-router)#router-id 6.6.6.6
R6 (config-router)#area 1 nssa――配置区域 1 为 NSSA 区域
R6(config)#interface loopback 0
R6(config-if)#ip add 6.6.6.6 255.255.255.255
R6(config)#int f 0/0
R6(config-if)#ip add 10.1.81.6 255.255.255.0
R6(config-if)#no shut
R6(config-if)#ip ospf 1 area 0
R6(config-if)#int f 0/1
R6(config-if)#ip add 11.1.81.6 255.255.255.0
R6(config-if)#no shut
R6(config-if)#ip ospf 1 area 1
R6(config-if)#ex
R6(config)#router ospf 1
R6(config-router)#network 6.6.6.6 0.0.0.0 area 0
R6(config-router)#network 10.1.81.0 0.0.0.255 area 0
R6(config-router)#network 11.1.81.0 0.0.0.255 area 1
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config)#interface loopback 0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config)#int f 0/0
R1(config-if)#ip add 10.1.81.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#ip ospf 1 area 0
R1(config-if)#int s 1/0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#ex
R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 10.1.81.0 0.0.0.255 area 0
R1(config-router)#network 192.168.81.0 0.0.0.255 area 2
R1(config-router)#neighbor 192.168.81.3
R1(config-router)#neighbor 192.168.81.4
步骤7:配置帧中继中路由器的ospf (R3为例,R4同理)
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#ex
R3(config)#int loopback 0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#ip ospf 1 area 2
R3(config-if)#int s 1/0
R3(config-if)# ip ospf 1 area 2
R3(config-if)# ip ospf priority 0
R3(config)#router ospf 1
R3(config-router)#network 3.3.3.3 0.0.0.0 area 2
R3(config-router)#network 192.168.81.0 0.0.0.255 area 2
已完成OSPFv2配置,在R1上查ospf邻居关系
R1#show ipv6 ospf neighbor

测试路由通断情况
在R5上测试得出结果如下(从内部到外部皆ping通,实验完成)

因为RIPNG是针对IPV6设计的一种路由协议,不支持IPV4,所以在OSPFv2里并没有做RIPNG路由配置。
Ospfv3配置

IPv6地址表
|
Device |
Interface |
IPv6 Address |
|
R1 |
F 0/0 |
2123::81:1/64 |
|
S 1/0.1 |
2356::81:1/64 |
|
|
Loopback 0 |
2011::1/128 |
|
|
R3 |
S 1/0.1 |
2356::81:3/64 |
|
Loopback 0 |
2033::1/128 |
|
|
R3 |
S 1/0.1 |
2356::81:3/64 |
|
Loopback 0 |
2044::1/128 |
|
|
R5 |
F 0/0 |
2123::81:5/64 |
|
S 1/0 |
2027::81:5/64: |
|
|
Loopback 0 |
2055::1/128 |
|
|
R6 |
F 0/0 |
2123::81:6/64 |
|
Loopback 0 |
2066::1/128 |
|
|
Loopback 1 |
2166::1/128 |
|
|
R8 |
S 1/0 |
2027::81:8/64: |
|
Loopback 0 |
2088::1/128 |
帧中继R2配置与ospfv2相同。
1.完成接口 IPv6 地址的配置,注意不要忘记配置 loopback0
R1(config)#ipv6 unicast-routing ―――全局打开 IPv6 路由功能
R1config)#interface loopback 0
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2011::1/128―――配置 loopback0 接口地址
R1(config-if)#int f 0/0
R1(config-if)#ipv6 enable
R1(config-if)# ipv6 address 2123::81:1/64
R1(config-if)#no shut
R1(config-if)#int s 1/0
R1(config-if)#ipv6 enable
R1(config-if)# encapsulation frame-relay
R1(config-if)#no shut
R1(config)#interface serial 1/0.1 multipoint
R1(config-subif)#ipv6 address 2356::81:1/64
R1(config-subif)#frame-relay map ipv6 2356::81:3 103 broadcast
R1(config-subif)#frame-relay map ipv6 2356::81:4 104 broadcast
R1(config-subif)#frame-relay map ipv6 2356::81:1 104 broadcast
R1(config-subif)#frame-relay map ipv6 FE80::C804:1CFF:FE48:8 104 broadcast
R1(config-subif)#frame-relay map ipv6 FE80::C803:1CFF:FE48:8 103 broadcast
R3(config)#ipv6 unicast-routing
R3(config)#interface loopback 0
R3(config-if)#ipv6 address 2033::1/128
R3(config-if)#int s 1/0
R3(config-if)#ipv6 enable
R3(config-if)# encapsulation frame-relay
R3(config-if)#no shutdown
R3(config)#interface serial 1/0.1 multipoint
R3(config-subif)#ipv6 address 2356::81:3/64
R3(config-subif)#frame-relay map ipv6 2356::81:1 301 broadcast
R3(config-subif)#frame-relay map ipv6 2356::81:4 301 broadcast
R3(config-subif)#frame-relay map ipv6 2356::81:3 301 broadcast
R3(config-subif)#frame-relay map ipv6 FE80::C804:1CFF:FE48:8 304 broadcast
R3(config-subif)#frame-relay map ipv6 FE80::C801:1CFF:FE48:8 301 broadcast
R4(config)#ipv6 unicast-routing
R4(config)#interface loopback 0
R4(config-if)#ipv6 address 2044::1/128
R4(config-if)#int s 1/0
R4(config-if)#ipv6 enable
R4(config-if)# encapsulation frame-relay
R4(config-if)#no shutdown
R4(config)#interface serial 1/0.1 multipoint
R4(config-subif)#ipv6 address 2356::81:4/64
R4(config-subif)#frame-relay map ipv6 2356::81:1 401 broadcast
R4(config-subif)#frame-relay map ipv6 2356::81:4 401 broadcast
R4(config-subif)#frame-relay map ipv6 2356::81:3 401 broadcast
R4(config-subif)#frame-relay map ipv6 FE80::C803:1CFF:FE48:8 403 broadcast
R4(config-subif)#frame-relay map ipv6 FE80::C801:1CFF:FE48:8 401 broadcast
试R1上ping通 R3.R4

用show frame-relay pvc命令查看,帧中继配置完成

2. 按实验拓扑图标识的区域,完成 OSPFv3 的基本配置。区域 1 为 NSSA 区域。
R6(config)#ipv6 unicast-routing
R6(config)#ipv6 router ospf 1―――启动 OSPFv3 进程
R6(config-rtr)#router-id 6.6.6.6
R6(config-rtr)#area 1 nssa――配置区域 1 为 NSSA 区域
R6(config-rtr)#int f 0/0
R6(config-if)#ipv6 enable
R6(config-if)# ipv6 ospf 1 area 0
R6(config-if)#no shutdown
R6(config-if)#int loopback 0
R6(config-if)#ipv6 enable
R6(config-if)#ipv6 address 2066::1/128
R6(config-if)# ipv6 ospf 1 area 0
R6(config-if)#int f 0/1
R6(config-if)#ipv6 enable
R6(config-if)# ipv6 ospf 1 area 1
R6(config-if)#no shutdown
R5(config)#ipv6 unicast-routing
R5(config)#ipv6 router ospf 1―――启动 OSPFv3 进程
R5(config-rtr)#router-id 5.5.5.5
R5(config-rtr)#area 1 nssa――配置区域 1 为 NSSA 区域
R5(config-rtr)#int f 0/0
R5(config-if)#ipv6 enable
R5(config-if)# ipv6 ospf 1 area 0
R5(config-if)#no shutdown
R5(config-if)#int loopback 0
R5(config-if)#ipv6 enable
R5(config-if)#ipv6 address 2055::1/128
R5(config-if)# ipv6 ospf 1 area 0
R5(config-if)#int s 1/0
R5(config-if)#ipv6 enable
R5(config-if)# ipv6 ospf 1 area 1
R5(config-if)#no shutdown
R1(config)#ipv6 unicast-routing
R1(config)#ipv6 router ospf 1―――启动 OSPFv3 进程
R1(config-rtr)#router-id 1.1.1.1
R1(config-rtr)#int f 0/0
R1(config-if)#ipv6 enable
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)#no shutdown
R1(config-if)#int loopback 0
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2011::1/128
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)#int s 1/0.1
R1(config-subif)#ipv6 enable
R1(config-subif)# ipv6 ospf 1 area 2
R1(config-subif)#ipv6 ospf neighbor FE80::C803:1CFF:FE48:8
R1(config-subif)#ipv6 ospf neighbor FE80::C804:1CFF:FE48:8
R1(config-subif)# ipv6 address FE80::C801:1CFF:FE48:8 link-local
R3(config)#ipv6 router ospf 1
R3(config-rtr)#router-id 5.5.5.5
R3(config-rtr)#int loopback 0
R3(config-if)#ipv6 enable
R3(config-if)#ipv6 address 2033::1/128
R3(config-if)# ipv6 ospf 1 area 2
R3(config-if)#int s 1/0.1
R3(config-subif)#ipv6 enable
R3(config-subif)# ipv6 ospf 1 area 2
R3(config-subif)# ipv6 ospf priority 0
R3(config-subif)# ipv6 address FE80::C803:1CFF:FE48:8 link-local
R4config)#ipv6 router ospf 1
R4config-rtr)#router-id 4.4.4.4
R4config-rtr)#int loopback 0
R4config-if)#ipv6 enable
R4(config-if)#ipv6 address 2044::1/128
R4(config-if)# ipv6 ospf 1 area 2
R4(config-if)#int s 1/0.1
R4(config-subif)#ipv6 enable
R4(config-subif)# ipv6 ospf 1 area 2
R4(config-subif)# ipv6 ospf priority 0
R4(config-subif)# ipv6 address FE80::C804:1CFF:FE48:8 link-local
R8(config)#ipv6 unicast-routing
R8(config)#ipv6 router ospf 1―――启动 OSPFv3 进程
R8(config-rtr)#router-id 8.8.8.8
R8(config-rtr)#area 1 nssa――配置区域 1 为 NSSA 区域
R8(config-rtr)#int s 1/0
R8(config-if)#ipv6 enable
R8(config-if)# ipv6 ospf 1 area 1
R8(config-if)#no shutdown
R8(config-if)#int loopback 0
R8(config-if)#ipv6 enable
R8(config-if)#ipv6 address 2088::1/128
R8(config-if)# ipv6 ospf 1 area 1
R8(config-if)#int f 0/1
R8(config-if)#ipv6 enable
R8(config-if)# ipv6 ospf 1 area 1
R8(config-if)#no shutdown
3.检查 OSPFv3 的邻居关系
在 R31上检查,可以看到邻居的 Router-ID 都是用 IPv4 的地址格式标识
R1#show ipv6 ospf neighbor

4.测试路由通断情况在R3测试,Ospfv3配置成功。

本实验步骤引入外部路由类型 5 和外部路由类型 7
1) 在 R6 上新增加一个 loopback1 接口,地址为 2166::1/128,然后重分布进入 OSPFv3
R6(config)#interface loopback 1
R6(config-if)#ipv6 address 2166::1/128
R6(config-if)#exit
R6(config)#ipv6 router ospf 1
R6(config-rtr)#redistribute connected
配置 R7 和 R8 的 RIPng,然后重分布 RIPng 到 OSPFv3
R7(config)#ipv6 router rip yeslab
R7(config-rtr)#exit
R7(config)#interface fastEthernet 0/0
R7(config-if)#ipv6 rip yeslab enable
R7(config-if)#exit
R8(config)#ipv6 router rip yeslab
R8(config-rtr)#exit
R8(config)#interface fastEthernet 0/0
R8(config-if)#ipv6 rip yeslab enable
R8(config-if)#exit
R8(config)#ipv6 router ospf 1
R8(config-rtr)#redistribute rip yeslab―――重分布 RIPng 到 OSPFv3
R8(config-rtr)#redistribute connected―――由于重分布 RIPng,不能把连接 R8 的接口网段重分布进入OSPFv3,因此重分布直连,把连接 R8 的网段重分布到 OSPFv3
OSPFv3实验配置(GNS3)的更多相关文章
- OSPFv3综合实验(GNS3)
一.实验目的 1. 掌握 OSPFv3(v2) 的配置方法 2. 掌握在帧中继环境下 OSPFv3 (v2)的配置方法 3. 掌握 OSPFv3(v2) NSSA 的配置方法 4. 掌握外部路 ...
- 详解eNSP下的单臂路由模拟实验配置
不同VLAN之间的通信可以通过两种方式:单臂路由和三层交换机.其中,单臂路由是通过路由子接口,交换机的某个端口以trunk的方式与路由器的某个端口相连,同时路由器的链接端口配置子接口,配置子接口承载的 ...
- ipv6地址配置实验(GNS3/ENSP)
实验拓扑: IPV6地址配置如图所示, 配置ipv6指令(以R2为例,R1类似): int e1/2 R2(config-if)#ipv6 address 2001:db08:acad:1::2/64 ...
- “大地主”IPv6的地址实验配置
上一篇文章,我们简单的介绍了一下IPv6协议的邻居发现BD和简单的基础配置,这里我们通过实验观察一下 IPv6邻居发现中会发送的报文,顺便熟悉一下,新的地址配置 根据拓扑图配置地址 这里原理和IPv4 ...
- 详解eNSP下的PPP之MP、PAP/CHAP认证实验配置
一.PPP MP实验(用虚拟模板配置) 1.拓扑图
- 一些LVS实验配置、工具和方案
最近做了一些LVS配置和方案的验证实验,将过程中用到的一些配置.工具和具体的解决方案记录一下.使用DR模式.验证一种不中断业务的RealServer升级或者重启方案. 网络规划: 节点 IP地址 ce ...
- ENSP静态链路聚合实验配置要点及实例
链路聚合分为:静态链路聚合.动态链路聚合链路聚合的负载分担模式:对于二层数据流,系统会根据MAC地址(源mac地址和目的mac地址来计算),而对于三层数据流则会根据ip地址来进行负载分担计算. 静态链 ...
- 实验配置cisco单臂路由
第一步 搭建实验拓扑图 第二步 对路由器做基本配置 为路由器创建名称: 设置进入特权模式 口令:控制台登录密码:vty登录密码 禁用DNS查找: 加密明文密码: 创建一个向访问设备者发出警告的标语&q ...
- 【iCore3 双核心板_FPGA】例程四:Tcl脚本实验——配置引脚
实验指导书及代码包下载: http://pan.baidu.com/s/1pJZDz0v iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...
随机推荐
- MySQL:select command denied to user for table 'proc'案例
使用EMS MySQL Manager Pro(3.4.0.1)连接MySQL 5.6.20时,报错:"SELECT command denied to user xxx@xxx.xxx.x ...
- c/c++ 继承与多态 文本查询的小例子(智能指针版本)
为了更好的理解继承和多态,做一个文本查询的小例子. 接口类:Query有2个方法. eval:查询,返回查询结果类QueryResult rep:得到要查询的文本 客户端程序的使用方法: //查询包含 ...
- CG-CTF simple-machine
运行一下,输入flag: 用ida打开: input_length和input_byte_804B0C0为重命名的变量:现在一个个看调用的函数. sub_8048526(): 这个函数使用了mmap分 ...
- flask-cache报错No module named 'flask.ext;解决方案
找到flask-cache包中的jinja2ext.py,将from flask.ext.cache import make_template_fragment_key改为from flask_cac ...
- 五 Struts 配置文件
一.struts.xml详解1.package:包 属性:name=命名 namespace=在action访问路径前面加的前缀 extends=继承另外的包 action:name=action的访 ...
- MyCP.java蓝墨云班课
题目要求: 编写MyCP.java 实现类似Linux下cp XXX1 XXX2的功能,要求MyCP支持两个参数: java MyCP -tx XXX1.txt XXX2.bin 用来把文本文件(内容 ...
- 2019年3月8日_CCF-A类文章分享
3月8日下午3点开始,王利朋老师主持实验室会议,实验室全体人员参加.首先王利朋老师就基全本子存在的问题进行了再一次的说明以及如何修改部分内容, 其次,王利朋老师对近段时间做了相关工作总结和下阶段任务分 ...
- 微信内点击链接或扫描二维码可直接用外部浏览器打开H5链接的解决方案
很多朋友问我怎么解决微信内点击链接或扫描二维码可以直接跳出微信在外部浏览器打开网页链接,其实这并不难,只要我们使用微信跳转浏览器接口实现跳转功能即可. 简单的处理方案 1. 用浏览器打开我们需要用到的 ...
- PHP程序员的成长路线
作为一名PHP程序员,从你入门到现在我相信也学了很多东西,但是有的PHP程序员却是还在第一阶段,那么作为初级PHP程序员我们应该如何弥补自己的不足往中级阶段或者高级阶段发展呢?下面小编就为大家梳理了一 ...
- 【zabbix教程系列】七、自动注册(Windows)
零.页面操作,设置自动注册Windows 配置--->动作--->事件源选为自动注册---->创建动作 填写名称,配置触发条件 主机元数据 值为 Windows 操作 一.Win ...