帧中继启用OSPF配置

 

帧中继启用OSPF配置_第1张图片

帧中继交换FR的配置

FR(config)#frame-relay switching !配置为帧中继交换机

注意:

帧中继在思科模拟器无法配置,需要使用GNS3

FR帧中继路由配置以s0/0接口为例:FR(config-if)#frame-relay route 101 interface s0/2 102

意思是:来着DLCI 101(如图自定义)数据从s0/2 走向链路 102(我们自定义的)

 

接口s0/0配置:

FR(config)#inter s0/0  !进入接口配置

FR(config-if)#encapsulation frame-relay !设置数据封装模式为帧中继

FR(config-if)#frame-relay intf-type dce  !设置接口模式为DCE

FR(config-if)#clock rate 64000         !设置时钟频率

FR(config-if)#frame-relay route 101 interface s0/2 102  !帧中继路由

FR(config-if)#frame-relay route 201 interface s0/1 202  !帧中继路由

FR(config-if)#no shut  !激活接口

 

接口s0/1配置:

FR(config)#inter s0/1

FR(config-if)#encapsulation frame-relay

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

FR(config-if)#clock rate 64000

frame-relay route 202 interface Serial0/0 201

frame-relay route 302 interface Serial0/2 301

FR(config-if)#no shut

 

接口s0/2配置:

FR(config)#inter s0/1

FR(config-if)#encapsulation frame-relay

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

FR(config-if)#clock rate 64000

frame-relay route 102 interface Serial0/0 101

frame-relay route 301 interface Serial0/1 302

FR(config-if)#no shut

 

 

R1路由配置

注意:链路设置:frame-relay map ip 10.0.0.19 101 broadcast

意思大概为:到达10.0.0.19的数据从DLCI101走,必须严格与FR链路设置对应

R1(config-if)#ip ospf network point-to-multipoint 这个语句是决定ospf是否能在帧中继网络中进行传输

 

R1(config)#inter lo 0  !配置路由ID,用于OSPF内部选举

R1(config-if)#ip add 3.3.3.3 255.255.255.0 !路由ID

R1(config-if)#exit

R1(config)#inter s0/0 !进入接口配置

R1(config-if)#encapsulation frame-relay !设置封装协议

R1(config-if)#frame-relay map ip 10.0.0.19 101 broadcast !帧中继的链路设置

R1(config-if)#frame-relay map ip 10.0.0.18 201 broadcast

R1(config-if)#ip add 10.0.0.17 255.255.255.248 !配置ip地址

R1(config-if)#ip ospf network point-to-multipoint !启用osof点对多点广播,关键!

R1(config-if)#no shut

 

R1(config)#inter lo 1 !配置虚拟接口,用于ospf的测试

R1(config-if)#ip add 192.168.1.1 255.255.255.0

 

R1(config)#router ospf 100 ospf的配置

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

R1(config-router)#network 10.0.0.16 0.0.0.7 area 0

 

 

 

R2路由配置

R2(config)#inter lo 0

R2(config-if)#ip add 4.4.4.4 255.255.255.0

R2(config-if)#exit

R2(config)#inter s0/0

R2(config-if)#ip add 10.0.0.19 255.255.255.248

R2(config-if)#encapsulation frame-relay

R2(config-if)#frame-relay map ip 10.0.0.17 102 broadcast

R2(config-if)#frame-relay map ip 10.0.0.18 301 broadcast

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

R2(config-if)#no shut

 

R2(config)#inter lo 1

R2(config-if)#ip add 192.168.2.1 255.255.255.0

 

R2(config)#router ospf 100

R2(config-router)#network 192.168.2.0 0.0.0.255 area 0

R2(config-router)#network 10.0.0.16 0.0.0.7 area 0

 

 

R3路由配置

R3(config)#inter lo 0

R3(config-if)#ip add 5.5.5.5 255.255.255.0

R3(config-if)#exit

R3(config)#inter s0/0

R3(config-if)#ip add 10.0.0.18 255.255.255.248

R3(config-if)#encapsulation frame-relay

R3(config-if)#frame-relay map ip 10.0.0.17 202 broadcast

R3(config-if)#frame-relay map ip 10.0.0.19 302 broadcast

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

R3(config-if)#no shut

 

R3(config)#inter lo 1

R3(config-if)#ip add 192.168.3.1 255.255.255.0

 

R3(config)#router ospf 100

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

R3(config-router)#network 10.0.0.16 0.0.0.7 area 0

 

测试阶段:

都能学习得到所有路由器上声明的网段

R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route

 

Gateway of last resort is not set

 

     3.0.0.0/24 is subnetted, 1 subnets

C       3.3.3.0 is directly connected, Loopback0

     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

O       10.0.0.18/32 [110/64] via 10.0.0.18, 00:04:14, Serial0/0

O       10.0.0.19/32 [110/64] via 10.0.0.19, 00:04:14, Serial0/0

C       10.0.0.16/29 is directly connected, Serial0/0

C    192.168.1.0/24 is directly connected, Loopback1

     192.168.2.0/32 is subnetted, 1 subnets

O       192.168.2.1 [110/65] via 10.0.0.19, 00:04:14, Serial0/0

     192.168.3.0/32 is subnetted, 1 subnets

O       192.168.3.1 [110/65] via 10.0.0.18, 00:04:15, Serial0/0

测试连通性:

R1#ping 192.168.2.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/30/52 ms

R1#ping 192.168.3.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 44/60/76 ms

R1#

你可能感兴趣的:(配置,交换,ospf,帧中继)