收藏 分享(赏)

计算机网络复习ppt.ppt

上传人:dreamzhangning 文档编号:3349910 上传时间:2018-10-17 格式:PPT 页数:105 大小:3.97MB
下载 相关 举报
计算机网络复习ppt.ppt_第1页
第1页 / 共105页
计算机网络复习ppt.ppt_第2页
第2页 / 共105页
计算机网络复习ppt.ppt_第3页
第3页 / 共105页
计算机网络复习ppt.ppt_第4页
第4页 / 共105页
计算机网络复习ppt.ppt_第5页
第5页 / 共105页
点击查看更多>>
资源描述

1、Computer Networks 计算机网络,2018/10/17,Computer Networks,2,时间安排,答疑时间:18周周三、19周周一,上午10:00-12:00 期末考试:19周周三(06月27日) 14:00-16:00,厚209 实验:19周周四20周周二,2018/10/17,Computer Networks,3,What is a Computer Network?,Computer Network is an interconnected collection of autonomous (自治的) computers connected by a single

2、 technology.The Internet is a network of networks.,2018/10/17,Computer Networks,4,Classification of Networks,by scale LAN, WAN and MANby topology Bus, Star, Ring and Treeby switching approach Circuit switching and Packet switchingby transmission media Wireless network and Wired network,2018/10/17,Co

3、mputer Networks,5,Circuit Switching电路交换,Link bandwidth, switch capacity Dedicated resources with no sharing Guaranteed transmission capacity Call setup required,End-to-end resources reserved for “call”,2018/10/17,Computer Networks,6,Circuit Switching电路交换,Capacity of medium(媒体,介质) exceeds the capacit

4、y required for transmission of a single signal How can we improve “efficiency”? Lets multiplex(复用). Divide link bandwidth into “pieces”: FDM (Frequency Division Multiplexing 频分复用) TDM (Time Division Multiplexing 时分复用),2018/10/17,Computer Networks,7,Circuit Switching: FDM and TDM,partial link bandwid

5、th,Time slot(时隙),2018/10/17,Computer Networks,8,Packet Switching分组交换,source breaks long messages into smaller “packets(数据包,数据分组)” packets share network resources each packet uses full link bandwidth “store-and-forward(存储转发)” transmission,2018/10/17,Computer Networks,9,A,C,E,B,D,H1,H3,H5,H6,H4,H2,分组交

6、换网示意图,访问结点,用户子网,通信子网,转接结点,链路,2018/10/17,Computer Networks,10,Packet Switching: Statistical Multiplexing,Sequence of A & B packets does not have fixed pattern statistical multiplexing统计多路复用.,A,B,C,10 Mbs Ethernet,1.5 Mbs,statistical multiplexing,Queue(队列) of packets waiting for output link,2018/10/17

7、,Computer Networks,11,How do loss and delay occur?,packets queue in router buffers packet arrival rate to link exceeds output link capacity packets queue, wait for turn if queue is full, arriving packets dropped (Drop-Tail),A,B,2018/10/17,Computer Networks,12,dproc = processing delay(处理时延) typically

8、 a few microsecs or less dqueue = queuing delay(排队时延) depends on congestion dtrans = transmission delay(发送时延) = L/R, significant for low-speed links dprop = propagation delay(传播时延) a few microsecs to hundreds of msecs,Four sources of packet delay,2018/10/17,Computer Networks,13,Nodal delay,总时延=处理时延+

9、排队时延+发送时延+传播时延,2018/10/17,Computer Networks,14,Packet switching vs. Circuit switching,Packet switching is great for bursty data (突发性数据) resource sharing Packet switching causes excessive(额外的) congestion, packet delay and loss protocols needed for reliable data transfer, congestion control,Is packet

10、switching a “slam dunk” winner?,2018/10/17,Computer Networks,15,Network Architecture 网络体系结构,OSI (Open System Interconnection) is an ISO standard for worldwide communications The OSI Reference Model defines a networking framework for implementing protocols in seven layers.,2018/10/17,Computer Network

11、s,16,The ISO/OSI Reference Models,2018/10/17,Computer Networks,17,A protocol is the special set of rules used to control communication between entities. Based on the communication between two entities controlled by protocols, one layer provides services to another layer above.,Network Architecture 网

12、络体系结构,2018/10/17,Computer Networks,18,Relationship between a service and a protocol.,Network Architecture 网络体系结构,2018/10/17,Computer Networks,19,Application,Presentation,Session,Transport,Network,Data Link,Physical,Application,Presentation,Session,Transport,Network,Data Link,Physical,Physical,Contro

