?? ch2.htm
字號:
<HTML><HEAD><TITLE>Chapter 2 -- How TCP/IP Works</TITLE><META></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#CE2910"><H1><FONT SIZE=6 COLOR=#FF0000>Chapter 2</FONT></H1><H1><FONT SIZE=6 COLOR=#FF0000>How TCP/IP Works</FONT></H1><HR><P><CENTER><B><FONT SIZE=5><A NAME="CONTENTS">CONTENTS</A></FONT></B></CENTER><UL><LI><A HREF="#HowTCPIPandIPXWorkonIntranets">How TCP/IP and IPX Work on Intranets</A><LI><A HREF="#HowtheOSIModelWorks">How the OSI Model Works</A><LI><A HREF="#HowTCPIPPacketsAreProcessed">How TCP/IP Packets Are Processed</A></UL><HR><P>As we saw in <A HREF="ch1.htm" >Chapter 1</A> an intranet is a private network builtusing the Internet's technology and communication protocols. Atthe heart of this technology-and what makes all intranet communicationspossible-are two protocols for exchanging information: The TransmissionControl Protocol (TCP) and the Internet Protocol (IP). Together,these protocols are known as TCP/IP. They are separate protocols,not a single one, although they are tightly woven together toallow for the most efficient communications.<P>These two protocols perform their magic by doing something thatseems deceptively simple. They break data into sections calledpackets, deliver those packets to the proper destinations on anintranet (or onto the Internet), and after they've been delivered,they reassemble the packets into their original form so that theycan be viewed and used by the recipient. TCP performs the workof separating the data into packets and reassembling it, whileIP is responsible for making sure that the packets are sent tothe right destination.<P>TCP/IP is used because intranets (and the Internet) are what isknown as <I>packet-switched</I> networks. In a packet-switchednetwork, information is sent in many small packets over many differentroutes at the same time and reassembled at the receiving end.Because packet-switched networks can always use the most efficientmeans of delivery by tapping into unused network resources, theymake the best use of the network's resources.<P>By contrast, the telephone system is a <I>circuit-switched</I>network. In a circuit-switched network, there is a single, unbrokenconnection between the sender and the receiver. Once a connectionis made to a resource on the network (as with a telephone call),even if no data is being sent (such as when a call is on hold),that physical connection remains exclusively dedicated to thatsingle connection.<P>In order for personal computers to take full advantage of intranets,they need to use TCP/IP protocols. Winsock functions as an intermediarybetween the personal computers and intranet (and Internet) hosts.For Macintoshes, the software is called Mac/TCP. Winsock is anapplication program interface (API) that handles the sending andreceiving data to the TCP/IP systems. <P>An intranet may not be the only network used within a corporation.An intranet may be connected to other corporate networks, in particularto NetWare-based networks. When this happens, the intranet canbe used as a way to route data between the NetWare networks. Todo this a NetWare network sends packets of data, and essentiallydisguises its own network protocols inside IP packets, and thenuses IP protocols to send the data from one network to another.When an intranet is used like this, it is referred to as <I>IPtunneling</I>.<H2><A NAME="HowTCPIPandIPXWorkonIntranets"><FONT SIZE=5 COLOR=#FF0000>How TCP/IP and IPX Work on Intranets</FONT></A></H2><P>What distinguishes an intranet from any other kind of privatenetwork is that it is based on TCP/IP-the same protocols thatapply to the Internet. TCP/IP refers to two protocols that worktogether to deliver data: the Transmission Control Protocol (TCP)and the Internet Protocol (IP). When you send information acrossan intranet, the data is broken into small packets. The packetsare sent independently through a series of switches called routers.Once all the packets arrive at their destination, they are recombinedinto their original form. The Transmission Control Protocol breaksthe data into packets and recombines them on the receiving end.The Internet Protocol handles the routing of the data and makessure it gets sent to the proper destination.<OL><LI>In some companies, there may be a mix of TCP/IP-based intranetsand networks based on other networking technology, such as NetWare.In that instance, the TCP/IP technology of an intranet can beused to send data between NetWare or other networks, using a techniquecalled IP tunneling. In this instance, we'll look at data beingsent from one NetWare network to another, via an intranet. NetWarenetworks use the IPX (Internet Packet Exchange) protocol as away to deliver data-and TCP/IP networks can't recognize that protocol.To get around this, when an IPX packet is to be sent across anintranet, it is first encapsulated inside an IP packet by a NetWareserver specifically for and dedicated to providing the IP transportmechanism for IPX packets.<LI>Data sent within an intranet must be broken up into packetsof less than 1,500 characters each. TCP breaks the data into packets.As it creates each packet, it calculates and adds a checksum tothe packet. The checksum is based on the byte values, that is,the precise amount of data in the packet.<LI>Each packet, along with the checksum, is put into separateIP wrappers or "envelopes." These wrappers contain informationthat details exactly where on the intranet-or the Internet-thedata is to be sent. All of the wrappers for a given piece of datahave the same addressing information so that they can all be sentto the same location for reassembly.<LI>The packets travel between networks by intranet routers. Routersexamine all IP wrappers and look at their addresses. These routersdetermine the most efficient path for sending each packet to itsfinal destination. Since the traffic load on an intranet oftenchanges, the packets may be sent along different routes, and thepackets may arrive out of order. If the router sees the addressis one located inside the intranet, the packet may be sent directlyto its destination, or it may instead be sent to another router.If the address is located out on the Internet, it will be sentto another router so it can be sent across the Internet.<LI>As the packets arrive at their destination, TCP calculatesa checksum for each packet. It then compares this checksum withthe checksum that has been sent in the packet. If the checksumsdon't match, TCP knows that the data in the packet has been corruptedduring transmission. It then discards the packet and asks thatthe original packet be retransmitted.<LI>TCP includes the ability to check packets and to determinethat all the packets have been received. When all the non-corruptpackets are received, TCP assembles them into their original,unified form. The header information of the packets relays thesequence of how to reassemble the packets.<LI>An intranet treats the IP packet as it would any other, androutes the packet to the receiving NetWare network. On the receivingNetWare network, a NetWare TCP/IP server decapsulates the IP packet-itdiscards the IP packet, and reads the original IPX packet. Itcan now use the IPX protocol to deliver the data to the properdestination.</OL><H2><A NAME="HowtheOSIModelWorks"><FONT SIZE=5 COLOR=#FF0000>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -