1、,第6章 交换网络,6.1 X.25分组交换网6.2 帧中继FR,退出,6 三种交换方式, 2002, Cisco Systems, Inc. All rights reserved.,4,X.25分组交换网,X.25所讨论的都是以面向连接的虚电路服务为基础。 X.25标准是分组交换技术的鼻祖。 建立X.25标准的目的是为了使用标准的电话线建立分组交换网。,6.1 X.25网络,6.1 X.25网络,6.1.1 X.25网络的组成,6.1.1 X.25网络的组成,PSE(分组交换设备):将从某一物理链路(输入)传输来的数据分组根据一定的路由选择算法转发到另一条物理链路(输出)上; PAD(分组
2、装拆设施):为非分组式用户终端提供接入PSDN的能力; NPT(非分组式终端):不具有装拆分组能力的终端设备(一般的PC机,异步传输); PC(分组集中器):目的是为了充分利用PSE的X.25端口,将来自于多个分组式或者非分组式用户终端设备的信息流合并为一个X.25分组流送往PSE; NMC(网络管理中心):运行网络管理软件,管理整个网络的运行,包括性能管理、故障检测、差错恢复、用户入网登记及计费等,NMC的功能对整个网络的运行质量具有直接的影响;,6.1.2 分组交换数据网络的编址方式,分组交换数据网的编址方式遵循CCITT X.121建议,每个网络地址用不大于40位的十进制数表示。我国目前
3、使用的分组交换数据网的网络地址采用了15位十进制数表示,每位十进制位占用4个二进制位(半个字节)。网络地址的结构及其含义如下: 网络地址 P(1) DNIC(4) NTN(10)DNIC(4) 国家代码(3)网络编号(1)NTN(10) 结点机编号(4) 结点机端口号(4)子地址(2),6.1.2 分组交换数据网络的编址方式,P(国际前缀)用1位10进制数表示,目前取值为0; DNIC(数据网络识别码)用4位十进制数表示,其中前3位为国家或地区代码,后1位为网络编号。分配给我国的国家代码为460479,目前仅使用460表示。网络编号由国家自行分配;,6.1.2 分组交换数据网络的编址方式,NT
4、N(网络用户号码)用8位或者10位十进制数表示,由网络主管部门分配;我国规定前4位表示结点机编号,中间4位表示指定结点机的端口编号,后面的2位为子地址,由用户自行分配,适用于用户自行购置小型交换设备,组建专用分组交换数据网的情况。子地址直接对应自行购置的交换设备的端口。,6.1.3 端用户系统,X.25网络的端用户系统是指企业、部门或者个人连入X.25网络的各种计算机系统,包括各种大、中、小和微型计算机系统。这些系统及其软件(系统软件和应用软件)主要提供面向用户数据处理的服务。为了保证这些端用户系统可以方便地接入网络,PSDN提供了多种接口方式。(一)X25专线/拨号同步方式每台计算机设备占用
5、PSE或者集中器的一个端口,应当具有该端口对应的网络地址。使用此种方式接入PSDN时,MODEM必须配置为同步工作方式。,6.1.3 端用户系统,(二)专线/拨号异步方式通过专线或者电话拨号,直接接入分组装拆设备或者集中器的端口,与PSDN网络以异步方式交换信息。为了便于管理和计费,每个端用户系统都被分配一个网络用户标识(NUI)。使用此种方式接入PSDN时,用户端的MODEM必须配置为异步工作方式。(三)路由器入网方式通常,企业内部已经组建了局域网,可以使用路由器作为局域网与分组交换数据网的互联设备,保证所有局域网用户可以通过局域网接入X.25网络。,6.1.4 X.25网络,CHINAPA
6、C(国家公共数据网)1989年开通,94年二期工程,覆盖全国各省会城市和直辖市,通过省网辐射全国,已达2200多个城市,与23个国家和地区的44个网络互联,用户数为8.5万; (一)X.25网络的特点 支持OSI下三层服务,提供永久虚电路(PVC)和交换虚电路(SVC); 动态复用技术,可提高信道的利用率,简化物理接口; 分组交换网中各结点具有存储转发功能,不同速率的终端可以相互通信; 采用虚电路或数据报的方式进行分组传输。,6.1.4 X.25网络,6.1.4 X.25网络,6.1.4 X.25网络,(二)缺点 模拟信道、信道质量差,信道差错方面处理比较复杂,数据传输的网络时延较大(差错处理
7、、存储转发等),端口速率低(=64Kbps)。 X.25分组交换网适用于交换式短报文的传输,不适合实时性要求高、信息量大的业务使用。 (三)发展现状及未来发展 起着主导作用,技术规程非常完备,应用广泛; 数字技术的广泛应用,X.25技术在一定程度上已经过时,但目前主宰着许多低速应用(如:销售物理,电子银行系统,电子信箱应用等); 同时X.25也是与国外通信的主要手段(通过卫星线路或租用线路等),6.1.4 X.25网络, 2002, Cisco Systems, Inc. All rights reserved.,19,帧中继FR,Table of Contents,Frame Relay T
8、echnology Local Management Interface The Use of Subinterfaces Configuring Frame Relay,6.2.1 Introducing Frame Relay,Frame Relay is an Efficient and Flexible WAN Technology. Frame Relay reduces network costs. Frame Relay provides greater bandwidth, reliability. Frame Relay offers simpler network arch
9、itecture .,6.2.1 帧中继介绍,1984年,CCITT开始了分组交换技术的“改造工程”,并提出了一种新的分组交换技术帧中继技术,对应的标准为CCITT Q.922。 帧中继的原理 帧中继技术首先是淡化了交换设备上的层次概念,将数据链路层和网络层进行了融合。融合的目的一方面减少了层次之间的接口处理;另一方面,也可以通过对融合的功能进行分析,发现冗余项,并进行简化。 “优化”交换设备性能的另一方面是简化流量控制的功能。 上述的优化使得帧中继成为一种极为精简的协议,仅仅需要提供组帧、路由选择和高速传输的功能,从而可以获得较高的性能和有效性。,6.2.1 帧中继介绍,由于光纤在 广域网中
10、的广泛采用,传输的误码率大大降低,因此X.25的交换方式不仅不必要,反而大大降低了高速数字传输链路的使用效率。 帧中继是为了充分利用现代数字网络高速和可靠的特点而发展起来的。帧中继用简化的 X.25协议。,仅当帧中继网络本身的误比特率非常低时,帧中继技术才是可行的。 像上面这样一面接收帧就一面转发此帧,就称为快速分组交换(fast packet switching)。帧中继的帧长是可变的。还有一种叫做信元中继(Cell Relay)的快速分组交换,它采用固定帧长,每一个帧叫做一个信元。,6.2.1 帧中继介绍,6.2.1 帧中继介绍,6.2.1 帧中继介绍,The Frame Relay sw
11、itch is a DCE device. The Frame Relay switch move frames from one DTE to other DTEs.,6.2.1 Introducing Frame Relay,6.2.2 Virtual Circuits,The connection through a Frame Relay network between two DTEs is called a virtual circuit (VC). With VCs, Frame Relay shares the bandwidth among multiple users. V
12、Cs are identified by DLCIs. DLCIs have local significance.,Data-Link Connection Identifier (DLCI),6.2.2 Virtual Circuits,Local Loop Access = T1,Local Loop Access = 64 kbps,Local Access Loop = 64 kbps,DLCI: 400,PVC,DLCI: 500,LMI 100 = Active 400 = Active,DLCI: 200,DLCI: 100,PVC,FECN,BECN,6.2.3 Frame
13、Relay Frame Format,Flag - like most frame formats, the flag indicates the beginning and end of the frame The DLCI makes up the first 10 bits of the address field, while the FECN, BECN, and DE bits are the last 3 bits.,6.2.3 帧中继术语,Data-link connection identifier(DLCI): 一个DLCI就是标记帧中继网络的某个端点的一个数字标识。一个数
14、字仅对本地网络有意义。帧中继交换机在一对路由器之间对DLCI进行影射,以建立一个永久虚电路,6.2.3 帧中继术语-Frame Relay DLCIs,Frame Relay PVCs are identified by DLCIs. Frame Relay DLCIs have local significance,6.2.3 帧中继术语-Frame Relay addressing,DLCI address space is limited to ten bits,6.2.3 帧中继术语,Local management interface(LMI)在CPE与帧中继交换机之间的一套信令标准
15、,负责在设备间管理连接和维护状态 LMI可包括对如下机制的支持:保活(keepalive)机制、组播机制、组播寻址、状态机制存在多种LMI类型,路由器必须被告知哪种LMI类型被使用 常用的LMI类型有:cisco、ansi和q933a,6.2.3 帧中继术语,Committed Information Rat(CIR)服务提供商承诺提供的又保证的速率,单位kbps承诺突发Committed Burst(CB)交换机同意在一定时间内传送的最大比特数超额突发Excess Burst(EB)帧中继交换机试图传送的未获承诺的比特的最大数目。超额脉冲依赖于可获得的卖方提供的服务。,CIR = Bc /
16、Tc,B (Bc+Be) Drop,Time division multiplexer,Time division multiplexer,EIR = Be /Tc,6.2.3 帧中继术语-Frame Relay CIR,6.2.3 帧中继术语,Forward Explicit Congestion Notification(FECN)帧中继设置的一个比特,用以通知DTE接受设备应启动拥塞避免程序。当帧中继交换机识别出网络中发生拥塞,它就像目的设备发送一个FECN分组,指示拥塞发生 Back Explicit Congestion Notification(BECN)帧中继设置的一个比特,用以
17、通知DTE发送设备应启动拥塞避免程序。当帧中继交换机识别出网络中发生拥塞,它就向原路由器发送一个BECN分组,指令该路由器降低发送分组的速率,如果路由器在当前时间间隔内收到BECN,则将传输速率降低25%,DLCI-identifies logical connections on the Frame Relay switch to which the customer is attached,BECN-tells sending DTE device to reduce the rate of sending data.,FECN-tells receiving DTE device to
18、implement congestion avoidance procedures,6.2.3 帧中继术语,可丢弃指示Discard eligibility(DE)indicator一个设定比特,指示在拥塞发生时本帧可与其他帧被丢弃。当路由器检测到网络拥塞时,帧中继交换机将首先丢弃设置了DE比特的分组。超出CIR的那部分流量将设置DE比特。,6.2.3 帧中继术语-DLCI的使用,DLCI地址空间限制为10bits,产生了1024个可用DLCI Cisco LMI类型支持161007范围内的DLCI携带用户数据ANSI/ITU LMI类型支持16992范围内的DLCI携带用户数据剩余的DLCI
19、保留,部分用于LMI消息和组播地址,Cisco是用1023作为多路广播地址,6.2.3 Frame Relay Encapsulation,Frame Relay wraps Layer 3 packet with an address field that contains the DLCI and a checksum.,Frame Relay Frame Format:,6.2.3 Frame Relay Encapsulation,6.2.4 Frame Relay Topology,The simplest WAN topology is a star (Hub and Spoke)
20、.,A full mesh topology is highly reliable. A full mesh topology connects every site to every other site. For large networks, a full mesh topology is seldom affordable. Larger networks are generally configured in a partial mesh topology.,6.2.4 Frame Relay Topology,6.2.5 Frame Relay Address Mapping,A,
21、192.168.3.1/24,B,s0,C,DLCI=102,DLCI=103,192.168.3.3/24,192.168.3.2/24,Network,Interface,192.168.3.0,S 0,Routing Table,DLCI=201,DLCI=301,6.2.5 Frame Relay Address Mapping,Dynamic Mapping- Inverse ARP Inverse ARP obtains Layer 3 addresses of other stations from Layer 2 addresses. Static Mapping- frame
22、-relay map protocol protocol-address dlci broadcast ietf cisco command,LMI is a keepalive mechanism. Three types of LMIs are supported by Cisco routers.Cisco Ansi q933aRouter(config-if)# frame-relay lmi-type cisco | ansi | q933a,6.2.5 Frame Relay Address Mapping,when R1 connects to the Frame Relay n
23、etwork, it sends an LMI status inquiry message to the network. The network replies with an LMI status message containing details of every VC configured on the access link.,6.2.5 Frame Relay Address Mapping,2,Status Inquiry,2,Status Inquiry,Frame Relay Cloud,1,172.168.5.5,172.168.5.7,3,Local DLCI 100
24、 = Active,3,DLCI = 100,DLCI = 400,Local DLCI 400 = Active,If the router needs to map the VCs to network layer addresses, it sends an Inverse ARP message on each VC.,3.1.5 Frame Relay Address Mapping,Frame Relay Map 172.168.5.5 DLCI 400 Active,4,Hello, I am 172.168.5.5,5,Frame Relay Map 172.168.5.7 D
25、LCI 100 Active,Hello, I am 172.168.5.7,4,5,Frame Relay Cloud,172.168.5.5,172.168.5.7,DLCI = 100,DLCI = 400,6.3 Configuring Frame Relay,6.3.1 Configuring Basic Frame Relay,Frame Relay Configuration Tasks :Enable Frame Relay encapsulation on an interface. Configure dynamic or static address mapping. O
26、ptional TasksConfigure the LMI Configure Frame Relay traffic shaping Customize Frame Relay Monitor and Maintain Frame Relay connections,6.3.1 Configuring Basic Frame Relay Enable,Frame Relay Encapsulation: Step 1. Setting the IP Address on the Interface Step 2. Configuring Encapsulation: encapsulati
27、on frame-relay ietf R1(config-if)# Step 3. Setting the Bandwidth Step 4. Setting the LMI Type (optional)Step 5. show interfaces serial command verifies the configuration.,6.3.2 Configuring a Static Frame Relay Map,Dynamic mapping is performed by the Inverse ARP feature. Static mapping is manually co
28、nfigured . Frame Relay is NBMA networks. NBMA networks do not support multicast or broadcast traffic by default. The broadcast keyword allows broadcasts and multicasts over the PVC .,Use the frame-relay map command to configure a Static Frame Relay Map. Use the no frame-relay inverse-arp command to
29、disable the Frame Relay dynamic mapping.,6.3.2 Configuring a Static Frame Relay Map,DLCI = 110 IP Address = 10.16.0.1/24,p1r1,DLCI = 100 IP Address = 10.16.0.2/24,interface Serial1ip address 10.16.0.1 255.255.255.0encapsulation frame-relayno frame-relay inverse-arpbandwidth 64frame-relay map ip 10.1
30、6.0.2 110 broadcast,HQ,Branch,BranchB(config)#interface Serial1 BranchB(config-if)#ip address 10.16.0.3 255.255.255.0 BranchB(config-if)#encapsulation frame-relay BranchB(config-if)#bandwidth 56 BranchB(config-if)#frame-relay map ip 10.16.0.2 301 broadcast,Branch,BranchB,Central,BranchA,10.16.0.2/24
31、,Central site,VC,VC,10.16.0.3/24,DLCI=102,DLCI=103,DLCI=201,DLCI=301,10.16.0.1/24,6.3.2 Configuring a Static Frame Relay Map,6.3.2 Configuring a Static Frame Relay Map,Branch,BranchB(config)#interface Serial1 BranchB(config-if)#ip address 10.16.0.2 255.255.255.0 BranchB(config-if)#encapsulation fram
32、e-relay BranchB(config-if)#bandwidth 56 BranchB(config-if)#frame-relay map ip 10.16.0.3 201 broadcast,Central,BranchA,10.16.0.2/24,Central site,VC,VC,10.16.0.3/24,DLCI=301,BranchB,DLCI=102,DLCI=103,10.16.0.1/24,DLCI=201,6.4 Advanced Frame Relay Concepts,Frame Relay default: nonbroadcast, multiaccess
33、 (NBMA),6.4 选择 Frame Relay 拓扑,路由更新的可达性问题,Problem: 必须为每个活动连接复制广播流量. 水平分割问题,Routing Loops,6.4.1 Definition and Implication,What is a Routing Loop? A routing loop is a condition in which a packet is continuously transmitted within a series of routers without ever reaching its intended destination netwo
34、rk. Routing loops may be caused by:Incorrectly configured static routesIncorrectly configured route redistributionSlow convergenceIncorrectly configured discard routes,Routing loops can create the following issues:Excess use of bandwidthCPU resources may be strainedNetwork convergence is degradedRou
35、ting updates may be lost or not processed in a timely manner There are a number of mechanisms available to eliminate routing loops:Defining a maximum metric to prevent count to infinityHolddown timersSplit horizonRoute poisoning or poison reverseTriggered updates,6.4.1 Definition and Implication,Mai
36、ntaining Routing Information ProblemRouting Loops,A,B,C,E0,S0,S0,S1,S0,E0,Routing Table,10.3.0.0,S0,E0,S0,S0,1,2,10.1.0.0,10.2.0.0,10.4.0.0,0,0,Routing Table,10.1.0.0,E0,S0,S0,S0,1,2,10.4.0.0,10.3.0.0,10.2.0.0,0,0,Routing Table,10.2.0.0,S0,S1,S1,S0,1,1,10.1.0.0,10.4.0.0,10.3.0.0,0,0,Convergence,10.1
37、.0.0/24,10.3.0.0/24,10.4.0.0/24,10.2.0.0/24,/24,/24,/24,Slow convergence produces inconsistent routing,X,A,B,C,E0,S0,S0,S1,S0,E0,Routing Table,10.3.0.0,S0,E0,S0,S0,1,2,10.1.0.0,10.2.0.0,10.4.0.0,0,Routing Table,10.1.0.0,E0,S0,S0,S0,1,2,10.4.0.0,10.3.0.0,10.2.0.0,0,0,Routing Table,10.2.0.0,S0,S1,S1,S
38、0,1,1,10.1.0.0,10.4.0.0,10.3.0.0,0,0,Down,10.1.0.0/24,10.3.0.0/24,10.4.0.0/24,10.2.0.0/24,OR,/24,/24,/24,6.4.2 Problem: Count to Infinity,Router C concludes that the best path to network 10.4.0.0 is through Router B,X,A,B,C,E0,S0,S0,S1,S0,E0,Routing Table,10.3.0.0,S0,S0,S0,S0,1,2,10.1.0.0,10.2.0.0,1
39、0.4.0.0,0,2,Routing Table,10.1.0.0,E0,S0,S0,S0,1,2,10.4.0.0,10.3.0.0,10.2.0.0,0,0,Routing Table,10.2.0.0,S0,S1,S1,S0,1,1,10.1.0.0,10.4.0.0,10.3.0.0,0,0,10.1.0.0/24,10.3.0.0/24,10.4.0.0/24,10.2.0.0/24,/24,/24,/24,4.4.2 Problem: Count to Infinity,X,A,B,C,E0,S0,S0,S1,S0,E0,Routing Table,10.3.0.0,S0,S0,
40、S0,S0,1,2,10.1.0.0,10.2.0.0,10.4.0.0,0,Routing Table,10.1.0.0,E0,S0,S0,S0,1,4,10.4.0.0,10.3.0.0,10.2.0.0,0,0,Routing Table,10.2.0.0,S0,S1,S1,S0,3,1,10.1.0.0,10.4.0.0,10.3.0.0,0,0,2,Router A and Router B updates its table to reflect the new but erroneous hop count,10.1.0.0/24,10.3.0.0/24,10.4.0.0/24,
41、10.2.0.0/24,/24,/24,/24,4.4.2 Problem: Count to Infinity,Packets for network 10.4.0.0 bounce between routers A, B, and C Hop count for network 10.4.0.0 counts to infinity,X,A,B,C,E0,S0,S0,S1,S0,E0,Routing Table,10.3.0.0,S0,S0,S0,S0,1,2,10.1.0.0,10.2.0.0,10.4.0.0,0,Routing Table,10.1.0.0,E0,S0,S0,S0,
42、1,6,10.4.0.0,10.3.0.0,10.2.0.0,0,0,Routing Table,10.2.0.0,S0,S1,S1,S0,5,1,10.1.0.0,10.4.0.0,10.3.0.0,0,0,4,10.1.0.0/24,10.3.0.0/24,10.4.0.0/24,10.2.0.0/24,/24,/24,/24,4.4.2 Problem: Count to Infinity,解决可达性问题,水平分割在NBMA环境中会造成问题. 子接口可以解决水平分割问题. Solution: 一个物理接口模拟多个逻辑接口.,Frame Relay Address Mapping,使用LM
43、I从FR交换机处得到具有本地意义的DLCI号. 使用 Inverse ARP将本地的DLCI号与远程路由器的网络层地址相映射.,Frame Relay Signaling,Cisco supports three LMI standards: Cisco ANSI T1.617 Annex D ITU-T Q.933 Annex A,Configuring Advanced Frame Relay,Configure Frame Relay Subinterfaces,Packets received on one virtual interface can be forwarded to a
44、nother virtual interface, even if they are configured on the same physical interface.,Point-to-point Subinterfaces act like leased lines. Each point-to-point subinterface requires its own subnet. Point-to-point is applicable to hub and spoke topologies. Multipoint Subinterfaces act like NBMA network
45、s, so they do not resolve the split-horizon issues. Multipoint can save address space because it uses a single subnet. Multipoint is applicable to partial mesh and full mesh topologies.,Configure Frame Relay Subinterfaces,Step 1. Remove any network layer address assigned to the physical interface. S
46、tep 2. Configure Frame Relay encapsulation on the physical interface. Step 3. For each of the defined PVCs, create a logical subinterface. Step 4. Configure an IP address for the interface and set the bandwidth. Step 5. Configure the local DLCI on the subinterface using the frame-relay interface-dlc
47、i command.,Configure Frame Relay P2P Subinterfaces,Configure Frame Relay Subinterfaces,A,10.17.0.1 s0.2,B,interface Serial0no ip addressencapsulation frame-relay ! interface Serial0.2 point-to-pointip address 10.17.0.1 255.255.255.0bandwidth 64frame-relay interface-dlci 110 ! interface Serial0.3 poi
48、nt-to-pointip address 10.18.0.1 255.255.255.0bandwidth 64frame-relay interface-dlci 120 !,s0.3 10.18.0.1,C,10.17.0.2/24,10.18.0.2/24,DLCI =110,DLCI =120,Configure Frame Relay P2MP Subinterfaces,Configure Frame Relay Subinterfaces,interface Serial1no ip addressencapsulation frame-relay ! interface Serial1.2 multipointip address 10.17.0.1 255.255.255.0bandwidth 64frame-relay map ip 10.17.0.2 120 broadcastframe-relay map ip 10.17.0.3 130 broadcastframe-relay map ip 10.17.0.4 140 broadcast,s1=10.17.0.2/24,s1.2=10.17.0.1/24,s0.1=10.17.0.4/24,