13、l is passed from one layer to the next, starting at the application layer in one station, proceeding to the bottom layer, over the channel to the next station and back up the hierarchy.,Network Architecture 网络体系结构,2018/10/17,Computer Networks,20,Physical Layer how to transmit bits to the channel; Da

14、ta Link Layer how to transmit frames to adjacent node (neighbour), over a single link ; Network Layer how to route packets to a host on the other side, across network(s),Network Architecture 网络体系结构,2018/10/17,Computer Networks,21,Transport Layer how to send data segments to a process running on anot

15、her host , across network(s) Session Layer manage connections Presentation Layer encode/decode messages, security, encryption Application Layer everything else!,Network Architecture 网络体系结构,2018/10/17,Computer Networks,22,Comparison: OSI and TCP/IP,Physical,Data Link,Network,Transport,Session,Present

16、ation,Application,Network Interface,IP,Transport,Application,2018/10/17,Computer Networks,23,TCP/IP Architecture,The TCP/IP Architecture was defined by Internet Engineering Task Force (IETF) Transparent Design Everything over IP; IP over Everything; Best-effort., ,FTP,TCP,UDP,IP,NET,1,NET,2,NET,n,HT

17、TP,Multi- media,TFTP,2018/10/17,Computer Networks,24,Encapsulation,App.,TCP,IP,Ethernet driver,User Data,User Data,Com.,Application PDU,Application PDU,TcpH,TcpH,IpH,Application PDU,TcpH,IpH,EthH,Eth.T,message,TCP segment,IP packet,Ethernet frame,Ethernet,2018/10/17,Computer Networks,25,De-capsulati

18、on,App.,TCP,IP,Ethernet driver,User Data,User Data,Com.,Application PDU,Application PDU,TcpH,TcpH,IpH,Application PDU,TcpH,IpH,EthH,Eth.T,message,TCP segment,IP packet,Ethernet frame,Ethernet,2018/10/17,Computer Networks,26,Encapsulation and Demultiplexing,2018/10/17,Computer Networks,27,Encapsulati

19、on and Demultiplexing: Ethernet Header,2018/10/17,Computer Networks,28,Encapsulation and Demultiplexing: IP Header,2018/10/17,Computer Networks,29,Encapsulation and Demultiplexing: IP Header,2018/10/17,Computer Networks,30,Encapsulation and Demultiplexing: TCP Header,Option: maximum segment size,201

20、8/10/17,Computer Networks,31,Encapsulation and Demultiplexing: TCP Header,2018/10/17,Computer Networks,32,Mechanical and electrical specifications Encoding/Dencoding techniques Propagation Effects: Attenuation衰减, Distortion失真, Noise噪音, Interference冲突, ,The Physical Layer,2018/10/17,Computer Networks

21、,33,Bandwidth带宽: Capacity of a media to carry information A channel is a portion of the total bandwidth used for a specific purpose. Simplex channel 单工信道, Half-duplex channel 半双工信道 Full-duplex channel 全双工信道.,The Physical Layer,2018/10/17,Computer Networks,34,Wired Transmission Media: Twisted pair 双绞

22、线 Coaxial cable同轴电缆 Fiber optic cable光缆 Wireless Transmission Media: radio wave无线电波 microwave微波 (including satellite) infrared红外线,The Physical Layer,2018/10/17,Computer Networks,35,The data link layer is responsible for efficient reliable communication across a physical link. LOGICAL LINK sublayer (

23、LLC) MEDIA ACCESS sublayer (MAC) Ethernet (IEEE802.3) Wireless LAN (IEEE802.11),The Data Link Layer,2018/10/17,Computer Networks,36,The Data Link Layer,OSI,Application,Presentation,Session,Transport,Network,Data Link,Physical,Framing Error control Flow control,Transmission/reception of frames,MEDIA

24、ACCESS sublayer,LOGICAL LINK sublayer,2018/10/17,Computer Networks,37,Sender A,Receiver B,frame1,ack,frame2 重发,frame2,ack,nak,frame3,Data Link Protocols,Protocols in which the sender sends one frame and then waits for an acknowledgement before proceeding are called stop-and-wait.,2018/10/17,Computer

