?? ch2.htm
字號:
How the OSI Model Works</FONT></A></H2><P>A group called the International Standards Organization (ISO)has put together the Open Systems Interconnect (OSI) ReferenceModel, which is a model that describes seven layers of protocolsfor computer communications. These layers don't know or care whatis on adjacent layers. Each layer, essentially, only sees thereciprocal layer on the other side. The sending application layersees and talks to the application layer on the destination side.That conversation takes place irrespective of, for example, whatstructure exists at the physical layer, such as Ethernet or TokenRing. TCP combines the OSI model's application, presentation,and session layers into one which is also called the applicationlayer.<UL><LI>The application layer refers to application <I>interfaces</I>,not programs like word processing. MHS (Message Handling Service)is such an interface and it operates at this level of the OSImodel. Again, this segmentation and interface approach means thata variety of email programs can be used on an intranet so longas they conform to the MHS standard at this application interfacelevel.<LI>The presentation layer typically simply provides a standardinterface between the application layer and the network layers.This type of segmentation allows for the great flexibility ofthe OSI model since applications can vary endlessly, but, as longas the results conform to this standard interface, the applicationsneed not be concerned with any of the other layers.<LI>The session layer allows for the communication between senderand destination. These conversations avoid confusion by speakingin turn. A token is passed to control and to indicate which sideis allowed to speak. This layer executes transactions, like savinga file. If something prevents it from completing the save, thesession layer, which has a record of the original state, returnsto the original state rather than allowing a corrupt or incompletetransaction to occur.<LI>The transport layer segments the data into acceptable packetsizes and is responsible for data integrity of packet segments.There are several levels of service that can be implemented atthis layer, including segmenting and reassembly, error recovery,flow control, and others.<LI>The IP wrapper is put around the packet at the network orInternet layer. The header includes the source and destinationaddresses, the sequence order, and other data necessary for correctrouting and rebuilding at the destination.<LI>The data-link layer frames the packets-for example, for usewith the PPP (Point to Point). It also includes the logical linkportion of the MAC sublayer of the IEEE 802.2, 802.3 and otherstandards.<LI>Ethernet and Token Ring are the two most common physical layerprotocols. They function at the MAC (Media Access Control) leveland move the data over the cables based on the physical addresson each NIC (Network Interface Card). The physical layer includesthe physical components of the IEEE 802.3 and other specifications.</UL><H2><A NAME="HowTCPIPPacketsAreProcessed"><FONT SIZE=5 COLOR=#FF0000>How TCP/IP Packets Are Processed</FONT></A></H2><P>Protocols such as TCP/IP determine how computers communicate witheach other over networks such as the Internet. These protocolswork in concert with each other, and are layered on top of oneanother in what is commonly referred to as a protocol stack. Eachlayer of the protocol is designed to accomplish a specific purposeon both the sending and receiving computers. The TCP stack combinesthe application, presentation, and the session layers into a singlelayer also called the application layer. Other than that change,it follows the OSI model. The illustration below shows the wrappingprocess that occurs to transmit data.<UL><LI>The TCP application layer formats the data being sent so thatthe layer below it, the transport layer, can send the data. TheTCP application layer performs the equivalent actions that thetop three layers of OSI perform: the application, presentation,and session layers.<LI>The next layer down is the transport layer, which is responsiblefor transferring the data, and ensures that the data sent andthe data received are in fact the same data-in other words, thatthere have been no errors introduced during the sending of thedata. TCP divides the data it gets from the application layerinto segments. It attaches a header to each segment. The headercontains information that will be used on the receiving end toensure that the data hasn't been altered en route, and that thesegments can be properly recombined into their original form.<LI>The third layer prepares the data for delivery by puttingthem into IP datagrams, and determining the proper Internet addressfor those datagrams. The IP protocol works in the Internet layer,also called the network layer. It puts an IP wrapper with a headeronto each segment. The IP header includes information such asthe IP address of the sending and receiving computers, and thelength of the datagram, and the sequence order of the datagram.The sequence order is added because the datagram could conceivablyexceed the size allowed for network packets, and so would needto be broken into smaller packets. Including the sequence orderwill allow them to be recombined properly.<LI>The Internet layer checks the IP header and checks to seewhether the packet is a fragment. If it is, it puts togetherfragments back into the original datagram. It strips off the IPheader, and then sends the datagram to the transport layer.<LI>The transport layer looks at the remaining header to decidewhich application layer protocol-TCP or UDP-should get the data.Then the proper protocol strips off the header and sends the datato the receiving application.<LI>The application layer gets the data and performs, in thiscase, an HTTP request.<LI>The next layer down, the data link layer, uses protocols suchas the Point-to-Point Protocol (PPP) to put the IP datagram intoa frame. This is done by putting a header-the third header, afterthe TCP header and the IP header-and a footer around the IP datagramto fra-me it. Included in the frame header is a CRC check thatchecks for errors in the data as the data travels over the network.<LI>The data-link layer ensures that the CRC for the frame isright, and that the data hasn't been altered while it was sent.It strips off the frame header and the CRC, and sends the frameto the Internet layer.<LI>On the receiving computer, the packet travels through thestack, but in the opposite order from which the packet was created.In other words, it starts at the bottom layer, and moves its wayup through the protocol stack. As it moves up, each layer stripsoff the header information that was added by the TCP/IP stackof the sending computer.<LI>The final layer is the physical network layer, which specifiesthe physical characteristics of the network being used to senddata. It describes the actual hardware standards, such as theEthernet specification. The layer receives the frames from thedata link layer, and translates the IP addresses there into thehardware addresses required for the specific network being used.Finally, the layer sends the frame over the network.<LI>The physical network layer receives the packet. It translatesthe hardware address of the sender and receiver into IP addresses.Then it sends the frame up to the data link layer.</UL><HR><CENTER><P><A HREF="ch1.htm"><IMG SRC="PC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="#CONTENTS"><IMG SRC="CC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="contents.htm"><IMG SRC="HB.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="ch3.htm"><IMG SRC="NC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><HR WIDTH="100%"></P></CENTER></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -