《计算机网络与因特网》课件林坤辉.ppt
Computer Networks and Internets计算机网络与因特网课件 林坤辉 2004-02-6,PART II Packet Transmission,Chapter 11 Extending LANs:Fiber Modems,Repeaters,Bridges,and Switches局域网扩展:光纤调制解调器、中继器、网桥和交换机,11.1 Introduction,Each LAN technology is designed for a specific combination of speed,distance,and cost.The designer specifies a maximum distance that the LAN can span,with typical LANs designed to span a few hundred meters.,网络互联设备,11.2 Distance Limitation and LAN Design,Distance limitation is a fundamental part of LAN designs.Engineers choose a combination of capacity,maximum delay,and distance that can be achieved at a given cost.To help save expense,LAN technologies usually use a shared communication medium.,A LAN design must include a mechanism that guarantees each station fair access to the shared medium.Hardware is engineered to emit a fixed amount of electrical power,the signal cannot reach arbitrarily far.LAN hardware is engineered for a fixed maximum length cable,The hardware will not work correctly over wire that exceed the bound.,11.3 Fiber Optic Extensions,A pair of fiber modems and optical fibers can be used to provide a connection a computer and a remote LAN.Because delays across fiber are low and bandwidth is high,the mechanism will operate correctly across distances of several kilometers.,11.4 Repeaters中继器,A repeater is usually an analog electronic device that continuously monitors electrical signals on each cable.When it senses a signal on one cable,the repeater transmits an amplified copy on the other cable.,中继器(1),中继器(2),A repeater connects two Ethernet cables called segments,each of which has the usual termination.Repeaters do not understand the frame format,nor do they have physical addresses.Any pair of computers on the extended LAN can communication,the computers do not know whether a repeater separates them.,The repeater attaches directly to the Ethernet cables and sends copies of electrical signals from one to other without waiting for a complete frame.A repeater does not distinguish between the signals that correspond to a valid frame and other electrical signals.If a collision or electrical interference occurs on one segment,repeaters cause the same problem to occur on all other segments.,If more than four repeaters separate any pair of stations,the network will not operate correctly.,11.5 Bridges网桥,A bridge is an electrical device that connects two LAN segments.A bridge handles complete frame and uses the same network interface as a conventional computer.The bridge listens to traffic on each segment in promiscuous mode(混合模式).When it receives a frame from one segment,the bridge verifies that frame arrived intact,and then forwards a copy of the frame to the other segment if necessary.,网桥(1),网桥(2),定义:网桥(bridge)用于连接两个局域网的一种互联设备。功能:在不同的LAN之间进行互联;用于网段微化,有利于调节负载;对于802.3,可以扩展网络的物理距离;不同的网段之间进行隔离,有助于保密。,Any pair of computers on the extended LAN can communication,the computers do not know whether a bridge separates them.A bridge does not forward interference or other problems.,工作原理网桥接收一帧后的处理过程为:(1)如果目的站点与源站点在同一个LAN中,则扔掉此帧;(2)如果目的站点与源站点不在同一个LAN中,则通过某端 口转发此帧;(3)否则,将该帧扩散到除接收端口外的所有其他端口。反向学习算法网桥根据反向传送的帧来填写转发表的地址记录学习(填表)忘记重新学习Spanning Tree(802.1d)算法用生成树来解决在帧扩散中所产生的广播风暴问题,4个局域网和2个网桥的配置,两个并行的透明桥,11.6 Frame Filtering 帧过滤,A typical bridge consists of a conventional computer with a CPU,memory,and two network interfaces.A bridge does not run application software,the CPU executes code from ROM.The most valuable function a bridge performs is frame filtering.When a frame arrives on a segment,the bridge extracts and checks the source address and the destination address.,Most bridges are called adaptive or learning bridges because they learn the locations of computers automatically.,11.7 Startup and Steady State Behavior of Bridged Networks桥接网络的启动与稳态特征,When it first boots,a bridge does not know which computers attach to which LAN segment.If a computer did not send any frames,a bridge could not detect its location.In the steady state,a bridge forward each frame only as far as necessary,11.8 Planning A Bridged Network 规划一个桥接网络,Bridge hardware is engineered to permit communication on separate segments at the same time.The design of a bridged network is parallelism:computers on one segment can communication at the same time as computers on another segment.A set of computers that interact frequently should be attached to the same segment.,4个源路径桥和4个局域网的配置,11.9 Bridging Between Buildings 大楼间桥接,11.10 Bridging Across Longer Distances 远程桥接,In addition to filtering,bridge hardware used with long-distance connections must perform buffering,11.11 A Cycle of Bridges 网桥环,A bridge network can span many segments.One bridge is needed to connect each segment to the rest of the bridge network.A bridge always forwards a copy of a frame sent to broadcast address.Not all bridge can be allowed to forward broadcast frames,or a cycle of bridges introduces a problem.,11.12 Distributed Spanning Tree 分布生成树,To prevent the problem of infinite loops,a bridged network must not allow both of the following condition to occur simultaneously:All bridge forward all frames.The bridged network contains a cycle of bridged segments.,The bridges perform a computation known as the distribute spanning tree(DST分布生成树)algorithm to decide which bridges will not forward frames.After the DST algorithm completes,the bridges that agree to forward frames form a graph that does not contain any cycles(i.e.,a tree).,11.13 Switching 交换,A switched LAN consists of a single electronic device that transfers frames among many computers.A switch contains processors and a central interconnect.A processor looks up the address in an incoming frame,and then uses the interconnect to transfer the frame to the correct output port.In practice,a switch is not constructed from independent bridges,6.4 局域网交换机(LAN Switch),交换机内部结构,11.14 Combining Switches and Hubs交换机与集线器的结合,Instead of connecting one computer to each port on a switch,the organization connects a hub to each port,and then connects each computer to one of the hubs.,路由器,网关,作业,习题:,简述中继器、网桥和交换机的作用与区别。,