25、 Networks,38,Stop and Wait Protocols停止等待协议,Problem: B sends a NAK frame back to A, after having received a data frame with errors. What happens if A always gets NAK frames.,Solution: set a max. number for retransmission times, e.g. 8. If not successful, gives an error report to the above layer.,2018

26、/10/17,Computer Networks,39,Stop and Wait Protocols停止等待协议,Problem: Due to poor link conditions, the frame sent by A doesnt get B at all. It gets lost ! In this case, A will never get any response from the peer.,Solution: schedule a timeout timer to expire at some time after the ACK should have been

27、returned. If the timer goes off, retransmit the frame.,2018/10/17,Computer Networks,40,Stop and Wait Protocols停止等待协议,Problem: Retransmissions may introduce duplicate frames received by B,Solution: assign sequence numbers序号 for every frame, so that B can distinguish between new frames and old copies.

28、 However, an ACK for the duplicated frame is still necessary!,2018/10/17,Computer Networks,41,A protocol, in which the sender waits for a positive acknowledgement before advancing to the next data item, are often called ARQ (Automatic Repeat reQuest). The ARQ protocol is very simple; Unfortunately,

29、it gives poor link utilization.,Stop and Wait Protocols停止等待协议,2018/10/17,Computer Networks,42,Stop-and-Wait Protocol Performance,Propagation delay:defined as the delay between transmission and receipt of frames between hostscan be used to estimate timeout period, Frame transmission time, Acknowledgm

30、ent transmission time, Total delay (ignoring ACK transmission time):,A,B,2018/10/17,Computer Networks,43,Of this time, only tframe is actually spent transmitting data. Therefore, the efficiency or utilization is:,If we define a:,then,Stop-and-Wait Protocol Performance,2018/10/17,Computer Networks,44

31、,目的:限制发送方已经发出,但未被确认的数据帧的数目。 发送窗口用来控制发送方的流量。发送窗口内的帧是允许发送的帧,而不考虑有没有收到接收方的确认。,滑动窗口协议 (Sliding Window Protocols),2018/10/17,Computer Networks,45,0,1,2,3,4,5,6,7,8,9,发送方,接收方,N=5,10,滑动窗口协议 (Sliding Window Protocols),2018/10/17,Computer Networks,46,发送方,接收方,N=5,0,1,2,3,4,5,6,7,8,9,10,滑动窗口协议 (Sliding Window

32、Protocols),2018/10/17,Computer Networks,47,0,1,2,3,4,5,6,7,8,9,发送方,接收方,10,N=5,滑动窗口协议 (Sliding Window Protocols),2018/10/17,Computer Networks,48,PPP是目前最流行的数据链路层协议 PPP is the most popular protocol for the Data link layer,2018/10/17,Computer Networks,49,Ethernet以太网,The 802.3 standard describes the oper

33、ation of the MAC sub-layer in a bus LAN that uses CSMA/CD Mechanism for Channel Access信道访问机制CSMA/CD: Carrier Sense Multiple Access with Collision Detection载波侦听多路存取/碰撞检测,2018/10/17,Computer Networks,50,CSMA载波侦听、多路存取,Carrier Sense: With carrier sensing, A host will only transmit its own frames when it

34、 cannot hear any data being transmitted by other hosts. Multiple Access: Multiple hosts share a single channel,载波侦听: 每个主机在发送数据之前首先监听信道,只有当信道空闲时才发送数据帧;如果信道忙,暂不发送(退避一个随机的时间),以免发生碰撞; 多路存取: 多个主机共享信道。,2018/10/17,Computer Networks,51,CSMA/CD 载波侦听多路存取 / 冲突检测,CSMA with Collision Detection The host always li

35、stens to the cable while it is transmitting data. It aborts transmission as soon as it detects a collision It tries later again, with a “binary exponential back-off algorithm”,冲突检测:在发送数据的过程中始终监听信道,一旦冲突立即中止发送,退避一个随机时间(二进制指数退避算法),再重新发送。,2018/10/17,Computer Networks,52,Ethernet以太网,When a host transmits

36、 a frame, there is a small chance that a collision will occur, i.e. non-deterministic不确定性 The frame should be longer enough for sender to detect the collision,2018/10/17,Computer Networks,53,Ethernet以太网,This means that the frame must be of a minimum length. The minimum frame size is related to the d

37、istance which the network spans; the type of media being used; the number of repeaters中继器 which the signal may have to pass through to reach the furthest part of the LAN.,2018/10/17,Computer Networks,54,Ethernet以太网,Ethernet defines a minimum frame size, i.e. no frame may have less than 46 bytes of p

