天天看点

CCNA--LAB-(7-2):配置Frame-Relay (帧中继)

我们接着上一篇

实验:配置point-to-multpoint帧中继

DLCI的分配:R1为102与103,因为它要连两台路由器;R2为201;R3为301;中间路由器模拟帧中继交换机,其它接口信息与IP信息如拓扑所示.

具休配置:

Frame-Relay(帧中继交换机):

Router>

Router>en

Router#conf t

Router(config)#hostname Frame-Relay

Frame-Relay(config)#no ip do lookup

Frame-Relay(config)#line console 0

Frame-Relay(config-line)#exec-timeout  0 0

Frame-Relay(config-line)#logging synchronous

Frame-Relay(config-line)#exit

Frame-Relay(config)#frame-relay switching

Frame-Relay(config)#interface s1/0

Frame-Relay(config-if)#encapsulation frame-relay     --封装帧中继协议

Frame-Relay(config-if)#clock rate 64000     --设置时钟

Frame-Relay(config-if)#frame-relay intf-type dce

--帧中继接口类型为DCE(数据通讯设备)

Frame-Relay(config-if)#frame-relay lmi-type ansi

--帧中继本地管理接口类型ansi(美国国家标准协会)

Frame-Relay(config-if)#frame-relay route 102 interface s1/1 201

--对此接口对应的DLCI号102与S1/1对应的DLCI号201进行路由

Frame-Relay(config-if)#frame-relay route 103 interface s1/2 301

--对此接口对应的DLCI号103与S1/2对应的DLCI号301进行路由

Frame-Relay(config-if)#no sh

Frame-Relay(config-if)#exit

Frame-Relay(config)#interface s1/1

Frame-Relay(config-if)#encapsulation frame-relay     --同上

Frame-Relay(config-if)#clock rate 64000     --同上

Frame-Relay(config-if)#frame-relay intf-type dce     --同上

Frame-Relay(config-if)#frame-relay lmi-type ansi     --同上

Frame-Relay(config-if)#frame-relay route 201 interface s1/0 102

--对此接口对应的DLCI号201与S1/0对应的DLCI号102进行路由

Frame-Relay(config)#interface s1/2

Frame-Relay(config-if)#encapsulation frame-relay      --同上

Frame-Relay(config-if)#frame-relay intf-type dce      --同上

Frame-Relay(config-if)#frame-relay lmi-type ansi      --同上

Frame-Relay(config-if)#frame-relay route 301 interface s1/0 103

--对此接口对应的DLCI号301与S1/0对应的DLCI号103进行路由

Frame-Relay(config-if)#end

Frame-Relay#

查看帧中继路由:

Frame-Relay#show frame-relay route

Input Intf      Input Dlci      Output Intf     Output Dlci     Status

Serial1/0       102             Serial1/1       201             active

Serial1/0       103             Serial1/2       301             active

Serial1/1       201             Serial1/0       102             active

Serial1/2       301             Serial1/0       103             active

R1:

Router(config)#hostname R1

R1(config)#no ip do lookup

R1(config)#line console 0

R1(config-line)#exec-timeout 0  0

R1(config-line)#logging synchronous

R1(config-line)#exit

R1(config)#interface s1/0

R3(config-if)#ip ospf network point-to-multipoint     --指定OSPF网络类型为点到多点

R1(config-if)#encapsulation frame-relay

R1(config-if)#ip address 192.168.1.1 255.255.255.0

R1(config-if)#no sh

R1(config-if)#no frame-relay inverse-arp          --关闭帧中继反向ARP功能          

R1(config-if)#frame-relay map ip 192.168.1.2 102 broadcast ietf

--帧中继静态映射,将本地DLCI 102映射到对端192.168.1.2

R1(config-if)#frame-relay map ip 192.168.1.3 103 broadcast ietf

--帧中继静态映射,将本地DLCI 103映射到对端192.168.1.3

R1(config-if)#exit

]R2(config)#interface loopback 0

R2(config-if)#ip address1.1.1.1 255.255.255.0

R2(config-if)#ip ospf network point-to-point    --这是防止学过了的路由IP为32位

R2(config-if)#exit

R1(config)#router ospf 1     --启用OSPF路由,并发布网段

R1(config-router)#router-id 1.1.1.1

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

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

R1(config-router)#end

R1#

查看路由表:

R1#show ip route

Codes: C - connected, S - static, 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

       i - IS-IS, su - IS-IS summary, 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

     1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, Loopback0

     2.0.0.0/24 is subnetted, 1 subnets

O       2.2.2.0 [110/65] via 192.168.1.2, 00:13:48, Serial1/0

     3.0.0.0/24 is subnetted, 1 subnets

