我們接着上一篇
實驗:配置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,如需轉載請自行聯系原作者