OSPF综合实验

拓扑图如下:

 

 

 

地址表如下:

Device

Interface

IP Address

R1

F 0/0

10.1.92.6

F 0/1

12.1.92.5

R2

F 0/0

10.1.92.5

S 1/0

11.1.92.6

R3

F 0/0

10.1.92.1

S 1/0

192.168.92.1

R5

S 1/0

192.168.92.3

R6

S 1/0

192.168.92.4

R7

F 0/0

192.168.92.7

F 0/1

12.1.92.8

S 1/0

11.1.92.8

R8

F 0/0

192.168.92.8

 

 

 

 

 

配置过程

首先配置帧中继交换机

把R4当成帧中继交换机

步骤1:开启帧中继交换功能

R4(config)#frame-relay switching

步骤2:配置接口封装

给端口1/0,1/1,1/2用相同方法进行配置,以1/0为例

R4(config)#int s 1/0

R4(config-if)#no shutdown

R4(config-if)#clock rate 128000   

R4(config-if)#encapsulation frame-relay

步骤3:配置LMI类型

给端口1/0,1/1,1/2用相同方法进行配置,以1/0为例

R4(config)#int s 1/0

R4(config-if)#frame-relay lmi-type cisco

R4(config-if)#frame-relay intf-type dce

步骤4:配置帧中继交换表

R4(config)#int s 1/2

R4(config-if)#frame-relay route 103 interface s 1/0 301

R4(config-if)#frame-relay route 104 interface s 1/1 401

 

R4(config)#int Serial 1/0

R4(config-if)#frame-relay route 301 interface Serial1/2 103

 

R4(config)#int Serial 1/1

R4(config-if)#frame-relay route 401 interface Serial1/2 104

R4#show frame-relay route

如图

 

 

 

配置R3,R5,R6,使他们能够互通

R3(config)#int s 1/0

R3(config-if)#ip address 192.168.92.1 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#encapsulation frame-relay

R3(config-if)#frame-relay lmi-type cisco

R3(config-if)#no frame-relay inverse-arp   

R3(config-if)#frame-relay map ip 192.168.92.3 103 broadcast

R3(config-if)#frame-relay map ip 192.168.92.4 104 broadcast

 

R5(config)#int s 1/0

R5(config-if)#ip address 192.168.92.3 255.255.255.0

R5(config-if)#no shutdown

R5(config-if)#encapsulation frame-relay

R5(config-if)#no frame-relay inverse-arp

R5(config-if)#frame-relay map ip 192.168.92.1 301 broadcast

 

R6(config)#int s 1/0

R6(config-if)#ip address 192.168.92.4 255.255.255.0

R6(config-if)#no shutdown

R6(config-if)#encapsulation frame-relay

R6(config-if)#no frame-relay inverse-arp

R6(config-if)#frame-relay map ip 192.168.92.1 401 broadcast

从R3pingR5

 

Ping通

 

R3#show frame-relay pvc

 

可看出 有两条本地连接

 

步骤6:开始配置ospf

配置外部路由器ospf

R1与R3,R2和R7采用相同方法配置,以R1和R3为例子

R1(config)#router ospf 1

R1(config-router)#router-id 6.6.6.6

R1(config-router)#area 1 nssa

R1(config)#interface loopback 0

R1(config-if)#ip add 6.6.6.6 255.255.255.255

R1(config)#int f 0/0

R1(config-if)#ip add 10.1.92.6 255.255.255.0

R1(config-if)#no shut

R1(config-if)#ip ospf 1 area 0

R1(config-if)#int f 0/1

R1(config-if)#ip add 12.1.92.5 255.255.255.0

R1(config-if)#no shut

R1(config-if)#ip ospf 1 area 0

R1(config-if)#ex

R1(config)#router ospf 1

R1(config-router)#network 6.6.6.6 0.0.0.0 area 0

R1(config-router)#network 10.1.92.0 0.0.0.255 area 0

R1(config-router)#network 12.1.92.0 0.0.0.255 area 0

  

R3(config)#router ospf 1

R3(config-router)#router-id 1.1.1.1

R3(config)#interface loopback 0

R3(config-if)#ip add 1.1.1.1 255.255.255.255

R3(config)#int f 0/0

R3(config-if)#ip add 10.1.92.1 255.255.255.0

R3(config-if)#no shut

R3(config-if)#ip ospf 1 area 0

R3(config-if)#int s 1/0

R3(config-if)#ip ospf 1 area 0

R3(config-if)#ex

R3(config)#router ospf 1

R3(config-router)#network 1.1.1.1 0.0.0.0 area 0

R3(config-router)#network 10.1.92.0 0.0.0.255 area 0

