There are many network protocols, so we need to learn them step by step. Today we will mainly introduce the echo protocol. First, let's take a look at what it means. Echo Protocol. Note: It is mainly used for debugging and testing. based on the TCP protocol, the server can detect messages on TCP port 7. If the UDP protocol is used, the basic process is the same as TCP, and the detection port is also 7.
It is a route and the most common packet in the network. You can send the echo protocol package to know the paths of the current connection node and obtain the path length through the round-trip time.
Linux commands
The echo protocol commands supported by each shell may be different.
-N does not output the final \ n
-E: Interpreting escape characters
-E does not interpret escape characters
Example: Echo "I am a boy" // after execution, the I am a boy will be printed
I am a boy
DOS batch processing command
Echo protocol command
Enable or disable the request echo function, or display messages. If there are no parameters, the echo protocol command displays the current echo settings.
Syntax
Echo [{on off}] [message]
Sample: @ Echooff/Echohello world
That is to say, when the echo protocol is set to off, the following commands will only be executed but not displayed. When the Echoon statement is displayed again, the echo is visible ), echo is usually used @.
In front of echo, that is, @ echo, the function is to make the sentence after @ not displayed, and @ itself is not displayed, then, @ Echooff will not display any information.
In practice, we will use this command and redirection symbol, also known as pipeline symbol. Generally, >>> ^) is used to input some commands to a file in a specific format. this will be reflected in future examples.