以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 计算机英语 』  (http://bbs.xml.org.cn/list.asp?boardid=39)
----  [推荐]How TCP/IP Works  (http://bbs.xml.org.cn/dispbbs.asp?boardid=39&rootid=&id=10584)


--  作者:hjx_221
--  发布时间:9/25/2004 9:28:00 AM

--  [推荐]How TCP/IP Works

How TCP/IP Works

  Over the past few years ,one of the most written-about network topics has been IP. But even with all this attention, few, if any ,stories have traced the protocol\'s basic workings, that is ,how routers and Layer 3 switches act upon IP information to move Ethernet packets across the network.

  As a point of referenced, bear in mind that IP is a member of the TCP/IP protocol suite.

  TCP functions at the Open Systems Interconnection(OSI)transport layer, or Layer 4.Its chief responsibility is to ensure reliable end-to-end connectivity. IP, located one layer down, at the OSI network layer, or Layer 3, communicates the addresses of each packet\'s sender and receiver to the routers along the way. Routers and Layer 3 switches can read IP and other Layer 3 protocols .This information ,combined with routing tables and other network intelligence ,is all it takes to get across the room or around the world via TCP/IP.

  The routing process begins with an IP address that is unique to the sending end station .End stations may be assigned permanent IP addresses or they may borrow them as needed from a Dynamic Host Configuration Protocol (DHCP) server or other service.

  Each packet carries a source address, which under current (IPv4) specifications is 32 bits long .In its header, each packet also carries the IP address of the final destination.

  If the sending end station determines that the destination address is not local ,the packet goes to a first-hop router ,typically one that is close and has been preassigned to the sender.

  The router inspects the packet\'s IP address and performs a route table lookup to see if the destination end station resides on the local (physically connected) network, typically called an IP subnet .An IP subnet usually is assigned to each of the router\'s network interfaces.

  If the destination IP address is local ,the router searches an internal store of IP addresses and local-device Media Access Control(MAC) addresses. This store is known as the Address Resolution Protocol (ARP) cache. ARP is the universal tool for matching IP addresses to MAC addresses. If the destination\'s MAC address appears, the router installs that MAC address in the packet header (removing its own MAC address because that\'s no longer needed) and sends the packet to the destination end station.

  In the event that the destination MAC address does not appear in the ARP cache ―it might have timed out ,for instance― the router must broadcast an ARP request to the subnet referenced by the packet\'s destination IP address .The end station with that IP address responds, sending back its MAC address .The router updates its cache, installs the new MAC address into the packet header and launches the packet. If the route table lookup shows that the packet is destined for a non-local subnet, the router forwards the packet to the next-hop router using the next-hop router\'s MAC address. Routing tables are continuously built and rebuilt by intelligent discovery protocols, such as Routing Information Protocol or Open Shortest Path First (OSPF). Each router\'s routing table shows the best route to the destination address ;for addresses that may be several hops away, it shows the best next-hop router.


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms