Lwip----ECHO Protocol

来源:互联网 发布:淘宝店铺模版怎么使用 编辑:程序博客网 时间:2024/06/15 18:28

在WIRESHARK里面看到了有的显示UDP,有的显示ECHO。好像是有端口7的是ECHO。那么ECHO是怎么回事?在百度上查了半天,感觉没找到了所以然,或者说让人感觉都是些不靠谱的说法。直到查到了维基百科的这个网页https://en.wikipedia.org/wiki/Echo_Protocol,里面内容如下:

Echo Protocol

The Echo Protocol is a service in the Internet Protocol Suite defined in RFC 862. It was originally proposed for testing and measurement of round-trip times[citation needed] in IP networks.

A host may connect to a server that supports the Echo Protocol using the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP) on the well-known port number 7. The server sends back an identical copy of the data it received.

netd implementation[edit]

On UNIX-like operating systems an echo server is built into the inetd daemon. The echo service is usually not enabled by default. It may be enabled by adding the following lines to the file /etc/inetd.conf and telling inetd to reload its configuration:

echo   stream  tcp     nowait  root    internalecho   dgram   udp     wait    root    internal

On various routers, this TCP or UDP port 7 for the Echo Protocol for relaying ICMP datagrams (or port 9 for theDiscard Protocol) is also configured by default as a proxy to relay Wake-on-LAN (WOL) magic packets from the Internet to hosts on the local network in order to wake up them remotely (these hosts must also have their network adapter configured to accept WOL datagrams and the router must have this proxy setting enabled, and possibly also a configuration of forwarding rules in its embedded firewall to open these ports on the Internet side).

可以看出这个ECHO是为了测试round-trip times的,汉语翻译为往返时延

Round-trip delay time

From Wikipedia, the free encyclopedia
  (Redirected from Round-trip time)

In telecommunications, the round-trip delay time (RTD) or round-trip time (RTT) is the length of time it takes for a signal to be sent plus the length of time it takes for an acknowledgment of that signal to be received. This time delay therefore consists of the propagation times between the two points of a signal.

往返时延”成为一种计算机性能指标,具体含义如下:

编辑
RTT(Round-Trip Time): 往返时延。在计算机网络中它是一个重要的性能指标,表示从发送端发送数据开始,到发送端收到来自接收端的确认(接收端收到数据后便立即发送确认),总共经历的时延。
往返延时(RTT)由三个部分决定:即链路的传播时间、末端系统的处理时间以及路由器的缓存中的排队和处理时间。其中,前面两个部分的值作为一个TCP连接相对固定,路由器的缓存中的排队和处理时间会随着整个网络拥塞程度的变化而变化。所以RTT的变化在一定程度上反映了网络拥塞程度的变化。简单来说就是发送方从发送数据开始,到收到来自接受方的确认信息所经历的时间。

=======================================

那么RFC862是什么内容呢?


[Docs] [txt|pdf]

INTERNET STANDARD

Network Working Group                                          J. PostelRequest for Comments: 862                                            ISI                                                                May 1983                             

Echo Protocol

This RFC specifies a standard for the ARPA Internet community. Hosts onthe ARPA Internet that choose to implement an Echo Protocol are expectedto adopt and implement this standard.A very useful debugging and measurement tool is an echo service. Anecho service simply sends back to the originating source any data itreceives.TCP Based Echo Service One echo service is defined as a connection based application on TCP. A server listens for TCP connections on TCP port 7. Once a connection is established any data received is sent back. This continues until the calling user terminates the connection.UDP Based Echo Service Another echo service is defined as a datagram based application on UDP. A server listens for UDP datagrams on UDP port 7. When a datagram is received, the data from it is sent back in an answering datagram.



这也就是为什么STM32的官网给的例子的题目是udp_echo_server/udp_echo_CLIENT/TCp_echo_server/TCp_echo_CLIENT


0 0