O       3.3.3.0 [110/65] via 192.168.1.3, 00:13:48, Serial1/0

     192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks

C       192.168.1.0/24 is directly connected, Serial1/0

O       192.168.1.3/32 [110/64] via 192.168.1.3, 00:13:48, Serial1/0

O       192.168.1.2/32 [110/64] via 192.168.1.2, 00:13:48, Serial1/0

查看帧中继MAP:

R1#show frame-relay map

Serial1/0 (up): ip 0.0.0.0 dlci 103(0x67,0x1870)

              broadcast,

              CISCO, status defined, active

Serial1/0 (up): ip 0.0.0.0 dlci 102(0x66,0x1860)

Serial1/0 (up): ip 192.168.1.2 dlci 102(0x66,0x1860), static,

              IETF, status defined, active

Serial1/0 (up): ip 192.168.1.3 dlci 103(0x67,0x1870), static,

R2;  //同上

Router(config)#hostname R2

R2(config)#no ip do lookup

R2(config)#line console 0

R2(config-line)#exec-timeout  0 0

R2(config-line)#logging synchronous

R2(config-line)#exit

R2(config)#interface s1/0

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

R2(config-if)#encapsulation frame-relay

R2(config-if)#ip address 192.168.1.2 255.255.255.0

R2(config-if)#no sh

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

R2(config-if)#frame-relay map ip 192.168.1.1 201 broadcast ietf

R2(config)#interface loopback 0

R2(config-if)#ip address 2.2.2.2 255.255.255.0

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

R2(config)#router ospf 1

R2(config-router)#router-id 2.2.2.2

R2(config-router)#network 192.168.1.2 0.0.0.0 area 0

R2(config-router)#network 2.2.2.2 0.0.0.0 area 0

R2(config-router)#end

R2#

*Mar  1 00:30:48.479: %SYS-5-CONFIG_I: Configured from console by console

R2#show ip route

O       1.1.1.0 [110/65] via 192.168.1.1, 00:17:04, Serial1/0

C       2.2.2.0 is directly connected, Loopback0

O       3.3.3.0 [110/129] via 192.168.1.1, 00:17:04, Serial1/0

O       192.168.1.1/32 [110/64] via 192.168.1.1, 00:17:04, Serial1/0

O       192.168.1.3/32 [110/128] via 192.168.1.1, 00:17:04, Serial1/0

R2#show frame-relay map

Serial1/0 (up): ip 192.168.1.1 dlci 201(0xC9,0x3090), static,

R3;   //同上

Router(config)#hostname R3

R3(config)#no ip do lookup

R3(config)#line console 0

R3(config-line)#exec-timeout 0 0

R3(config-line)#logging synchronous

R3(config-line)#exit

R3(config)#interface s1/0

R3(config-if)#ip address 192.168.1.3 255.255.255.0

R3(config-if)#no sh

R3(config-if)#encapsulation frame-relay

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

R3(config-if)#frame-relay map ip 192.168.1.1 301 broadcast ietf

R3(config-if)#exit

R3(config)#interface loopback 0

R3(config-if)#ip address 3.3.3.3 255.255.255.0

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

R3(config)#router ospf 1

R3(config-router)#router-id 3.3.3.3

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

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

R3(config-router)#end

R3#

R3#show ip route

O       1.1.1.0 [110/65] via 192.168.1.1, 00:00:56, Serial1/0

O       2.2.2.0 [110/129] via 192.168.1.1, 00:00:56, Serial1/0

C       3.3.3.0 is directly connected, Loopback0

O       192.168.1.1/32 [110/64] via 192.168.1.1, 00:00:56, Serial1/0

192.168.1.2/32 [110/128] via 192.168.1.1, 00:00:56, Serial1/0

R3#show frame-relay map

Serial1/0 (up): ip 192.168.1.1 dlci 301(0x12D,0x48D0), static,

验证:在R1验证以源为1.1.1.1分别拼2.2.2.2与3.3.3.3:

R1#ping 2.2.2.2 source 1.1.1.1

Type escape sequence to abort.

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

Packet sent with a source address of 1.1.1.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 332/494/928 ms

R1#ping 3.3.3.3 source 1.1.1.1

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

Success rate is 100 percent (5/5), round-trip min/avg/max = 168/346/532 ms

总结:

用OSPF配置帧中继有很多种方式,源于OSPF网络类型有很多总,这次给大家配置了点到多点,以后有机会把OSPF的其它几种配置方法都写上.

本文转自 meiyanaa 51CTO博客,原文链接:http://blog.51cto.com/justim/238552,如需转载请自行联系原作者