ospf在FR中配置实验 (草稿,仅供参考,因为一直在排查问题,仅做到了问题7,会持续更新)

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

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

 

(不能ping通排除故障思路,首先查看路由器和帧中继交换机每个接口是否处于up状态,其次查看帧中继交换机的帧中继静态映射是否正确)

实验拓扑:

 

 

 

实验步骤:

  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)#frame-relay route 752 interface s1/2 852

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)#frame-relay route 852 interface s1/1 752

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)#frame-relay route 752 interface s1/0 652

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)#frame-relay route 652 interface s1/1 752

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)# frame-relay map ip 145.52.52.5 852 broadcast

(此处绿色的原因是配置超前了,可以选择在问题6在配置)

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)#frame-relay map ip 145.52.52.4 652 broadcast

(此处绿色的原因是配置超前了,可以选择在问题6在配置)

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配置命令:

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)#

问题 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

R4(config)#router ospf 52

R4(config-router)#neighbo

R4(config-router)#neighbor  145.52.52.1

R4(config-router)#neighbor  145.52.52.5

R5#configure t

R5(config)#router ospf 52

R5(config-router)#neighbor 145.52.52.1

R5(config-router)#neighbor 145.52.52.4

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

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

 

问题 6:在 R4 上使用 ping 5.5.5.5 source 4.4.4.4,能否 ping 通?为什么?(解决无法通信:在R4和R5上添加邻居试试)

          答: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 852 broadcast

R5配置命令:

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

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

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

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

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

参考命令如下:

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

9、修改 R4 和 R5 的 hello 时间间隔,参考命令如下:

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

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

 

 

 

猜你喜欢

转载自blog.csdn.net/qq_42103479/article/details/89707004