《另一种协定是UDP》PPT课件_第1页
《另一种协定是UDP》PPT课件_第2页
《另一种协定是UDP》PPT课件_第3页
《另一种协定是UDP》PPT课件_第4页
《另一种协定是UDP》PPT课件_第5页
已阅读5页,还剩41页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1,TCP/IP Basics(Protocols and the TCP/IP Suite),TCP: Transmission Control ProtocolIP: Internet Protocol,2,Multi-layer Communication (1/2),3,Multi-layer Communication (2/2),A series of layers, each built upon the one below it. The purpose of each layer is to offer certain services to higher layers, h

2、iding the detailed implementation of these services from higher layers Each layer is completely independent of others as long as the interfaces are not changed. So the secretaries can switch from fax to email, without disturbing other layers,4,Protocol,Protocol is an agreement between two communicat

3、ion parties on how communication is to proceed Two communication parties communicate by means of formatted blocks of data that obey the rules and conventions known as a protocol Key features of a protocol Syntax: Concerns the format of the data blocks Semantics: Includes control information for coor

4、dination and error handling Timing: Includes speed matching and sequencing,5,Agents Involved in Communication,Applications Exchange data between computers (e.g., electronic mail) Computers Connected to networks Networks Transfers data from one computer to another,6,TCP/IP Layers,Communication task i

5、s organized into five relatively independent layers Physical layer Layer 1 Network access layer Layer 2 Internet layer Layer 3 Host-to-host (end-to-end), or transport layer Application layer,(service access point),7,Layered Concepts,8,Physical (PHY) Layer,Covers the physical interface between a tran

6、smission device (e.g., workstation, computer) and a transmission medium or network The sending computer must provide the network of the address of the destination computer The sending computer may wish to invoke certain services provided by the network Different standards have been developed Physica

7、l layer specifies: Characteristics of the transmission medium The nature of signals Data rate Other related matters Upper layers above network access do not need to consider the specifics of the network to be used,9,Network Access Layer,Concerned with the exchange of data betweenan end system (serve

8、r, workstation) and the network to which it is attached Software used depends on type of network Circuit switching Packet switching (e.g., X.25) LANs (e.g., Ethernet) Others,10,Internet Layer,Network access layer is concerned with access and routing data across a network fortwo end systems attached

9、the same network Uses the Internet protocol (IP) when devices are attached to different networks Provides routing functions to allow data to traverse multiple interconnected networks Implemented in end systems and routers A router is a processor or host that connects two networks. The main function

10、is to relay data from one network to the other on its route from the source to the destination end systems,11,Host-to-Host, or Transport Layer,Provides reliability during data exchanges Completeness Order (If an application needs to exchange data between two computers, we always hope the data would

11、be transmitted reliably. All the data arrive at the destination correctly and arrive as the same order in which they were sent on the source application.) Transmission Control Protocol (TCP) is commonly used 另一種協定是UDP (User Datagram Protocol),12,Host-to-Host, or Transport Layer TCP,Connection-orient

12、ed protocol Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.,13,Host-to-Host, or Transport Layer Connection-Oriented,Before any data transfer, TCP establishes a connection (3-way handshake) One TCP entity is waiting for a connection (“server”) The other TCP entity

13、(“client”) contacts the server Each connection is full duplex,14,Host-to-Host, or Transport Layer Reliable,Byte stream is broken up into chunks, i.e., segments Receiver sends acknowledgements (ACKs) for segments TCP maintains a timer. If an ACK is not received in time, the segment is retransmitted D

14、etecting errors TCP has checksums for header and data. Segments with invalid checksums are discarded Each byte that is transmitted has a sequence number,15,Byte Stream Service,To the lower layers, TCP handles data in blocks (segments) To the higher layers TCP handles data as a sequence of bytes and

