Frame Relay 訊框中繼 將路由器設定為訊框中繼交換器以進行 frame relay 實驗 : 首先練習設定兩個埠的 frame relay switch FRSW S0/0 S0/1 介面 S0/0 介面 S0/1 102 201 DLI 102 DLI 201 Router(config)# hostname FRSW FRSW(config)# frame-relay switching // 將 router 改為執行 frame-relay switch 功能! FRSW(config)# interface serial0/0 FRSW(config-if)# no ip address FRSW(config-if)# no shut FRSW(config-if)# encapsulation frame-relay FRSW(config-if)# frame-relay intf-type dce // frame relay switch 介面角色為 DE FRSW(config-if)# clockrate 64000 // 設定速率! FRSW(config-if)# interface Serial0/1 FRSW(config-if)# no ip address FRSW(config-if)# no shut FRSW(config-if)# encapsulation frame-relay FRSW(config-if)# frame-relay intf-type dce FRSW(config-if)# clockrate 64000! FRSW(config-if)# frame-relay route 102 interface Serial0/1 201 // 建立內部轉送對照表 FRSW(config-if)# frame-relay route 201 interface Serial0/0 102 Frame Relay Switch 以下圖表示 DLI 102 DLI 201 1
檢視 frame relay switch 內已設定之路徑 : FRSW# show frame-relay route FRSW#show frame-relay route Input Intf Input Dlci Output Intf Output Dlci Status Serial0/1 102 Serial0/2 201 inactive Serial0/2 201 Serial0/1 102 inactive FRSW# Lab 1: 請完成下列網路設定 : RIP v2 RA DLI 102 DLI 201 RB f0/0 192.168.101.1/24 S0/0 192.168.1.1/24 S0/0 192.168.1.2/24 f0/0 192.168.102.1/24 Frame relay switch 設定如前例, 接著設定路由器 RA 及 RB: RA(config)# interface Serial 0/0 RA(config-if)# encapsulation frame-relay RA(config-if)# ip address 192.168.1.1 255.255.255.0 RA(config-if)# no shutdown RA(config-if)# exit RA(config)# router rip RA(config-router)# version 2 RA(config-router)# network 192.168.1.0 RA(config-router)# network 192.168.101.0 自行設定 fast ethernet 介面 RB(config)# interface Serial 0/0 RB(config-if)# encapsulation frame-relay RB(config-if)# ip address 192.168.1.2 255.255.255.0 RB(config-if)# no shutdown RB(config-if)# exit RB(config)# router rip 2
RB(config-router)# version 2 RB(config-router)# network 192.168.1.0 RB(config-router)# network 192.168.102.0 自行設定 fast ethernet 介面 由於實驗室路由器之 IOS 皆為 12 版, 所以 lmi 及 inverse arp 皆自動執行 測試設定 : 1. 檢視路由表 : RA# show ip route RB# show ip route RA#show ip route.. Gateway of last resort is not set R RA# 192.168.102.0/24 [120/1] via 192.168.1.2, 00:00:00, Serial0/0 192.168.1.0/24 is directly connected, Serial0/0 192.168.101.0/24 is directly connected, Ethernet1/0 RB#show ip route.. Gateway of last resort is not set R RB# 192.168.102.0/24 is directly connected, Ethernet1/0 192.168.1.0/24 is directly connected, Serial0/0 192.168.101.0/24 [120/1] via 192.168.1.1, 00:00:08, Serial0/0 3
2. 確認連通 : 請由 192.168.101.0 網段電腦 ping192.168.102.0 網段電腦 3. 以 show interface s0/0 檢視封裝是否是 frame-relay, 並檢視封包類型 ieft 或 cisco proprietary 如果也使用 isco 路由器模擬 Frame Relay switch, 由於 isco 為預設類型, 所以不顯示, 結果如下 : RA#show int s0/0 Hardware is M4T Internet address is 192.168.1.1/24 Encapsulation FRAME-RELAY, crc 16, loopback not set 如果使用 Adtran Atlas 550 作為 frame relay switch, 需設定 encapsulation frame-relay ietf, 請以 show interface s0/0 檢視設定 RA# show interface serial 0/0 Hardware is PowerQUI Serial Internet address is 192.168.192.1/24 Encapsulation FRAME-RELAY IETF, loopback not set 4. 路由器以 lmi 取得 ISP FRAME RELAY 供應者設定 pvc 或 svc 之 dlci 號碼 ;lmi 共有三種型態 :ISO ANSI 及 Q933a 在 IOS11.2 版之後, 路由器可自動偵測 ISP 的 frame-relay switch 使用那一種型態 欲了解 ISP 使用 frame-relay switch 的那一種型態, 使用指令 :show frame-relay lmi 檢視路 4
由器取得的資訊 : RA# show frame-relay lmi LMI Statistics for interface Serial0/1 (Frame Relay DTE) LMI TYPE =ISO Invalid Unnumbered info 0 Invalid Prot Disc 0 Invalid dummy all Ref 0 Invalid Msg Type 0 Invalid Status Message 0 Invalid Lock Shift 0 Invalid Information ID 0 Invalid Report IE Len 0 Invalid Report Request 0 Invalid Keep IE Len 0 Num Status Enq. Sent 45 Num Status msgs Rcvd 46 Num Update Status Rcvd 0 Num Status Timeouts 1 Last Full Status Req 00:00:39 Last Full Status Rcvd 00:00:39 ISO lmi 使用 dlci 1023 傳送路由器 frame relay 間的資訊, ANSI 及 Q933a 使用 dlci 0 該訊息可由 show interface serial 0/0 得知 : 使用 isco Frame Relay switch, 由於 isco 為預設類型, 所以不顯示, 結果如下 : RA#show int s0/0 Hardware is M4T Internet address is 192.168.1.1/24 Encapsulation FRAME-RELAY, crc 16, loopback not set Restart-Delay is 0 secs LMI enq sent 34, LMI stat recvd 35, LMI upd recvd 0, DTE LMI up LMI enq recvd 0, LMI stat sent 0, LMI upd sent 0 LMI DLI 1023 LMI type is ISO frame relay DTE FR SV disabled, LAPF state down B d t 0/64 b d t t/d d 14/0 i t f b d t 12 5
RA# show interface serial 0/0 Hardware is PowerQUI Serial Internet address is 192.168.1.1/24 Encapsulation FRAME-RELAY, loopback not set LMI enq sent 7, LMI stat recvd 7, LMI upd recvd 0, DTE LMI up LMI enq recvd 0, LMI stat sent 0, LMI upd sent 0 LMI DLI 0 LMI type is ANSI Annex D frame relay DTE Broadcast queue 0/64, broadcasts sent/dropped 0/0, interface broadcasts 0 欲檢視 frame relay switch 共提供多少 PV, 請以 show frame-relay pvc 檢視 R1#show frame-relay pvc PV Statistics for interface Serial0/0 (Frame Relay DTE) Active Inactive Deleted Static Local 1 0 0 0 Switched 0 0 0 0 Unused 0 0 0 0 DLI = 102, DLI USAGE = LOAL, PV STATUS = ATIVE, INTERFAE = Serial0/0 5. 檢視遠端網路層位址應對到本地端 DLI inverse ARP 功能 R1# show frame-relay map Serial0/0 (up): ip 192.168.102.1 dlci 102 (0x12,0x420), dynamic, broadcast, status defuned, active 6
Note: 若是路由器之 IOS 為 11.2 版之前的版本,lmi 及 inverse arp 須自行設定 : RA(config)# interface fastethernet 0/0 RA(config-if)# ip address 192.168.0.1 255.255.255.0 RA(config-if)# interface serial 0/0 RA(config-if)# encapsulation frame-relay RA(config-if)# frame-relay lmi-type cisco RA(config-if)# frame-relay map ip 192.168.102.1 102 broadcast R1(config-if)#exit 7