包交換網絡,或者分組交換網絡,共享帶寬,通過DLCI用來區分不同的VC。
DLCI:(數據鏈路連接標識符)用來標明源和目標之間的一條邏輯鏈路。
DLCI是FR中的第二層地址,相當於以太網中的MAC地址,只具有本地意義。
(0~1023,可用於DLCI分配的範圍16~~~1007)
LMI:(本地管理接口)
用來管理和維護邏輯鏈路。cisco/q933a(歐洲標準)/ansi(北美標準)
LMI管理的VC狀態有3種。
a)active state(活動狀態)
ISDN鏈路可以進行數據包的傳遞。
b)inactive state(非活動狀態)
本地路由器與ISDN交換機之間可以進行數據包的傳遞,而對端路由器與FR交換機之間不可以進行數據傳輸。
c)刪除狀態。
本地路由器沒有從FR交換機接收到LMI,本地連接已經斷開。
狀態查詢(frame-relay交換表)
返回DLCI
逆向ARP查詢(通過DLCI查找對端的IP地址)
建立frame-relay map(本地DLCI,遠程IP地址)
每60秒發送逆向ARP,驗證對端是否活躍。
每10 秒發送keepalive,維持連接。
1)hub-and-spoke(星形拓樸)
需要的VC數量最少,最經濟實用。
所有節點有到其它節點的全物理連接。
提供冗餘備份,但是成本太高。
並不是所有的節點都有到其它節點的全物理連接。
4.5)FR的接口類型:
a)physical interface:
物理接口
b)point-to-point subinterface:
點到點子接口
(建立映射時,只能使用frame-relay interface-dlci)
c)multipoint subinterface:
多點子接口(要求所有節點處於同一個網絡)
4.6.1)點到點子接口
!
interface s0
no ip address
encapsulation frame-relay
no frame inverse-arp
no arp frame-relay
no shut
!
interface s0.1 point-to-point
ip address 172.16.10.1 255.255.255.0
no frame-relay inverse-arp
no arp frame-relay
frame-relay interface-dlci 102
!
""注意在point-to-point 子接口建立幀中繼映射時,只能使用frame-relay interface dlci命令。
4.6.2)多點子接口:
(要求所有參與frame-relay的接口都要處於同一個子網)
R2(s0)__________Frame-Relay__________(s0.1)R1
/
/
R3(s0)-------/
!
interface s0
no ip address
encapsulation frame-relay
no frame-relay inverse-arp
no arp frame-relay
no shutdown
!
interface s0.1 multipoint
ip address 172.16.123.1 255.255.255.0
no frame-relay inverse-arp
no arp frame-relay
frame-relay map ip 172.16.123.2 102 broadcast
frame-relay map ip 172.16.123.3 103 broadcast
在幀中繼網絡中,當所有接口處於同一個子網時,連通性與三層路由協議無關,只與二層映射有關。
當所有接口不是都處於同一個子網時,子網與子網之間的連通性與二層映射無關,只與三層路由協議有關。
1)show interface (顯示有關封裝及第一二層信息及LMI/DLCI的信息)
2)show frame-relay lmi
3)sow frame-relay pvc
4)show frame-relay map
5)#clear frame-relay-inarp (清空幀中繼映射)
6)debug frame-relay lmi (調試FR LMI)
5. FR Traffic-Shapping(幀中繼的流量×××)
在幀中繼網絡中,當發送方發送數據的速率與接收方接收數據的速率不一致時,就發生了擁塞。
解決擁塞的辦法就是採用幀中繼的流量×××。
a)速率增強
b)根據BECN動態調整
c)調用隊列
5.1)幀中繼流量×××的概述。
Bc:承諾突發
在△t內,允許傳遞的最大流量,單位爲bit,這部分流量是得到服務提供商的保證的。
Be:超額突發
在CIR之外,允許傳遞的最大流量,單位爲bit,這部分流量是不會得到服務提供商的保證的。
用來計算流量的一個時間值,單位爲s.
在△t是間段內的平均速率,單位爲bit/s.
CIR=Bc/△t
服務提供商提供給用戶的最大帶寬,單位爲bit/s.
EIR=CIR+Be/△t
所有大於EIR的流量會被丟棄。通常EIR=LAR。
實際就是接口帶寬,單位爲bit/s.
當幀中繼網絡中發生擁塞的時候,會向目標發送FECN,指示網絡中已經發生擁塞。
當幀中繼網絡中發生擁塞的時候,會向源發送FECN,指示網絡中已經發生擁塞。
所有大於CIR的流量,DE會被置爲1。當幀中繼網絡中沒有發生擁塞的時候,可以傳遞,
一旦發生擁塞,最先丟棄DE爲1的流量。
(Bc+Be)| /
| /
| /
| c /
| /
| EIR
Bc| / b /
| / /
| / CIR
| / / a
| //
|/______________
△t
a區域內的流量DE=0.
b區域內的流量DE=1.
c區域內的流量丟棄.
例:
ISP對超過48kbps的流量加上de標誌,對64kbps以上的流量會drop,△t=125ms.
由題可知:
CIR=48000bit/s
EIR=64000bit/s
△t=1/8s
CIR=Bc/△t推出Bc=CIR x △t=48000x1/8=6000bit
EIR=(Bc+Be)/△t推出Be=EIR x △t-Bc=64000 x 1/8-6000=2000bit
!
map-class frame-relay cisco
frame-relay cir 48000
frame-relay bc 6000
frame-relay be 2000
!
interface s0
frame-relay traffic-shaping
frame-relay class cisco
!
Bc=7000 bit
Be=0 bit
cir=56000 bit/s
tc=125ms
mincir=1/2cir=28000 bit/s
VC List Rate Limit bits/int bits/int (ms) (bytes) Active
502 56000 875 7000 0 125 875 -
503 56000 875 7000 0 125 875 -
504 56000 875 7000 0 125 875 -
506 56000 875 7000 0 125 875 -
501 64000 1500 8000 4000 125 1000 -
設置DE=1的方法:
!
frame-relay de-list <list-number> {protocol <protocol> | interface type number} <characteristic>
characteristic:
gt
list <access-list-number>
lt
tcp port
udp port
interface s0
frame-relay de-group <group-number> <dlci>
9K 1.544M
!
map-class frame-relay cisco
frame-relay traffic-rate 9000 1544000
!
interface s0
encapsulation frame-relay
frame-relay traffic-shaping
frame-relay class cisco
!
CIR=Bc/△t
EIR=CIR+Be/△t 缺省爲接口的bandwidth.
5.3)根據BECN動態調整
當返回的BECN包增加時,表明幀中繼網絡出現了擁塞,此時路由器可以動態的降低發送速率,當返回的BECN包減少時,路由器
又可以動態的增加發送速率。
map-class frame-relay cisco
frame-relay adaptive-shaping becn
frame-relay mincir 16000 (速率最多降低到多少)
!
interface s0
encapsulation frame-relay
frame-relay traffic-shaping
frame-relay class cisco
!
5.3)調用隊列:
!
map-class frame-relay cisco
frame-relay {priority-group <list-number> | custom-queue-list <list-number>}
!
interface s0
encapsulation frame-relay
frame-relay traffic-shaping
frame-relay class cisco
!
1.VC
2.子接口
3.物理接口
4.如果都沒有,爲流量應用缺省值。
!
interface s0
encapsualtion frame-relay
frame-relay map ip 172.16.10.2 102 broadcast
frame-relay interface-dlci 102
class cisco
在VC上調用映射類,需要進到VC配置模式,
只有frame-relay interface-dlci能夠進到VC配置模式,
frame-relay map 不能進到VC配置模式。
class cisco"
幀中繼是一種數據包交換技術,與 X.25 類似。它可以使終端站動態共享網絡介質和可用帶寬。幀中繼採用以下兩種數據包技術:1)可變長數據包;2)統計多元技術。它不能確保數據完整性,所以當出現網絡擁塞現象時就會丟棄數據包。但在實際應用中,它仍然具有可靠的數據傳輸性能。
幀中繼是在一個單一的物理鏈路上統計複用多個數據流,每個數據流稱之爲虛電路(VC)。
幀中繼幀通過“虛電路”傳輸到其目的地, 幀中繼的虛電路是源點到目的點的邏輯鏈路,它提供終端設備之間的雙向通信路徑,並由數據鏈路連接標識符(DLCI)唯一標識。DLCI必定是唯一的,只要對於這兩個設備一致,DLCI的值可以是任何有效的數字。DLCI有效數字爲16-1007,0-15和1008=1023保留。幀中繼採用複用技術,將大量虛電路複用爲單一物理電路以實現跨網絡傳輸。這種能力可以降低連接終端的設備和網絡的複雜性。虛電路能夠通過任意數量的位於幀中繼數據包轉換網絡上的中間交換機。
幀中繼網絡提供的業務有兩種:永久虛電路(PVC)和交換虛電路(SVC)。永久虛電路由網絡管理器建立用來提供專用點對點連接;交換虛電路建立在呼叫到呼叫(call-by-call)的基礎上,它採用與建立 ISDN 相同的信令。
The PVC can have four possible states.These are shown by the PVC STATUS field as follows:
*ACTIVE -- PVC is up and functioning normally
*INACTIVE --PVC is not up end-to-end.This may be because either there is no mapping (or incorrect mapping) for the local DLCI in the frame-relay cloud or the remote end of the PVC in deleted.
*DELETED -- Either the Local Management Interface(DLCI) is not exchanged between the router and the local switch,or the switch does not have DLCI configured on the local switch.
*STATIC -- no keepalive configured on the frame-relay interface of the router.
幀中繼(基於 LAPF Q.922)幀結構如下所示:
1 byte | 2 bytes | Variable | 2 bytes | 1 byte |
Flags | Address | Data | FCS | Flags |
|
6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 bit |
DLCI | C/R | E | DLCI | FECN | BECN | DE | EA |
|
1 byte | 2 bytes | 1 byte | 1 byte | 1 byte | 1 byte |
Flags | LMI DLCI | I-Indicator | Protocol Dis | Call Ref | M-Type |
Information Elements (Variable) | FCS | Flags |
|
相關協議 | LAPD、ISDN、X.25、LAPF |
組織來源 | 幀中繼由 ITU-T(http://www.itu.org)和 ANSI(http://www.ansi.org)定義在 ANSI T1.618 和 ANSI T1.617 中。 |
相關鏈接 | http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/frame.htm:Understand Frame Relay |
當中央路由器使用一個物理接口連到多個遠端站點時,會引起路由方面的問題,這些問題是由橫向隔離(split horizon)引起的.橫向隔離是路由協議中的規則,用來消除路由迴路,它不允許路由更新信息從收到該信息的接口上發出去.
解決橫向隔離的問題的簡易辦法是使用子接口(subinterfaces).一個子接口是一個物理接口上的邏輯劃分.對一個邏輯子接口應當像一個物理接口一樣看待.在其上可配置多個協議,也可以關閉它,或配置像其他接口上的一般配置.但有一例外,即不能在子接口上設置封裝類型,封裝類型必須在主接口上定義.
通過在一個物理接口上創建多個邏輯子接口,子接口的配置解決了橫向隔離的問題.橫向隔離可用於路由更新信息從接口發出,而不是從該接口接收到的情況.
使用子接口包含了一個折衷.要獲得正確的橫向隔離的功能以及能夠傳遞路由更新信息,需要附加的子網.此外,每個接口一定要有它自己唯一的子網,不管配置了哪個協議.
在配置子接口的過程中,必須指明它是點對點的還是多點的.
Frame Relay subinterfaces provide a mechanism for supporting partially meshed Frame Relay networks. Most protocols assume transitivity on a logical network; that is, if station A can talk to station B, and station B can talk to station C, then station A should be able to talk to station C directly. Transitivity is true on LANs, but not on Frame Relay networks unless A is directly connected to C. Additionally, certain protocols such as AppleTalk and transparent bridging cannot be supported on partially meshed networks because they require ”split horizon,” in which a packet received on an interface cannot be sent from the same interface even if received and transmitted on different VCs. Configuring Frame Relay subinterfaces ensures that a single physical interface is treated as multiple virtual interfaces, which allows you to overcome split horizon rules. Packets received on one virtual interface can be forwarded to another virtual interface, even if they are configured on the same physical interface. Subinterfaces address the limitations of Frame Relay networks by providing a way to subdivide a partially meshed Frame Relay network into a number of smaller, fully meshed (or point-to-point) subnetworks. Each subnetwork is assigned its own network number and appears to the protocols as if it is reachable through a separate interface. (Note that point-to-point subinterfaces can be unnumbered for use with IP, reducing the addressing burden that might otherwise result.)
(2)配置帳中繼封裝;
encapsulation frame-relay
(3)配置協議方面的參數;
主機地址,每個子接口被賦予一個隔離的IP子網.
(4)配置幀中繼的特性;
LMI,DLCI等,如有需要配置地址映射.
(5)驗證
show frame-relay pvc 顯示動態或靜態配置的PVC,包括了每個PVC的DLCI,PVC狀態(ACTIVE,INACTIVE或DELETED)以及這個PVC所關聯的接口.
show frame-relay lmi 除檢查單個PVC的狀態,還可以監視路由器和交換機之間的通信狀態.
show frame-relay map 用來查看已創建的DLCI映射,它們可以是靜太的或動態的,在命令輸出中標註出.
流量整型能提供對每個虛電路的速度強制、BECN支持以及在虛電路級上的排隊(WFQ、PQ或CQ)。
幀中繼僅在快速交換和進程交換通道上支持流量×××。因此,要使用這一功能,在發送流量到該串行接口的所有接口上,都必須關閉其他交換方法。
幀中繼的流量×××能力在很大程度上依賴於檢測擁塞的能力。如果幀中繼交換機發現了網絡中的擁塞,它就在發向目的設備的幀中繼包頭中設置FECN位爲1,這個數字指出了擁塞的情況。當目的設備收到該包後,它在返回包中設備BECN值爲1,這就報告了網絡中發生擁塞的源設備,從而應當降低傳輸速率。一旦發生擁塞,任何標記爲可丟充的(DE),穿過與協商CIR不符的網絡的包都可丟棄。丟棄包的重傳留給目的設備的第四層協議(例如TCP)去解決。
如果路由器在當前時間間隔中收到BECN,它就以25%的速度降低發送速率。這個速率隨着BECN的增加一直降低(限制在每個時間間隔降低一次),直到流量速率達到最小的可接愛的入/出承諾信息速率(MINCIR),這時吞吐率的下降趨勢纔會停止。當流量速率降下來後,它需要花費16個沒有收到BECN的時間間隔來重新開始增加流量。流量按(Be+Bc)/16遞增,更準確地說,當發show frame-relay pvc命令時顯示的字節限制被除以16。速率回到原來的CIR值要比降下來用的時間更長。要縮短這個時間,可設置Be的值爲Bc的值的七倍。
只有當幀中繼流量×××是激活狀態的時候,這種情況纔會發生。
Note:The port/interface access rate can be higher than CIR.The rate is averaged over a Tc period of time.
Router(config)# map-class frame-relay ex1 創建一個映射類
Router(config-map-class)# frame-relay adaptive-shaping becn 對於吞吐率的下降,指定路由器響應BECN請求
Router(config-map-class)# frame-relay cir 128000 單位b/s,並且應當是在沒有擁塞期間傳輸的速率
Router(config-map-class)# frame-relay bc 16000 定義映射類的承諾突發大小,通常是cir/8
Router(config-map-class)# frame-relay be 0 定義映射類的超額突發(excessive burst),如果cir=端口速度,就設定Be=0
Router(config-map-class)# frame-relay mincir 64000 這裏的minicir是與電信提供商協商得到的cir,通常是實際cir的一半
Router(config-map-class)# exit
Router(config)# interface serial 0
Router(config-if)# encapsulation frame-relay
Router(config-if)# frame-rela traffic-shaping 激活幀中繼traffic shaping
Router(config-if)# interface serial 0.1 point-to-point
Router(config-subif)# ip address 10.0.1.1 255.255.255.0
Router(config-subif)# frame-relay inteface-dlci 16
Router(config-fr-dlci)# class ex1