R3(config-router)#network 192.168.92.0 0.0.0.255 area 0

R3(config-router)#neighbor 192.168.92.3

R3(config-router)#neighbor 192.168.92.4

 

 

 

步骤7:配置帧中继中路由器的ospf

R5和R6采用同样方法配置,以R5为例子

R5(config)#router ospf 1

R5(config-router)#router-id 3.3.3.3

R5(config-router)#ex

R5(config)#int loopback 0

R5(config-if)#ip add 3.3.3.3 255.255.255.255

R5(config-if)#ip ospf 1 area 2

R5(config-if)#int s 1/0

R5(config-if)# ip ospf 1 area 2

R5(config-if)# ip ospf priority 0

R5(config)#router ospf 1

R5(config-router)#network 3.3.3.3 0.0.0.0 area 2

R5(config-router)#network 192.168.92.0 0.0.0.255 area 2

 

R3#show ipv6 ospf neighbor

 

邻居关系如上图

 

 

 

 

 

 

 

在R3上ping其他区域

 

从内部到外部都ping通,实验成功。

 

Ipv6拓扑图如下:

 

 

Ipv6地址表

Device

Interface

IP Address

R1

F 0/0

2123:092::1/64

F 0/1

2019:092::1/64

Loopback 0

2011:092::1/128

Loopback 1

2111:092::1/128

R2

F 0/0

2123:092::2/64

S 1/0

2048:092::2/64

Loopback 0

2022:092::1/128

R3

F 0/0

2123:092::3/64

S 1/0

2356:092::3/64

Loopback 0

2033:092::1/128

R5

S 1/0

2356:092::5/64

Loopback 0

2055:092::1/128

R6

S 1/0

2356:092::6/64

Loopback 0

2066:092::1/128

R7

F 0/0

2027:092::7/64

F 0/1

2019:092::7/64

S 1/0

2048:092::7/64

Loopback 0

2077:092::1/128

R8

F 0/0

2027:092::8/64

Loopback 0

2088:092::1/128

 

开始配置帧中继交换机

R3(config)#ipv6 unicast-routing

R3(config)#interface loopback 0

R3(config-if)#ipv6 enable

R3(config-if)#ipv6 address 2033:092::1/128

R3(config-if)#int f 0/0

R3(config-if)#ipv6 enable

R3(config-if)# ipv6 address 2123:092::3/64

R3(config-if)#no shut

R3(config-if)#int s 1/0

R3(config-if)#ipv6 enable

R3(config-if)# encapsulation frame-relay

R3(config-if)#no shut

R3(config)#interface serial 1/0.1 multipoint

R3(config-subif)#ipv6 address 2356:092::3/64

R3(config-subif)#frame-relay map ipv6 2356::92:3 103 broadcast 

R3(config-subif)#frame-relay map ipv6 2356::92:4 104 broadcast

R3(config-subif)#frame-relay map ipv6 2356::92:1 104 broadcast

R3(config-subif)#frame-relay map ipv6 FE80::C804:1CFF:FE48:8 104 broadcast

R3(config-subif)#frame-relay map ipv6 FE80::C803:1CFF:FE48:8 103 broadcast

 

 

R5(config)#ipv6 unicast-routing

R5(config)#interface loopback 0

R5(config-if)#ipv6 address 2055:092::1/128

R5(config-if)#int s 1/0

R5(config-if)#ipv6 enable

R5(config-if)# encapsulation frame-relay

R5(config-if)#no shutdown

R5(config)#interface serial 1/0.1 multipoint

R5(config-subif)#ipv6 address 2356:092::5/64

R5(config-subif)#frame-relay map ipv6 2356::92:1 301 broadcast 

R5(config-subif)#frame-relay map ipv6 2356::92:4 301 broadcast

R5(config-subif)#frame-relay map ipv6 2356::92:3 301 broadcast

R5(config-subif)#frame-relay map ipv6 FE80::C804:1CFF:FE48:8 304 broadcast

R5(config-subif)#frame-relay map ipv6 FE80::C801:1CFF:FE48:8 301 broadcast

 

R6(config)#ipv6 unicast-routing

R6(config)#interface loopback 0

R6(config-if)#ipv6 address 2066:092::1/128

R6(config-if)#int s 1/0

R6(config-if)#ipv6 enable

R6(config-if)# encapsulation frame-relay

R6(config-if)#no shutdown

R6(config)#interface serial 1/0.1 multipoint

R6(config-subif)#ipv6 address 2356:092::6/64

R6(config-subif)#frame-relay map ipv6 2356::92:1 401 broadcast 

R6(config-subif)#frame-relay map ipv6 2356::92:4 401 broadcast