15、does not identify boundaries between bytes Higher layers do not know about the beginning and end of segments,16,Application Layer,Contains the logic needed to support varioususer applications Uses separate modules that are peculiar to each different type of application E.g., e-mail, FTP, WWW, ,17,Op

16、erations of TCP and IP,Total communications facility may consist of multiple networks The constituent networks subnetworks Network access protocol IP Implemented in both end systems and routers Route a block of data from one end system, through one or more routers, to another end system TCP Only imp

17、lemented in the end systems Keeps track of the blocks of data to make sure that all are delivered reliably to the appropriate application,18,Operations of TCP and IP,Two levels of address Each host on a subnetwork must have a global Internet address (e.g., 140.125.xxx.yyy) Each process with a host m

18、ust have an address that is unique within the host ports A port number identifies the endpoint of a connection. Pairs and identify a TCP connection.,19,Trace a Simple Operation (1/2),3,68,20,Trace a Simple Operation (2/2),Suppose one application, associated with port 1 in host

19、A, wishes to send data to another application, which has port number 3 in host B. The application at A hands the message down to TCP with instruction to send it to ports 3 at host B. TCP hands the message down to IP with instruction to send it to host B. IP needs not to be told the identity of the d

20、estination port. All it needs to know is that the data is intended to host B. IP hands the message down to network access layer with the instructions to send the message to router J. The sending application generates blocks of data and passes it to TCP. TCP appends control information, i.e., TCP hea

21、der. The control information is used at the peer TCP protocol at host B.,21,Refer to RFC (Request for Comments) 793 Destination port Sequence number Checksum Code bits FIN: 結束連線 SYN: 建立連線 RST: 重置連線 PSH: 封包立即傳送 ACK: 回應上一次收到的封包 URG: 請接收端立即處理此封包 (urgent),TCP Header,22,TCP Header,Each sequence number id

22、entifies a byte in the byte stream Acknowledgement Number (AckNo) Acknowledgements are piggybacked A segment from AB can contain an acknowledgement for a data sent in the BA direction A host uses AckNo to send acknowledgements. (If a host sends an AckNo in a segment it sets the “ACK flag”) AckNo con

23、tains the next SeqNo that a host wants to receive 例: The acknowledgement for a segment with sequence numbers 0-1500 is AckNo=1501 例: Sender sends two segments with “1.1500” and “1501.3000”, but receiver only gets the second segment. In this case, the receiver cannot acknowledge the second packet. It

24、 can only send AckNo=1,23,TCP Connection Establishment,TCP uses a three-wayhandshake to open a connection: (1) Client sends a segment with SYN bit set port number of client initial sequence number (ISN) of client (2) Server responds with a segment with SYN bit set initial sequence number of server A

25、CK for ISN of client (3) Client acknowledges by sending a segment with ACK ISN of server,24,Protocol Data Units (PDUs),A block of information exchanged at any protocol level is referred to as PDUs Header + Data (payload) + Trailer,Destination Port Sequence number Checksum,Destination IP Address Sour

26、ce IP address,Dest. Network Address Priority info,25,IP Datagram Format,26,IP Datagram Format: Fields of the Header (1/4),Version (4 bits): current version is 4, next version 6 Header length (4 bits): length of IP header, in multiples of 4 bytes DS/ECN field (1 byte) This field was previously called

27、 as Type-of-Service (TOS) field. The role of this field has been re-defined, but is “backwards compatible” to TOS interpretation Differentiated Service (DS) (6 bits): Used to specify service level (currently not supported in the Internet) Explicit Congestion Notification (ECN) (2 bits): New feedback

