Internet Technologies 简明教程

Internet Protocols

Transmission Control Protocol (TCP)

TCP 是面向连接的协议,并提供端到端的数据包传递。它充当连接的骨干。它具有以下主要特性:

TCP is a connection oriented protocol and offers end-to-end packet delivery. It acts as back bone for connection.It exhibits the following key features:

  1. Transmission Control Protocol (TCP) corresponds to the Transport Layer of OSI Model.

  2. TCP is a reliable and connection oriented protocol.

  3. TCP offers:

  4. TCP offers connection oriented end-to-end packet delivery.

  5. TCP ensures reliability by sequencing bytes with a forwarding acknowledgement number that indicates to the destination the next byte the source expect to receive.

  6. It retransmits the bytes not acknowledged with in specified time period.

TCP Services

TCP 为应用程序层中的进程提供以下服务:

TCP offers following services to the processes at the application layer:

  1. Stream Delivery Service

  2. Sending and Receiving Buffers

  3. Bytes and Segments

  4. Full Duplex Service

  5. Connection Oriented Service

  6. Reliable Service

TCP 协议是面向流的,因为它允许发送进程以字节流的形式发送数据,并允许接收进程以字节流的形式获取数据。

TCP protocol is stream oriented because it allows the sending process to send data as stream of bytes and the receiving process to obtain data as stream of bytes.

发送和接收进程可能无法以相同的速度生成和获取数据,因此 TCP 需要在发送和接收端进行存储缓冲。

It may not be possible for sending and receiving process to produce and obtain data at same speed, therefore, TCP needs buffers for storage at sending and receiving ends.

传输控制协议 (TCP) 在传输层将字节分组到一个数据包中。这个数据包称为段。在传输这些数据包之前,这些段被封装到一个 IP 数据报中。

The Transmission Control Protocol (TCP), at transport layer groups the bytes into a packet. This packet is called segment. Before transmission of these packets, these segments are encapsulated into an IP datagram.

以双工模式传输数据意味着数据同时在两个方向流动。

Transmitting the data in duplex mode means flow of data in both the directions at the same time.

TCP 以下列方式提供面向连接的服务:

TCP offers connection oriented service in the following manner:

为了可靠性,TCP 使用确认机制。

For sake of reliability, TCP uses acknowledgement mechanism.

Internet Protocol (IP)

网际协议是 connectionlessunreliable 协议。它不保证数据成功传输。

Internet Protocol is connectionless and unreliable protocol. It ensures no guarantee of successfully transmission of data.

为了使其可靠,它必须与传输层的可靠协议(例如 TCP)配对。

In order to make it reliable, it must be paired with reliable protocol such as TCP at the transport layer.

Internet 协议以数据报形式传输数据,如下图所示:

Internet protocol transmits the data in form of a datagram as shown in the following diagram:

internet ip datagram structure

Points to remember:

Points to remember:

  1. The length of datagram is variable.

  2. The Datagram is divided into two parts: header and data.

  3. The length of header is 20 to 60 bytes.

  4. The header contains information for routing and delivery of the packet.

User Datagram Protocol (UDP)

与 IP 一样,UDP 也是无连接且不可靠的协议。它不要求与主机建立连接以交换数据。由于 UDP 是不可靠的协议,因此没有确保发送的数据被接收的机制。

Like IP, UDP is connectionless and unreliable protocol. It doesn’t require making a connection with the host to exchange data. Since UDP is unreliable protocol, there is no mechanism for ensuring that data sent is received.

UDP 以数据报形式传输数据。UDP 数据报由五部分组成,如下图所示:

UDP transmits the data in form of a datagram. The UDP datagram consists of five parts as shown in the following diagram:

internet udp datagram

Points to remember:

Points to remember:

  1. UDP is used by the application that typically transmit small amount of data at one time.

  2. UDP provides protocol port used i.e. UDP message contains both source and destination port number, that makes it possible for UDP software at the destination to deliver the message to correct application program.

File Transfer Protocol (FTP)

FTP 被用来从一台主机复制文件到另一台主机。FTP 以以下方式提供了该机制:

FTP is used to copy files from one host to another. FTP offers the mechanism for the same in following manner:

  1. FTP creates two processes such as Control Process and Data Transfer Process at both ends i.e. at client as well as at server.

  2. FTP establishes two different connections: one is for data transfer and other is for control information.

  3. Control connection is made between control processes while Data Connection is made between