1 / 73

Computer Networking

广西医科大学. Computer Networking. 网络课件. 双语教学. 模拟实验. 计算机网络教研室. DI. 1. 2. 3. CHAPTER 4 Introduction to Protocols. The first section. Exercises. Online lecture. Homes. Buildings. Appliances. . . . Computers. People. Transportation Vehicles. $. Vending Machines. Smart Cards.

red
Download Presentation

Computer Networking

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 广西医科大学 ComputerNetworking 网络课件 双语教学 模拟实验 计算机网络教研室

  2. DI 1 2 3 CHAPTER 4 Introduction to Protocols The first section Exercises Online lecture

  3. Homes Buildings Appliances ... Computers People Transportation Vehicles $ Vending Machines Smart Cards Public Infrastructure Chapter 4 Introduction to Protocols Tangzhong zhongt@gxmu.edu.cn www.gxmu.edu.cn

  4. Chapter 4 Introduction to Protocols • 4-1 Introduction • 4-2 A Definition of the Need for Protocols • 4-3 A Simple Protocol Suite • 4-4 Protocol Layers 4-5 Protocol Functions • 4-6 Transport Protocols • 4-7 Data Link Protocols www.gxmu.edu.cn

  5. KEY TERMS Chapter 4 Introduction to Protocols • Application layer Fragmentation Segmentation Check character Multiplexing Transport layer Connectionless Network access layer Connection-oriented UDPTDP PDU Virtual circuit www.gxmu.edu.cn

  6. 4.1 INTRODUCTION Chapter 4 Introduction to Protocols 1 2 3 The concept of protocols. The need for protocols The principles of protocols Tcp/ip will be used as an example www.gxmu.edu.cn

  7. 4-2 A DEFINTION AND THE NEED Chapter 4 Introduction to Protocols • A protocol is a set of rules or guidelines that govern the interactions between people, between people and machines, or between machines. *Communications protocols define what needs to be done but not how to do it.F * www.gxmu.edu.cn

  8. Why must Protocols for computer communication be more precisely defined than the protocols humans use? Chapter 4 Introduction to Protocols • Because computers don’t have the human ability to interpret subtleties in the tone of a voice or to apply judgment when unusual or unexpected events occur. www.gxmu.edu.cn

  9. Where is protocols ? Chapter 4 Introduction to Protocols • Protocols are most often implemented in software and layers. The binding protocols Protocols with the network card driver A number of protocols can be bundled with a card  An agreement can bind to multiple card www.gxmu.edu.cn

  10. Why protocols layered ? Chapter 4 Introduction to Protocols systemA systemB N+1Protocol N+1 N+1 NProtocol N N N-1Protocol To make it easy to develop ,test, and modify the protocol software,it is generally developed layer by layer. N-1 N-1 www.gxmu.edu.cn

  11. Protocol stack(Protocol Suite ) • A protocol stack is the collection of software modules that implement a protocol. • This collection of software modules is normally call a protocol stack. TCP/IP、IPX/SPX、AppleTalk etc www.gxmu.edu.cn

  12. The Principle of Peer layer communication • Ban on direct communication between the peer layers (WHY?) Each layer must rely on the lower layer of the services provided. www.gxmu.edu.cn

  13. Flag Address Ctrl Data FCSS Flag SOH HEAD STX TEXT ETX BCC Protocol Three elements  • Grammar:(what to do)数据与控制信息的格式、数码编码等。 • Semantics:(how to do)是指对构成协议的协议元素含义的解释,也即“讲什么。 • 在HDLC协议中,标志Flag(7EH)表示报文的开始和结束 • 在BSC协议中,SOH(01H)表示报文的开始,STX(02H)表示报文正文的开始,ETX(03H)表示报文正文的结束。 • Timing:(when to do)它规定了事件的执行顺序。 • Telephone ,Traffic lights HDLC BSC www.gxmu.edu.cn

  14. Chapter 4 Introduction to Protocols TIMING SAMPLE www.gxmu.edu.cn

  15. 4-3 A SIMPLE PROTOCOL SUITE Chapter 4 Introduction to Protocols • A hypothetical protocol suite that has some similarity to TCP/IP. • Application : • Don`t deal directly with all the intricacies of the communication process. • Communication services: • Collection of activities . • Network access: • E-mail commands and data are exchanged . www.gxmu.edu.cn

  16. Chapter 4 Introduction to Protocols Figure 4-1 The layers of a hypothetical protocol. www.gxmu.edu.cn

  17. Chapter 4 Introduction to Protocols Figure 4-2 The flow of data and commands in the protocol stack. www.gxmu.edu.cn

  18. TCP/IP Protocol Suite Chapter 4 Introduction to Protocols Underlying-LayerLAN or WAN Technology SMTP 应用层 SNMP DNS … FTP 传输层 TCP UDP 网络层 ICMP IGMP IP ARP RARP 接口层 www.gxmu.edu.cn

  19. 4-4 PROTOCOL LAYERS Chapter 4 Introduction to Protocols • PDU (Protocol Data Unit): • The combination of data from the next higher layer and the header from the current layer is called a PDU。 • PDU =HEADER+DATA • Each layer of the smallest unit of data transmission • The header in a PDU contains information to be used by the peer layer in the receiving computer www.gxmu.edu.cn

  20. Chapter 4 Introduction to Protocols Figure 4-3 Examples of the data contained in the headers of the transport and network access PDUs. * Error detection codes are typically the result of a mathematical function performed on the contents of an entire message. F (the remainder of the PDU that has been calculated by the sending transport layer.) www.gxmu.edu.cn

  21. Chapter 4 Introduction to Protocols PDU specific names  • Application——Message(报文) • Transport——Segment(数据段) (报文) • Network——Packet(分组(数据包)) • Data link——Frame(数据帧) • Physical Link——Bit(比特) www.gxmu.edu.cn

  22. 4-5 PROTOCOL FUNCTIONS Chapter 4 Introduction to Protocols • Encapsulation • Fragmentation and reassembly • Connection control • Ordered delivery • Flow control • Error control • Addressing • Multiplexing • Transmission services www.gxmu.edu.cn

  23. HEAD(协议头) DATA DATA Chapter 4 Introduction to Protocols 4.5.1Encapsulation The process of adding control information to data from a higher layer is called encapsulation. • De-encalsulation. Encapsulation: control info+data www.gxmu.edu.cn

  24. Control information Chapter 4 Introduction to Protocols • Three general categories • 1)Address • PDU headers often contain both the sender’s and receiver’s addresses. • The address field in a header tells the destination of a message or PDU. • 2)Error detection code. • Typically a mathematically calculated check sum. • 3)Protocol control. • additional information www.gxmu.edu.cn

  25. Encapsulation example Chapter 4 Introduction to Protocols www.gxmu.edu.cn

  26. 4.5.2 Fragmentation and Reassembly Chapter 4 Introduction to Protocols • Fragmentation • Various levels of the protocol may require that the PDU be broken into smaller blocks. • This process is call either fragmentation or segmentation. • Fragmentation= Segmentation • *Segmentation is the error control process that is employed when only part of a message is delivered to the receiver. F www.gxmu.edu.cn

  27. Why Fragment? Chapter 4 Introduction to Protocols • Advantages More efficient error control More equitable access to network facilities Shorter delays Smaller buffers needed • Disadvantages Results in more overheads. Less efficient transmission. More processing time www.gxmu.edu.cn

  28. Reassembly Chapter 4 Introduction to Protocols • The process of reassembling a message that has been fragmented is called reassembly. • At the receiving end,the fragmented data must be reassembled into messages corresponding to those that were originally sent by the application level. www.gxmu.edu.cn

  29. Segmentation and Reassembly Chapter 4 Introduction to Protocols H PDUN PDUN H PDUN H PDUN H PDUN-1 H PDUN-1 Figure 4-4 An illustration of message fragmentation and reassembly. www.gxmu.edu.cn

  30. Chapter 4 Introduction to Protocols www.gxmu.edu.cn

  31. Flow of data in the OSI model Chapter 4 Introduction to Protocols 计算机1 计算机2 • 数据部分 AP1 AP2 H6 数据部分 6 6 H5 数据部分 5 5 H4 数据部分 4 4 H3 数据部分 3 3 H2 数据部分 T2 2 2 1010011……比特流……010111010 1 1 物理传输媒体 www.gxmu.edu.cn

  32. PDUs in TCP/IP Chapter 4 Introduction to Protocols FCS FCS 应用层 表示层 PDU 会话层 上层数据 段segment 传输层 TCP HEAD 上层数据 包package 网络层 IP HEAD 数据 LLC HEAD 数据 数据链路层 帧frame MAC HEAD 数据 物理层 比特Byte 0101110101001000010 www.gxmu.edu.cn

  33. 4.5.3 Connection Control Chapter 4 Introduction to Protocols • Connection is usually a logical association between the entities (Virtual circuit –虚电路) • Connection-oriented • setup time at the beginning of the communication. • Key attribute : • Assigns sequence numbers to each PDU. • Sequence numbers used for Ordered delivery Flow control Error control www.gxmu.edu.cn

  34. Connectionless Chapter 4 Introduction to Protocols • No setup time • allows an application to send a message to any destination ,an any time. • UDP • In the TCP/IP protocol suite, connectionless transport is provided by the UDP . www.gxmu.edu.cn

  35. 4.5.4 Ordered Delivery Chapter 4 Introduction to Protocols • PDUS may be out of sequence,why? • The PDUs take different paths (routes) through several networks. • How to do ? • Sequence numbers www.gxmu.edu.cn

  36. Sequence numbers function Chapter 4 Introduction to Protocols • The sequence numbers in PDUs serve multiple purposes because they allow the receiving end to check to ensure that all PDUs have been received, that they are in the right sequence, and that none have been duplicated. www.gxmu.edu.cn

  37. 4.5.5 Flow Control Chapter 4 Introduction to Protocols • Why is Flow control required in computer based communication systems ? • because sometimes the sending computer transmits data at a rate faster than the receiving computer can handle it. The term used to describe the ability of the receiving end of the transmission to limit the amount or rate of data sent by the transmitting end is flow control. www.gxmu.edu.cn

  38. Chapter 4 Introduction to Protocols • Stop and wait • Xon/Xoff • ACK/NAK • Sliding window • Fixed window size • Credit scheme Flow Control www.gxmu.edu.cn

  39. 4.5.6 Error Control Chapter 4 Introduction to Protocols • Guard against loss or damage at various levels • Types of Errors • Detection • Correction www.gxmu.edu.cn

  40. Error Control Chapter 4 Introduction to Protocols • All transmission media have potential for introduction of errors. • Error Control refers to the facts that errors must be: Detected reliably Something should be done to retransmit the frame that has been received in error www.gxmu.edu.cn

  41. Multiple-bit error Single-biterror Burst error Chapter 4 Introduction to Protocols Types of Errors www.gxmu.edu.cn

  42. Define Chapter 4 Introduction to Protocols Error control Error detection Error correction • Error detection is usually accomplished by having the sender insert an error detecting code. www.gxmu.edu.cn

  43. Check character Chapter 4 Introduction to Protocols • Error detecting code=check character • It is calculated mathematically as a part of the error checking process when transmitting and receiving a message. • *An error detection code corrects all of the errors it finds during a transmission.F www.gxmu.edu.cn

  44. Chapter 4 Introduction to Protocols Parity Examples - Using Even Parity Simple Parity LRC/VRC www.gxmu.edu.cn

  45. Error correction Chapter 4 Introduction to Protocols • Retransmission. • If no acknowledge in given time, re-transmit. • Sequence numbering • Duplicate PDUs discard www.gxmu.edu.cn

  46. NOTE Chapter 4 Introduction to Protocols • Network access layer : • Each PDU is received correctly. • Transport layer : • All PDUs are received and that none are duplicated. www.gxmu.edu.cn

  47. Chapter 4 Introduction to Protocols 4.5.7 Addressing PDU headers often contain both the sender`s and receiver`s addresses. Different layers of the protocol contain different addresses. Addresses are unique and not ambiguous. www.gxmu.edu.cn

  48. 4.5.8Multiplexing Chapter 4 Introduction to Protocols Many to one/one to many • When a computer uses a single communications circuit to establish multiple connections to different applications. Supporting multiple connections on one machine www.gxmu.edu.cn

  49. Multiplexing vs. No Multiplexing Types of multiplexing www.gxmu.edu.cn

More Related