38、ayload.,2018/10/17,Computer Networks,55,Ethernet Bandwidth,Ethernet: 10Mbps FastEthernet: 100Mbps Gigabit Ethernet: 1Gbps,2018/10/17,Computer Networks,56,Ethernet Cabling,“10”代表信号传输速率为10Mbps。 “BASE”代表是基带信号。 “5”表示每一段电缆的最大长度为500m。 “2”表示每一段电缆的最大长度为200m(实际上是185m)。 “T”代表双绞线 “”代表光缆,2018/10/17,Computer Net

39、works,57,Ethernet Cabling,In option of 10Base-T Ethernet Cabling, all stations have a cable running to a central hub 集线器in which they are all connected electrically. In this case, the physical topology of the LAN is star, however, the logical topology is still bus.,2018/10/17,Computer Networks,58,Et

40、hernet Cabling,Stations must compete the shared channel using CSMA/CD before transmit frames. Only one station can transmit at a time, Otherwise, a collision will occur!,2018/10/17,Computer Networks,59,双绞线Ethernet总是和集线器配合使用。 术语:10Base-T Ethernet “10”代表10Mbit/s的数据率。“T”代表双绞线星型网。 用集线器Hub来连接站点。物理上是星型网,但

41、逻辑上仍是总线网。各站仍使用CSMA/CD协议,并共享逻辑上的总线。,各站必须竞争公共信道,并在任何时刻只有一个站可以发送数据。否则发生碰撞!,Ethernet Cabling,2018/10/17,Computer Networks,60,Ethernet Extension,At the Physical Layer Hub集线器 Repeaters中继器 At the Data Link Layer Bridge(网桥) Switch(交换机) At the Network Layer Internetworking ,2018/10/17,Computer Networks,61,Wi

42、reless LAN无线局域网,IEEE 802.11 defines CSMA/CA protocol. CSMA part is the same as in 802.3 Ethernet, CA stands for Collision Avoidance 冲突避免 How CSMA/CA works: Device wanting to transmit senses the medium (Air) If medium is busy defers If medium is free for certain period, transmits frame,2018/10/17,Com

43、puter Networks,62,avoid collisions: two or more nodes transmitting at same time 802.11: CSMA sense(监听) before transmitting dont collide with ongoing transmission by other node,CSMA/CA 载波监听多路存取/冲突避免,2018/10/17,Computer Networks,63,802.11 sender if sense channel idle for DIFS then transmit entire fram

44、e (no CD) 802.11 receiver - if frame received OKreturn ACK after SIFS (ACK needed due to hidden terminal problem),sender,receiver,CSMA/CA 载波监听多路存取/冲突避免,2018/10/17,Computer Networks,64,802.11: no collision detection(没有冲突检测)! cant sense all collisions in any case: hidden terminal隐蔽终端, fading信号衰减 goal:

45、 avoid collisions: CSMA/C(ollision)A(voidance),CSMA/CA 载波监听多路存取/冲突避免,2018/10/17,Computer Networks,65,Wireless LAN无线局域网,By sending Request to Send (RTS), sender is allowed to “reserve” channel rather than random access of data frames: avoid collisions of long data frames,2018/10/17,Computer Networks,

46、66,Collision Avoidance(冲突避免): RTS/CTS exchange,A,B,time,defer,C,2018/10/17,Computer Networks,67,Infrastructure mode,Access Point (AP),Internet,IEEE802.11 WLAN,2018/10/17,Computer Networks,68,Ad Hoc mode,IEEE802.11 WLAN,2018/10/17,Computer Networks,69,The network layer, based on services provided by

47、the data link layer, provides a end-to-end transparent path for end-to-end transparent data transmission across networks.,The Network Layer,2018/10/17,Computer Networks,70,The functions of network layer : Store-and-Forward Packet 数据包存储转发 A host with a packet to send transmits it to the nearest route

48、r; The packet is stored there until it has fully arrived so the checksum can be verified; Then it is forwarded to the next router along the path until it reaches the destination host, where it is delivered.,2018/10/17,Computer Networks,71,The functions of network layer : Routing路由选择 packets are injected into the subnet individually and routed independently of each other. Routing involves the selection of the best paths for packets from source to destination,A,C,E,B,D,H1,H2,The routing algorithm路由选择算法 is responsible for deciding which output line an incoming packet should be transmitted on,

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 高等教育 > 大学课件

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报