?? tyt08fi.htm
字號:
<BR>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Quote of the Day
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>17
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Returns a quotation
<BR>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Time
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>37
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Returns the time since January 1, 1900 (in seconds)</FONT>
</TABLE></CENTER><BR>
<BR>
<A ID="E69E120" NAME="E69E120"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Active Users</B></FONT></CENTER></H4>
<BR>
<P>The Active Users service returns a message to the originating user that contains a list of all users currently active on the remote machine. The behavior of the TCP and UDP versions is the same. When requested, the Active Users service monitors port 11 and, upon establishment of a connection, responds with a list of the currently active users and then closes the port. UDP sends a datagram, and TCP uses the connection itself.
<BR>
<BR>
<A ID="E69E121" NAME="E69E121"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Character Generator</B></FONT></CENTER></H4>
<BR>
<P>The Character Generator service is designed to send a set of ASCII characters. Upon receipt of a datagram (the contents of which are ignored), the Character Generator service returns a list of all printable ASCII characters. The behavior of the TCP and UDP versions of the Character Generator are slightly different.
<BR>
<P>The TCP Character Generator monitors port 19, and upon connection ignores all input and sends a stream of characters back until the connection is broken. The order of characters is fixed. The UDP Character Generator service monitors port 19 for an incoming datagram (remember, UDP doesn't create connections) and responds with a datagram containing a random number of characters. Up to 512 characters can be sent.
<BR>
<P>Although this service might seem useless, it does have diagnostic purposes. It can ensure that a network can transfer all 95 printable ASCII characters properly, and it can also be used to test printers for their capability to print all the characters.
<BR>
<BR>
<A ID="E69E122" NAME="E69E122"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Daytime</B></FONT></CENTER></H4>
<BR>
<P>The Daytime service returns a message with the current date and time. The format it uses is the day of the week, month of the year, day of the month, time, and the year. Time is specified in a <I>HH</I>:<I>MM</I>:<I>SS</I> format. Each field is separated by spaces to enable parsing of the contents.
<BR>
<P>Both TCP and UDP versions monitor port 13 and, upon receipt of a datagram, return the message. The Daytime service can be used for several purposes, including setting system calendars and clocks to minimize variations. It also can be used by applications.
<BR>
<BR>
<A ID="E69E123" NAME="E69E123"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Discard</B></FONT></CENTER></H4>
<BR>
<P>The Discard service simply discards everything it receives. TCP waits for a connection on port 9, whereas UDP receives datagrams through that port. Anything incoming is ignored. No responses are sent.
<BR>
<P>The Discard service might seem pointless, but it can be useful for routing test messages during system setup and configuration. It can also be used by applications in place of a discard service of the operating system (such as /dev/null in UNIX).
<BR>
<BR>
<A ID="E69E124" NAME="E69E124"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Echo</B></FONT></CENTER></H4>
<BR>
<P>The Echo service returns whatever it receives. It is called through port 7. With TCP, it simply returns whatever data comes down the connection, whereas UDP returns an identical datagram (except for the source and destination addresses). The echoes continue until the port connection is broken or no datagrams are received.
<BR>
<P>The Echo service provides very good diagnostics about the proper functioning of the network and the protocols themselves. The reliability of transmissions can be tested this way, too. Turnaround time from sending to receiving the echo provides useful measurements of response times and latency within the network.
<BR>
<BR>
<A ID="E69E125" NAME="E69E125"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Quote of the Day</B></FONT></CENTER></H4>
<BR>
<P>The Quote of the Day service does as its name implies. It returns a quotation from a file of quotes, randomly selecting one a day when a request arrives on port 17. If a source file of quotations is not available, the service fails.
<BR>
<BR>
<A ID="E69E126" NAME="E69E126"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Time</B></FONT></CENTER></H4>
<BR>
<P>The Time service returns the number of seconds that have elapsed since January 1, 1990. Port 37 is used to listed for a request (TCP) or receive an incoming datagram (UDP). When a request is received, the time is sent as a 32-bit binary number. It is up to the receiving application to convert the number to a useful figure.
<BR>
<P>The Time service is often used for synchronizing network machines or for setting clocks within an application.
<BR>
<BR>
<A ID="E69E127" NAME="E69E127"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Using the Optional Services</B></FONT></CENTER></H4>
<BR>
<P>As already mentioned, the optional services can be accessed from an application. Users can directly access their service of choice (assuming it is supported) by using Telnet. A simple example is shown here:
<BR>
<PRE>
<FONT COLOR="#000080">$ telnet merlin 7
Trying...
Connected to merlin.tpci.com
Escape character is '^T'.
This is a message
This is a message
Isn't this exciting?
Isn't this exciting?
<Ctrl+T>
$ telnet merlin 13
Trying...
Connected to merlin.tpci.com
Escape character is '^T'.
Tues Jun 21 10:16:45 1994
Connection closed.
$ telnet merlin 19
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_abcdefg
"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_abcdefgh
#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_abcdefghi
$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_abcdefghij
%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_abcdefghijk
&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_abcdefghijkl
'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_abcdefghijklm
<Ctrl+T>
$</FONT></PRE>
<P>In this example, a connection to port 7 starts an Echo session. Everything typed by the user is echoed back immediately, unchanged. Then a connection to port 13 provides the Daytime service, showing the current date and time. The connection is broken by the service once the data is sent. Finally, the Character Generator is started. Both the Echo and Character Generator services were terminated with the Telnet break sequence of Ctrl+T.
<BR>
<BR>
<A ID="E68E81" NAME="E68E81"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Summary</B></FONT></CENTER></H3>
<BR>
<P>I covered a lot of material in this chapter, mostly about the way TCP/IP can interact with other networking systems and protocols. By combining TCP/IP with existing networks, the advantages of both can be gained, as well as offering compatibility with a wide range of TCP-based devices.
<BR>
<P>I have also looked at several protocols that round out the TCP/IP family. These are mostly basic services, but they are essential to the proper operation of a TCP/IP-based network.
<BR>
<BR>
<A ID="E68E82" NAME="E68E82"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Q&A</B></FONT></CENTER></H3>
<BR>
<P><B>What is the role of the Media Access Control (MAC) layer in a network </B><B>architecture?</B>
<BR>
<P>The MAC layer handles traffic for the network, including collisions and timers. The MAC is independent of the network's physical medium, but its exact role and implementation depend on the network protocols.
<BR>
<P><B>What is the difference between LLC Type 1 and LLC Type 2?</B>
<BR>
<P>Logical Link Control (LLC) Type 1 is a simpler form that supports unnumbered information, designed for TCP. LLC Type 2 is for UDP and offers message integrity functionality.
<BR>
<P><B>What is XNS?</B>
<BR>
<P>XNS is the Xerox Network System, a networking design that Xerox released to the public domain. Because XNS is essentially free, it has gained a lot of support. XNS supports Ethernet.
<BR>
<P><B>What is ISDN?</B>
<BR>
<P>The Integrated Services Digital Network is a packet-switched high-speed network that supports broadband (many channel) communications.
<BR>
<P><B>Why is a simple network protocol like the Character Generator supported?</B>
<BR>
<P>As simple as it may be, the Character Generator protocol (and many others like it) is used for basic tasks and queries that would require much more complex coding and operations when performed as part of a larger protocol. The Character Generator protocol is useful for testing communications. It is small, fast, easy to implement, and easy to understand.
<BR>
<BR>
<A ID="E68E83" NAME="E68E83"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Quiz</B></FONT></CENTER></H3>
<BR>
<OL>
<LI>What components make up a Medium Attachment Unit (MAU) and what are their roles?
<BR></LI>
<BR>
<LI>What is FDDI? Why is it popular?
<BR></LI>
<BR>
<LI>What is the role of the Discard service?
<BR></LI>
<BR>
<LI>The Time protocol is often used by network devices. What is its role?
<BR></LI>
<BR>
<LI>Does the presence of a second network protocol (like IPX) affect the basic TCP/IP protocol suite's operations?
<BR></LI>
<BR>
</OL>
<P><P ALIGN=CENTER>
<A HREF="tyt07fi.htm" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/tyt07fi.htm" TARGET="_self"><IMG SRC="blanprev.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/blanprev.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="Previous Page"></A>
<A HREF="#I0" TARGET="_self"><IMG SRC="blantop.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/blantop.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="Page Top"></A>
<A HREF="index.htm" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/index.htm" TARGET="_self"><IMG SRC="blantoc.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/blantoc.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="TOC"></A>
<A HREF="tyt09fi.htm" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/tyt09fi.htm" TARGET="_self"><IMG SRC="blannext.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/blannext.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="Next Page"></A>
</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -