面向连接与面向无连接协议_面向连接和无连接服务

面向连接与面向无连接协议

These are the two services given by the layers to layers above them. These services are:

这是各层为其上方的层提供的两项服务。 这些服务是:

  1. Connection Oriented Service

    面向连接的服务

  2. Connectionless Services

    无连接服务

面向连接的服务 (Connection Oriented Services)

There is a sequence of operation to be followed by the users of connection oriented service. These are:

面向连接的服务的用户需要遵循一系列操作。 这些是:

  1. Connection is established.

    建立连接。

  2. Information is sent.

    信息已发送。

  3. Connection is released.

    连接被释放。

In connection oriented service we have to establish a connection before starting the communication. When connection is established, we send the message or the information and then we release the connection.

在面向连接的服务中,我们必须在开始通信之前建立连接。 建立连接后,我们发送消息或信息,然后释放连接。

Connection oriented service is more reliable than connectionless service. We can send the message in connection oriented service if there is an error at the receivers end. Example of connection oriented is TCP (Transmission Control Protocol) protocol.

面向连接的服务比无连接服务更可靠。 如果接收者端出现错误,我们可以在面向连接的服务中发送消息。 面向连接的示例是TCP(传输控制协议)协议。

连接少服务 (Connection Less Services)

It is similar to the postal services, as it carries the full address where the message (letter) is to be carried. Each message is routed independently from source to destination. The order of message sent can be different from the order received.

它与邮政服务相似,因为它带有要携带邮件(信)的完整地址。 每个消息都从源到目的地独立路由。 发送的消息顺序可以与接收的顺序不同。

In connectionless the data is transferred in one direction from source to destination without checking that destination is still there or not or if it prepared to accept the message. Authentication is not needed in this. Example of Connectionless service is UDP (User Datagram Protocol) protocol.

在无连接情况下,数据沿一个方向从源传输到目标,而无需检查目标是否仍然存在或是否准备接受消息。 在此不需要身份验证。 无连接服务的示例是UDP(用户数据报协议)协议。

区别:面向连接和无连接服务 (Difference: Connection oriented and Connectionless service)

  1. In connection oriented service authentication is needed, while connectionless service does not need any authentication.

    在面向连接的服务中,需要身份验证,而无连接服务不需要任何身份验证。

  2. Connection oriented protocol makes a connection and checks whether message is received or not and sends again if an error occurs, while connectionless service protocol does not guarantees a message delivery.

    面向连接的协议建立连接并检查是否接收到消息,如果发生错误,则再次发送,而无连接服务协议不能保证消息的传递。

  3. Connection oriented service is more reliable than connectionless service.

    面向连接的服务比无连接服务更可靠。

  4. Connection oriented service interface is stream based and connectionless is message based.

    面向连接的服务接口基于流,无连接基于消息。

什么是服务原语? (What are Service Primitives?)

A service is formally specified by a set of primitives (operations) available to a user process to access the service. These primitives tell the service to perform some action or report on an action taken by a peer entity. If the protocol stack is located in the operating system, as it often is, the primitives are normally system calls. These calls cause a trap to kernel mode, which then turns control of the machine over to the operating system to send the necessary packets. The set of primitives available depends on the nature of the service being provided. The primitives for connection-oriented service are different from those of connection-less service. There are five types of service primitives :

服务由一组可用于用户进程访问服务的原语(操作)正式指定。 这些原语告诉服务执行某些操作或报告对等实体采取的操作。 如果协议栈经常位于操作系统中,则原语通常是系统调用。 这些调用导致陷阱进入内核模式,然后将机器的控制权交给操作系统以发送必要的数据包。 可用的原语集取决于所提供服务的性质。 面向连接的服务的原语与无连接服务的原语不同。 服务原语有五种类型:

  1. LISTEN : When a server is ready to accept an incoming connection it executes the LISTEN primitive. It blocks waiting for an incoming connection.

    LISTEN:当服务器准备好接受传入连接时,它将执行LISTEN原语。 它阻止等待传入的连接。

  2. CONNECT : It connects the server by establishing a connection. Response is awaited.

    CONNECT:通过建立连接来连接服务器。 等待响应。

  3. RECIEVE: Then the RECIEVE call blocks the server.

    RECIEVE:然后RECIEVE调用将阻止服务器。

  4. SEND : Then the client executes SEND primitive to transmit its request followed by the execution of RECIEVE to get the reply. Send the message.

    SEND:然后客户端执行SEND原语以发送其请求,然后执行RECIEVE以获取答复。 发送消息。

  5. DISCONNECT : This primitive is used for terminating the connection. After this primitive one can't send any message. When the client sends DISCONNECT packet then the server also sends the DISCONNECT packet to acknowledge the client. When the server package is received by client then the process is terminated.

    DISCONNECT:此原语用于终止连接。 在此原始之后,就无法发送任何消息。 当客户端发送DISCONNECT数据包时,服务器也会发送DISCONNECT数据包以确认客户端。 当客户端收到服务器程序包时,该过程终止。

面向连接的服务原语 (Connection Oriented Service Primitives)

There are 5 types of primitives for Connection Oriented Service :

面向连接的服务有5种原语:

LISTENBlock waiting for an incoming connection
CONNECTIONEstablish a connection with a waiting peer
RECEIVEBlock waiting for an incoming message
SENDSending a message to the peer
DISCONNECTTerminate a connection
阻止等待传入的连接
连接 与等待的对等方建立连接
接收 阻止等待传入的消息
发送 向对等发送消息
断开 终止连接
无连接服务原语 (Connectionless Service Primitives)

There are 4 types of primitives for Connectionless Oriented Service:

面向无连接的服务有4种原语:

UNIDATAThis primitive sends a packet of data
FACILITY, REPORTPrimitive for enquiring about the performance of the network, like delivery statistics.
统一数据 这个原语发送一个数据包
设施,报告 用于查询网络性能的原始信息,例如传递统计信息。

服务与协议的关系 (Relationship of Services to Protocol)

In this section we will learn about how services and protocols are related and why they are so important for each other.

在本节中,我们将学习服务和协议之间的关系以及它们为什么如此重要。

什么是服务? (What are Services?)

These are the operations that a layer can provide to the layer above it in the OSI Reference model. It defines the operation and states a layer is ready to perform but it does not specify anything about the implementation of these operations.

这些是OSI参考模型中一层可以提供给其上一层的操作。 它定义了操作并声明了一个层已准备好执行,但是它没有指定有关这些操作的实现的任何内容。

Services showing SERVICE ACCESS POINTS
什么是协议? (What are Protocols?)

These are set of rules that govern the format and meaning of frames, messages or packets that are exchanged between the server and client.

这些是一组规则,用于管理在服务器和客户端之间交换的帧,消息或数据包的格式和含义。

翻译自: https://www.studytonight.com/computer-networks/connection-oriented-and-connectionless-service

面向连接与面向无连接协议

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值