設定frame-relay
1
封裝
(config-if)#encapsulation frame-relay [cisco|ietf]
預設使用cisco,若於不同廠商互連則使用ietf,兩端封裝類型需相同
ps:若新加入設備不能用,有可能是本地端router與遠端router封裝類型不同
2
定義LMI類型
(config-if)#frame-relay lmi-type [ansi|cisco|q933i]
預設使用cisco,ios11.2版以上會自動偵測,可不加此行
ps:在show interface的LMI DLCI若為1023表示cisco,若為0表示ansi或q933i,否則就是有問題
ps:若新加入設備不能用,有可能是lmi type與第一個相連的frame-relay switch的lmi type不同
3
設定dlci對應ip
方法有2種:
a.靜態對應
(config-if)#frame-relay map ip < dest-ip> < local-dlci> [broadcast [cisco|ietf]]
表示通往遠端< dest-ip>要使用自己的< local-dlci>路徑過去
若不支援IARP則需使用靜態對應
[broadcast],因frame-relay為nbma預設不廣播,因此像rip路徑更新不會被廣播,除非加上broadcast
b.動態對應
透過iarp自動建立
ex:
使用靜態對應設定frame-relay介面serial0的ip為202.72.70.141/24,lmi為ansi,並用dlci100的介面連到ip202.72.70.141
(config)#int serial 0
(config-if)#ip address 202.72.70.141 255.255.255.0
(config-if)#no shutdown
(config-if)#encapsulation frame-relay
(config-if)#frame-relay lmi-type ansi
(config-if)#frame-relay map ip 202.72.70.142 100 broadcast
……
設定DLCI給界面
(config-if)#frame-relay interface-dlci < 16-1007>
ps:通常由供應商指定
啟動IARP(inverse arp)
(config-if)#frame-relay inverse-arp [protocol] [dlci]
用來將己知的dlci對應到遠端ip位址,預設是自動開啟
ps:router預設60秒會交換inverse arp訊息
清空由iarp產生的動態map
(config)#clear frame-relay-inarp
利用iarp去對應mapping table
1local router會經由CSU/DSU設備去連接到frame-relay switch
2連上去候,router會送一個lmi status詢問訊息通知frame-relay switch關於router狀態和詢問關於VC連線的狀態
3當frame-relay switch收到後會回一個lmi status訊息給router,這訊息包含了遠端router的dlci值
4對於每一個活動中的dlci,router會送一個iarp來介紹自己,幫你的router收到iarp訊息
5router再frame-relay map裏創造一個含local dlci及遠端ip的map entry
6mappling table建立完後,兩邊再做keepalive保持聯絡,每隔10秒router會送LMI資訊給frame-relay switch
ps:lmi必須設定正確,才可得到dlci
ps:
(config-if)#frame-relay ?
class Define a map class on the interface
map Map a protocol address to a DLCI address
de-group Associate a DE group with a DLCI
lmi-type Use CISCO-ANSI-CCITT type LMI
svc Enable frame relay SVCs
interface-dlci Define a DLCI as part of a subinterface
traffic-shaping Enable Frame Relay Traffic Shaping
inverse-arp Enable/disable inverse ARP on a DLCI
intf-type Configure a FR DTE/DCE/NNI interface
route frame relay route for pvc switching
…………………………………………………………
設定子界面
為frame-relay的每條vc設定各別子界面的兩個用途:
1單一序列介面上有多條VC(虛擬電路),很有經濟用途,也可解決埠不夠問題
2point-to-point的子界面可避免split horizen(水平切割)問題,制止路徑更新
ex:
有a,b,c,d四個router,a申請了三個VC到b,c,d,但事實上a只用到s0界面
b把10.0.0.0的網路資訊送進a的s0界面,但因split horizen,所以a不能再把資訊反向送給c,d
ps:若設定子界面,則實體界面不會有ip位址
子界面有以下兩種
使用point-to-point
1可用inverse arp建立mapping table
2比起multipoint需用較多ip,因為各界面都擁有自己的子網路,要設不同的網域IP位置
3可用在star topology
4使用split horizen可正常
使用multipoint
1無法用inverse arp來建mapping table,需手動輸入mapping table
2比起point-to-point可以節省較多IP,因為他只要有一個子網路即可
3可用在partial mesh及full mesh topology
4使用split horizen可能產生問題
設定方式
(config)#int < interface>
(config-if)#int < interface>.< num> < point-to-point|multipoint>
(config-ifsub)#ip address < ip> < mask>
ex:
serial2的介面ip為10.17.0.1/24
10.17.0.2要經dlci120到達
10.17.0.3要經dlci130到達
(config)#interface Serial2
(config-if)#no ip address
(config-if)#no shutdown
(config-if)#encapsulation frame-relay
(config-if)#exit
a.若設多點配置如下
(config)#interface Serial2.2 multipoint
(config-subif)#ip address 10.17.0.1 255.255.255.0
(config-subif)#frame-relay map ip 10.17.0.2 120 broadcast
(config-subif)#frame-relay map ip 10.17.0.3 130 broadcast
b.若設單點配置如下
(config)#interface Serial2.2 point-to-point
(config-subif)#ip address 10.17.0.2 255.255.255.0
(config-subif)#frame-relay interface-dlci 120
(config-subif)#interface Serial2.3 point-to-point
(config-subif)#ip address 10.17.0.3 255.255.255.0
(config-subif)#frame-relay interface-dlci 130
…………………………………………………………
將router設成frame-relay switch
(config)#frame-relay switching
設定frame-relay switch介面
(config-if)#encap frame-relay
(config-if)#frame-relay intf-type dce //設定dce介面,此dce和router上的dce不同
(config-if)#frame-relay router < source dlci> int < local-int> < local-dlci>
若從< source dlci>收到訊框,就從介面< local-int>的< local-dlci>傳送出去
ps:若此介面剛好是router的dce介面,clock rate也必須要設定
…………………………………………………………
看lmi相關資訊
#show frame-relay lmi
可提供本地router與frame relay交換機間的LMI交通統計
畫面大致如下
LMI Statistics for interface Serial0 (Frame Relay DTE) LMI TYPE = ansi //lmi type為ansi
Invalid Unnumbered info 0 Invalid Prot Disc 0
Invalid dummy Call 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 160 Num Status msgs Rcvd 137
Num Update Status Rcvd 0 Num Status Timeouts 13
查看pvc相關資訊
#show frame-relay pvc [dlci|int < interface>]
畫面大致如下
PVC Statistics for interface Serial0 (Frame Relay DTE)
DLCI = 501, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0 //pvc狀態為active表正常,dlci為501
input pkts 14 output pkts 61
in bytes 544 out bytes 1851 //流量統計
dropped pkts 50
in FECN pkts 73 in BECN pkts 121 //從目地收到121becn,表示目地擁塞中
out FECN pkts 33 out BECN pkts 122
in DE pkts 91 out DE pkts 35
out bcast pkts 86 out bcast bytes 10001
pvc create time 00:32:04, last time pvc status changed 00:32:05
查看dlci與ip靜態對應表的資訊
#show frame-relay map
畫面大致如下
Serial0 (up): ip 215.10.1.1 dlci 501(0x66,0x1860), static, //static為手動建立,往215.10.1.1使用dlci501
broadcast,CISCO, status defined, active //lmitype為cisco
Serial1 (up): ip 172.16.20.1 dlci 16(0x10,0x400), dynamic, //dynamic為iarp產生,往172.16.20.1使用dlci16
broadcast,CISCO, status defined, active //lmitype為cisco
Serial2.1 (up): point-to-point dlci, dlci 201(0x66,0x1860), broadcast //使用子界面p2p
status defined, active
ps:
#show frame-relay ?
lmi show frame relay lmi statistics
map Frame-Relay map table
route show frame relay route
svc show frame relay SVC stuff
pvc show frame relay pvc statistics
traffic Frame-Relay protocol statistics
查看lmi異動的情形
#debug frame-relay lmi
可以取得LMI資訊判斷是否一台frame-relay switch或一台router正送或收lmi的packet
ps:status的數字較重要
若是0x0表示對方hello message沒送來,0x2表示一切正常,0x4表示自己lmi出問題
#debug frame-relay events
判斷一台router與一台frame-relay switch間是否正在進行資訊交換
ps:
#show interface < frame-relay interface>
畫面大致如下
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 215.10.1.2/24
MTU 1500 bytes, BW Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation FRAME-RELAY, loopback not set, keepalive set (10 sec) //預設10秒會送lmi資訊給frame-relay switch
LMI enq sent 1472, LMI stat recvd 1472, LMI upd recvd 0, DTE LMI up
LMI enq recvd 0, LMI stat sent 0, LMI upd sent 0
LMI DLCI 0 LMI type is ansi frame relay DTE //lmi dlci 0表示ansi或q933i,預設為1023表示cisco
以下省…