Notice that all are provided using both TCP and UDP and the port number is the same for both protocols.
Often these services are provided by the inetd daemon on Unix hosts. These standard services provide an easy testing facility using the standard Telnet.
aix % telnet freebsd daytime
Trying 12.106.32.254... // output by Telnet client
Connected to freebsd.unpbook.com. // output by Telnet client
Escape character is '^]'. // output by Telnet client
Mon Jul 28 11:56:22 2003 // output by daytime server
Connection closed by foreign host. // output by Telnet client (server closes connection)
aix % telnet freebsd echo
Trying 12.106.32.254... // output by Telnet client
Connected to freebsd.unpbook.com. // output by Telnet client
Escape character is '^]'. // output by Telnet client
hello, world // we type this
hello, world // and it is echoed back by the server
^] // we type control and right bracket to talk to Telnet client
telnet> quit // and tell client we are done
Connection closed. // client closes the connection this time
In these two examples, we type the name of the host and the name of the service (daytime and echo). These service names are mapped into the port numbers shown in Figure by the /etc/services file.
Notice that when we connect to the daytime server, the server performs the active close, while with the echo server, the client performs the active close. Recall that the end performing the active close is the end that goes through the TIME_WAIT state.
No comments:
Post a Comment