路由交换技术实战七 FR 网络中配置 OSPF( 完成版 )

帧中继网络用户接口上最多可支持1024条虚电路,其中用户可用的dlci范围是:16-1007

DLCI只具有局部意义,即交换机上不同的端口可以使用相同的DLCI号.

实验要求:

1、掌握配置帧中继的基本方法。

2、掌握在路由器中模拟帧中继交换机的方法。

3、掌握 NBMA网络中 OSPF的邻居关系手工和自动建立的两种配置方法。

4、掌握指定 OSPF的接口优先级和通过修改 OSPF的默认接口网络类型避免 DR的选举出错。

(不能ping通排除故障思路,首先查看路由器和帧中继交换机每个接口是否处于up状态,其次查看帧中继交换机的帧中继静态映射是否正确,如果查看ospf邻居表不能正常显示,检查ospf区域、宣告 以及 R1静态邻居配置是否有问题)

实验拓扑:

   

实验步骤:

  1. 在路由器 R2 和 R3 上配置模拟帧中继交换机的功能,参考命令如下

R2参考命令:

R2#confi

*Apr 28 10:38:31.387: %SYS-5-CONFIG_I: Configured from console by console

R2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

R2(config)#frame-relay s

R2(config)#frame-relay switching

R2(config)#interface s1/0 

R2(config-if)#clock rate 64000 

R2(config-if)#no shutdown 

R2(config-if)#enca

R2(config-if)#encapsulation  frame-relay

R2(config-if)#frame-relay lmi-type c

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

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

R2(config-if)#frame-relay route 152 interface s1/2 452 

R2(config-if)#frame-relay route 252 interface s1/1 352  

R2(config-if)#interface s1/1

R2(config-if)#clock rate 64000

R2(config-if)#no shutdown 

R2(config-if)#en

R2(config-if)#encapsulation frame-relay

R2(config-if)#frame-relay  lmi-type q933a

R2(config-if)#frame

R2(config-if)#frame-relay  intf-type nni

R2(config-if)#frame-relay route 352 interface s1/0 252

R2(config-if)#interface  s1/2

R2(config-if)#clock rate 64000

R2(config-if)#no shutdown  

R2(config-if)#en

R2(config-if)#encapsulation frame-relay

R2(config-if)#frame

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

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

R2(config-if)#frame-relay route 452 interface s1/0 152

R2(config-if)#

R3参考命令:

R3#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

R3(config)#frame-relay switching

R3(config)#interface s1/1

R3(config-if)#clock rate 64000

R3(config-if)#no shutdown

R3(config-if)#enca

R3(config-if)#encapsulation frame-relay

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

R3(config-if)#frame-relay intf-type nni 

R3(config)#interface s1/1                         

R3(config-if)#frame-relay route 352 interface s1/0 552

R3(config-if)#interface s1/0                         

R3(config-if)#clock rate 64000 

R3(config-if)#no shutdown                        

R3(config-if)#encapsulation frame-relay               

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

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

R3(config-if)#frame-relay route 552 interface s1/1 352

R3(config-if)#

  1. 在路由器 R1上配置帧中继,参考命令如下

R1参考命令:

R1#configure terminal      

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#enca    

R1(config)#interface s1/0

R1(config-if)#enca

R1(config-if)#encapsulation fram

R1(config-if)#encapsulation frame-relay

R1(config-if)#no frame-

R1(config-if)#no frame-relay inver

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

R1(config-if)#frame-relay map ip 145.52.52.4 152 broadcast

R1(config-if)#frame-relay map ip 145.52.52.5 252 broadcast

R1(config-if)#

R4参考命令:

R4#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

R4(config)#interface s1/2

R4(config-if)#enca

R4(config-if)#encapsulation frame-relay

R4(config-if)#no frame

R4(config-if)#no frame-relay  inv

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

R4(config-if)#fram

R4(config-if)#frame-relay map ip 145.52.52.1 452 broadcast 

R4(config-if)#

R5参考命令:

R5#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

R5(config)#interface s1/0

R5(config-if)#enca

R5(config-if)#encapsulation  fra

R5(config-if)#encapsulation  frame-relay

R5(config-if)#no fra

R5(config-if)#no fram

R5(config-if)#no frame-relay inv

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

R5(config-if)#frame

R5(config-if)#frame-relay map ip 145.52.52.1 552 broadcast

R5(config-if)#

问题 1:配置后在 R1 上 show frame-relay map 可以看到哪些映射?

     答:此时在R1上可看到两条映射,分别是  通过DCLI 152 与145.52.52.4的静态映射关系,通过DCLI 252 与 145.52.52.5 的静态映射关系。

问题 2:在路由器 R2 上 show frame-relay route 能够看到哪些帧中继转发表

          答:此时在路由器R2上查看帧中继转发表可以看到DCLI 152 与DCLI 452,

DCLI 252 与DCLI 352 之间的转发关系。

 

3、按照拓扑图给路由器 R1、R4、R5 各接口配置 IP 地址,IP 地址第二字节修改为自己学号

后三位。

R1配置命令:

R1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#interface s1/0

R1(config-if)#ip address 145.52.52.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#interface loopback0

R1(config-if)#ip address 1.1.1.1 255.255.255.0

R1(config-if)#

R4配置命令:

R4(config)#interface s1/2

R4(config-if)#ip address 145.52.52.4 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#interface lo0

R4(config-if)#ip address 4.4.4.4 255.255.255.0

R4(config-if)#

 

R5配置命令:

R5(config)#interface s1/0

R5(config-if)#ip address 145.52.52.5 255.255.255.0

R5(config-if)#no shutdown

R5(config-if)#interface lo0

