一:实验目标:
掌握帧中继的网络环境下ospf的配置.


二:实验拓扑:

 

帧中继环境下ospf的使用(点到点模式)_第1张图片

 

 

 

三:实验配置

(1) 对R2的配置

R2(config)# frame-relay switching 

R2(config)# interface s0/0

R2(config-if)# encapsulation frame-relay

R2(config-if)# clock rate 64000

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

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

R2(config-if)# frame-relay route 103 interface s0/1 301

R2(config-if)# frame-relay route 104 interface s0/2 401

R2(config-if)# no shutdown

R2(config)# interface s0/1

R2(config-if)# encapsulation frame-relay

R2(config-if)# clock rate 64000

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

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

R2(config-if)# frame-relay route 301 interface s0/0 103

R2(config-if)# no shutdown

R2(config)# interface s0/2

R2(config-if)# encapsulation frame-relay

R2(config-if)# clock rate 64000

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

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

R2(config-if)# frame-relay route 401 interface s0/0 104

R2(config-if)# no shutdown

(  (2)show frame-relay route 

 

 

由上图可以看出R2帧中继映射表已经形成,Serial0/0的DLCI103对应Serial0/1的DLCI301,Serial0/0的DLCI104对应Serial0/1的DLCI401。两条虚电路尚处于未激活状态。

(3) show frame pvc

 

帧中继环境下ospf的使用(点到点模式)_第2张图片

 

以上显示R2上各个接口的PVC状态,在Serial0/0接口共连接有两条PVC但是都处于Inactive状态。

(4) show frame lmi

帧中继环境下ospf的使用(点到点模式)_第3张图片

 

该命令显示R2上LMI的类型及相关参数,上图显示尚无数据包活动。

(5) 利用反向ARP动态获取帧中继映射表实现

对R1的配置

R1(config)# interface s0/0

R1(config-if)# encapsulation frame-relay

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

R1(config-if)# frame-relay inverse-arp ip 103

R1(config-if)# frame-relay inverse-arp ip 104

R1(config-if)# ip address 192.168.123.1 255.255.255.0

R1(config-if)# no shutdown

R1(config)# interface loopback 0

R1(config-if)# ip address 1.1.1.1 255.255.255.0

对R3的配置

R3(config)# interface s0/0

R3(config-if)# encapsulation frame-relay

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

R3(config-if)# frame-relay inverse-arp ip 301

R3(config-if)# ip address 192.168.123.3 255.255.255.0

R3(config-if)# no shutdown

R3(config)# interface loopback0

R3(config-if)# ip address 3.3.3.3 255.255.255.0

对R4的配置

R4(config)# interface s0/0

R4(config-if)# encapsulation frame-relay

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

R4(config-if)# frame-relay inverse-arp ip 401

R4(config-if)# ip address 192.168.123.4 255.255.255.0

R4(config-if)# no shutdown

R4(config)# interface loopback0

R4(config-if)# ip address 4.4.4.4 255.255.255.0

连通性测试

 

 

 

 

(6) 利用ospf协议实现1.1.1.1/24和3.3.3.3/24和4.4.4.4/24之间的互通。

对R1的配置

R1(config)# router ospf 1

R1(config-router)# network 192.168.123.0 0.0.0.255 a 0

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

R1(config-router)# end

对R3的配置

R3(config)# router ospf 1

R3(config-router)# network 192.168.123.0 0.0.0.255 a 0

R3(config-router)# network 3.3.3.0 0.0.0.255 a 0

R3(config-router)# end

对R4的配置

R4(config)# router ospf 1

R4(config-router)# network 192.168.123.0 0.0.0.255 a 0

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

R4(config-router)# end

连通性测试