28、 mechanism used by TCP,27,IP Datagram Format: Fields of the Header (2/4),Identification (16 bits) Unique identification of a datagram from a host Incremented whenever a datagram is transmitted Flags (3 bits) First bit always set to 0 DF bit (Do not fragment) MF bit (More fragments) Time To Live (TTL

29、) (1 byte) Specifies longest paths before datagram is dropped Role of TTL field: Ensure that packet is eventually dropped when a routing loop occurs Used as follows: Sender sets the value (e.g., 64) Each router decrements the value by 1 When the value reaches 0, the datagram is dropped,28,Protocol (

30、1 byte) Specifies the higher-layer protocol Used for demultiplexing to higher layers Header checksum (2 bytes) A simple 16-bit long checksum which is computed for the header of the datagram,IP Datagram Format: Fields of the Header (3/4),29,IP Datagram Format: Fields of the Header (4/4),Options Secur

31、ity restrictions Record Route: each router that processes the packet adds its IP address to the header Timestamp: each router that processes the packet adds its IP address and time to the header (loose) Source Routing: specifies a list of routers that must be traversed (strict) Source Routing: speci

32、fies a list of the only routers that can be traversed Padding Padding bytes are added to ensure that header ends on a 4-byte boundary,30,Common TCP/IP Applications,Applications that have been standardized to operate over TCP include: Simple mail transfer protocol (SMTP): provides a basic electronic

33、mail facility File Transfer Protocol (FTP): allows files to be sent from one system to another TELNET: Provides a remote logon capability ,31,Some Protocols in TCP/IP Suite,32,Layers of the OSI Model,The OSI (Open Systems Interconnection) reference was developed by the International Organization for

34、 Standardization (ISO) Application Presentation Session Transport Network Data link Physical,33,Layers of the OSI Model,Application layer Provides access to the OSI environment for users Provides distributed information services Presentation layer Provides independence to the application processes f

35、rom differences in data representation (syntax) Concerned with the syntax and semantics of the information transmitted, e.g. ACSII code, Unicode incompatible Data compression Encryption,34,Layers of the OSI Model,Session layer Provides the control structure for communication between applications Who

36、se turn to talk? Establishes, manages, and terminates connections between cooperating applications Token management: dialogue discipline (full-duplex, half-duplex) For some protocols, it is essential that both sides do not attempt the same operation at the same time. Only the side holding the token

37、may perform the critical operation Synchronization Insert checkpoints into the data stream, so that after a crash, only the data transferred after the last checkpoint need to be repeated,35,Layers of the OSI Model,Transport layer Provides reliable, transparent transfer of data betweenend points Prov

38、ides end-to-end error recovery and flow control Network layer Provides upper layers with independence from the data transmission and switching technologies used to connect systems Responsible for establishing, maintaining, and terminating connections A key design issue is determining how packets are

39、 routed from source to destination. Static table? Dynamic table is determined anew for each packet, to reflect the current network load,36,Layers of the OSI Model,Data-link layer Provides the reliable transfer of information across the physical link Sends blocks (frames) with the necessary synchroni

40、zation, error control (error detection/correction), and flow control Physical layer Transmission of unstructured bit stream over physical medium Deals with accessing the physical medium Mechanical characteristics Electrical characteristics Functional characteristics Procedural characteristics,37,Com

41、parison of OSI and TCP/IP,38,TCP/IP Architectural Dominance,TCP/IP protocols matured quicker than similar OSI protocols When the need for interoperability across networks was recognized, only TCP/IP was available and ready to go OSI model is unnecessarily complex Accomplishes in seven layers what TC

42、P/IP does with fewer layers,39,Internetworking,Terms (名詞) Communication network facility that provides a data transfer service among devices attached to the network Internet collection of communication networks, interconnected by bridges/routers Intranet internet used by an organization for internal

43、 purposes Provides key Internet applications Can exist as an isolated, self-contained internet In most cases, a LAN or WAN is not isolated. For example, an organization may have more than one type of LANs at different sites, and need them to be interconnected via WANs for central control of distribu

44、ted information exchange.,40,Internetworking,Terms (contd) End System (ES) device used to support end-user applications or services Intermediate System (IS) device used to connect two networks Each subnetwork in an internet supports communication among the devices attached to that subnetwork. Subnetworks are connected

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论