一:實驗目标:
掌握幀中繼的網絡環境下ospf的配置.
二:實驗拓撲:
<a href="http://blog.51cto.com/attachment/201309/152617522.png" target="_blank"></a>
三:實驗配置
(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)# frame-relay route 301 interface s0/0 103
R2(config)# interface s0/2
R2(config-if)# frame-relay route 401 interface s0/0 104
( (2)show frame-relay route
<a href="http://blog.51cto.com/attachment/201309/152617673.jpg" target="_blank"></a>
由上圖可以看出R2幀中繼映射表已經形成,Serial0/0的DLCI103對應Serial0/1的DLCI301,Serial0/0的DLCI104對應Serial0/1的DLCI401。兩條虛電路尚處于未激活狀态。
(3) show frame pvc
<a href="http://blog.51cto.com/attachment/201309/152617189.jpg" target="_blank"></a>
以上顯示R2上各個接口的PVC狀态,在Serial0/0接口共連接配接有兩條PVC但是都處于Inactive狀态。
(4) show frame lmi
<a href="http://blog.51cto.com/attachment/201309/152618309.jpg" target="_blank"></a>
該指令顯示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
連通性測試
<a href="http://blog.51cto.com/attachment/201309/152618558.png" target="_blank"></a>
<a href="http://blog.51cto.com/attachment/201309/152618952.png" target="_blank"></a>
(6) 利用ospf協定實作1.1.1.1/24和3.3.3.3/24和4.4.4.4/24之間的互通。
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(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(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
<a href="http://blog.51cto.com/attachment/201309/152618583.png" target="_blank"></a>
<a href="http://blog.51cto.com/attachment/201309/152619634.png" target="_blank"></a>
本文轉自Tar0 51CTO部落格,原文連結:http://blog.51cto.com/tar0cissp/1295116,如需轉載請自行聯系原作者