R6(config-subif)#frame-relay map ipv6 2356::92:3 401 broadcast

R6(config-subif)#frame-relay map ipv6 FE80::C803:1CFF:FE48:8 403 broadcast

R6(config-subif)#frame-relay map ipv6 FE80::C801:1CFF:FE48:8 401 broadcast

 

R3pingR5通

 

 

R3#Show frame-relay pvc

 

 配置ospfv3

R1,R2,R3,R5,R6,R7采用同样的方法配置ospf,以R1为例

R1(config)#ipv6 unicast-routing

R1(config)#ipv6 router ospf 1―――启动 OSPFv3 进程

R1(config-rtr)#router-id 6.6.6.6

R1(config-rtr)#area 1 nssa――配置区域 1 为 NSSA 区域

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:092::1/128

R1(config-if)# ipv6 ospf 1 area 0

R1(config-if)#int f 0/1

R1(config-if)#ipv6 enable

R1(config-if)# ipv6 ospf 1 area 1

R1(config-if)#no shutdown

 

3.检查 OSPFv3 的邻居关系

R3#show ipv6 ospf neighbor

 

 

用R3ping其他路由器

 

达到互通,实验成功

 

路由汇总

采用相同的方法配置R1,R2,R3,R5,R6,R7,以R1为例子

R1(config)#int f0/0

R1(config-if)#ipv6 ospf 1 area 0

R1(config)#int f0/1

R1(config-if)#ipv6 ospf 1 area 1

 

外部路由汇总

采用相同的方法配置R1,R2,R3,R5,R6,R7,以R1为例子

R1(config)#ipv6 router ospf 1

R1(config-rtr)#summary-prefix 2111:092::0/64

区域间路由汇总

采用相同的方法配置R1,R2,R3,R5,R6,R7,以R3为例子

R3(config)#ipv6 router ospf 1

R3(config-rtr)#area 0range 2011:092::0/64

 

RIP的配置

R8(config)#ipv6 router rip yeslab

R8(config)#int f0/0

R8(config-if)#ipv6 rip yeslab enable

R8(config)#int loopback 0

R8(config-if)#ipv6 rip yeslab enable

 

R7(config)#ipv6 router ospf 1

R7(config)#int f0/0

R7(config-if)#ipv6 rip yeslab enable

R7(config-rtr)#redistribute rip yeslab metric 1

R7(config)#ipv6 router rip yeslab

R7(config-rtr)#redistribute ospf 1 metric 8

R7(config-rtr)#redistribute connected

 

路由注入

R7(config-router)#area 1 nssa default-information-originate

 

总结

通过这次的作业,我学会了帧中继的配置,ospfv3与ospf 的配置,路由汇总和路由注入。在配置的过程中也遇到了问题,比如路由汇总和路由注入失败,还有rip配置的失败,没有很好地完成任务,以后仍要继续努力,刻苦学习知识,提高自己的实践水平,争取在下次的实验和作业中完成所有要求。

转载于:https://www.cnblogs.com/gaoqianhao123/p/10900796.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
OSPF(开放最短路径优先)是一种用于路由的动态路由协议,它是根据路由器之间的链路状态来计算最短路径的。 在一个OSPF综合实验案例中,可以模拟一个复杂的网络拓扑,包括多个路由器和连接它们的链路。假设有5个路由器A、B、C、D和E,它们之间通过不同的链路连。 首先,需要配置每个路由器上的OSPF进程,并为它们分配一个路由器ID。然后,在每个链路上配置正确的IP地址和子网掩码。接下来,通过在OSPF进程中启用不同的区域,将路由器分成不同的区域。 然后,需要配置每个路由器之间的OSPF邻居关系。这可以通过指定邻居的路由器ID和链路上的IP地址来完成。路由器之间的邻居关系建立后,它们将开始交换链路状态信息(LSA)。 每个路由器将根据接收到的LSA计算自己的链路状态数据库(LSDB)。然后,通过运行Dijkstra算法,每个路由器将计算出到达其他路由器的最短路径。最后,每个路由器将根据最短路径选择应的接口进行路由。 在这个实验案例中,还可以模拟链路故障的情况,观察OSPF的快速收敛性。当某个链路出现故障时,路由器将发送通告信息给邻居,通知它们链路状态已经改变。邻居将更新自己的LSDB,并重新计算最短路径。 通过这个综合实验案例,可以深入了解OSPF协议的工作原理和功能。同时,还可以通过观察实验结果,了解OSPF在网络中的优势和效率。这些知识和经验将帮助网络工程师更好地设计、优化和故障排除复杂的网络拓扑。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值