R5(config-if)#ip address 5.5.5.5 255.255.255.0

R5(config-if)#

问题 3:配置后在 R4 上分别 ping R1 和 R5 能否通信?原因是什么?

     答:此时在R4 上分别 ping R1 和 R5,显示不能ping通,因为此时在路由器上还没有运行相关的网络协议,路由表中也不会有R1和R5的相关路由条目。

4、在路由器 R1,R4,R5 上起 OSPF 路由选择协议,全部加入区域 0,参考命令如下:

R1配置命令:

R1(config)#router ospf  52

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

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

R1(config-router)#

R4配置命令:

R4(config)#router ospf 52

R4(config-router)#network 4.4.4.0 0.0.0.255  area 0

R4(config-router)#network 145.52.52.0 0.0.0.255  area 0

R4(config-router)#

R5配置命令:

R5(config)#router ospf 52

R5(config-router)#network 5.5.5.0 0.0.0.255 area 0

R5(config-router)#network 145.52.52.0 0.0.0.255 area 0

R5(config-router)#

问题 4:配置后,在 R1 上查看邻居,能否看到 R4 和 R5?为什么?

     答:配置后在R1上查看邻居,仍然不能看到R4和R5,因为在帧中继网络上,OSPF接口默认的网络类型为NON_BROADCAST.在这种模式下,OSPF不会在接口上发送Hello包,因此无法建立最基本的邻居关系,必须通过手工使用neighbor命令来指定邻居,此时Hello才会以单播形式发送。

      

5、在 R1 上手动添加邻居,参考命令如下:

R1(config)#router ospf 52

R1(config-router)#neigh

R1(config-router)#neighbor  145.52.52.4

R1(config-router)#neighbor  145.52.52.5

问题 5:配置后,在 R1 上查看邻居,能否看到 R4 和 R5?

          答:此时在 R1 上查看邻居,能看到 R4 和 R5

 

问题 6:在 R4 上使用 ping 5.5.5.5 source 4.4.4.4,能否 ping 通?为什么?

          答:R4 上使用 ping 5.5.5.5 source 4.4.4.4,不能ping 通,因为前面的所有配置中并没有在R4、R5上添加相应R4到R5的帧中继静态映射关系,所以不能通过帧中继网络转发数据包。

6、在 R4 和 R5 中手动添加帧中继映射,解决问题 6 的问题,参考命令:

R4配置命令:

R4(config-if)# frame-relay map ip 145.52.52.5 452 broadcast

R5配置命令:

R5(config-if)#frame-relay map ip 145.52.52.4 552 broadcast

7、为了保持网络稳定,手动设置 R1 为 DR,将 R4、R5 优先级设为 0,参考命令为:

R4(config)#interface s1/2

R4(config-if)#ip ospf priority 0

R5(config)#interface s1/0

R5(config-if)#ip ospf pr

R5(config-if)#ip ospf pri

R5(config-if)#ip ospf priority 0

问题 7:此时在 R4 上使用 ping 5.5.5.5 source 4.4.4.4,能否 ping 通?(   问题已解决,在只有修改完优先级,R1的loopback接口的1.1.1.1才能成为整个网络拓扑的DR,继而才能向R4与R5分发信息,分发路由条目

在修改优先级设置R1为DR之前,R1、R4、R5能成为ospf邻居,但是R5是DR,R4没有直接连接到R5上,不能向身为DR的R5发送自己的链路状态汇总信息,继而导致R5和R1的路由条目中不会有R4的4.4.4.4路由条目  )

     答:此时在 R4使用 ping 5.5.5.5 source 4.4.4.4,能ping 通

 

8、删除步骤 5 和步骤 6 的配置,修改 R1 接口工作类型为 P2MP,R4 和 R5 接口修改为 P2P

删除步骤 5 和步骤 6 的配置:

R1(config)#router ospf 52

R1(config-router)#no neighbor  145.52.52.4

R1(config-router)#no neighbor  145.52.52.5

R4(config-if)#no frame-relay map ip 145.52.52.5 452 broadcast

R5(config-if)#no frame-relay map ip 145.52.52.4 552 broadcast

R1配置命令:

R1(config)#interface s1/0

R1(config-if)#ip ospf network po

R1(config-if)#ip ospf network point-to-multipoint

R1(config-if)#

R4配置命令:

R4(config)#interface s1/2

R4(config-if)#ip ospf net

R4(config-if)#ip ospf network po

R4(config-if)#ip ospf network point-to-

R4(config-if)#ip ospf network point-to-point

R4(config-if)#

R5配置命令:

R5(config)#interface s1/0

R5(config-if)#ip ospf network po

R5(config-if)#ip ospf network point-to-point

R5(config-if)#

 

问题 8:此时 R1 和 R4,R5 之间能否形成邻居,为什么?

          答:不能,因为OSPF发送的hello包的ttl为1,只能传一跳(逻辑上的1跳),由于NB网络不能广播,所以DR和其他DROTHER之间不能建立逻辑上的1跳关系,所以邻居关系要通过修改时间间隔建立

9、修改 R4 和 R5 的 hello 时间间隔

R4配置命令:

R4(config)#

R4(config)#interface s1/2

R4(config-if)#ip ospf hello-inter

R4(config-if)#ip ospf hello-interval 30

R4(config-if)#

R5配置命令:

R5(config)#interface s1/0

R5(config-if)#ip ospf hello

R5(config-if)#ip ospf hello-interval 30

R5(config-if)#

问题 9:配置后在 R1 上能否看到邻居?

          答:配置后在 R1 上已经能看到邻居

问题10:在 R4 上使用 ping 5.5.5.5 source 4.4.4.4,能否 ping 通?

          答:可以ping通

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值