Search /
Docfinder:
Advanced search  |  Help  |  Site map
RESEARCH CENTERS
SITE RESOURCES
Click for Layer 8! No, really, click NOW!
Networking for Small Business
/

Exposing the deep, dark secrets of TCP/IP

Related linksToday's breaking news
Send to a friendFeedback


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 reference, 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 endstation. Endstations 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 endstation determines that the destination address is not local, the packet goes to a first-hop router, typically one that is close and has been pre-assigned to the sender.

Decisions, decisions

The router inspects the packet's IP address and performs a route table lookup to see if the destination endstation 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 endstation.

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 endstation 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 nonlocal 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. 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.

The next-hop router then performs its own route table lookup. If the packet destination is not local, it sends the packet to the next-hop router. If it is local, the router searches its own ARP cache for the endstation MAC. And if it doesn't find the MAC address, the router broadcasts an ARP request to its local subnets.

This process is repeated until the packet reaches its ultimate destination.

One danger that exists in multihop transmissions involves the creation of infinite loops, where a misconfigured router sends the packet back to a router through which it's already passed. To guard against infinite loops, IP includes a time to live (TTL) function, which sets a time limit for how long the packet can traverse the net. With each hop, a preset TTL value is devalued by one; if that number reaches zero, the packet is dropped and the router notifies the originator via an administrative Internet Control Message Protocol message.

Related Links

TCP/IP
Links to wide variety of additional info on TCP/IP.

Turner is a technology marketing manager in 3Com's Large Enterprise Division. He can be reached at Brad_Turner@3Com.com.

 
NWFusion offers more than 40 FREE technology-specific email newsletters in key network technology areas such as NSM, VPNs, Convergence, Security and more.
Click here to sign up!
New Event - WANs: Optimizing Your Network Now.
Hear from the experts about the innovations that are already starting to shake up the WAN world. Free Network World Technology Tour and Expo in Dallas, San Francisco, Washington DC, and New York.
Attend FREE
Your FREE Network World subscription will also include breaking news and information on wireless, storage, infrastructure, carriers and SPs, enterprise applications, videoconferencing, plus product reviews, technology insiders, management surveys and technology updates - GET IT NOW.
* HOME    * RESEARCH CENTERS     * NEWS     * EVENTS

Contact us | Terms of Service/Privacy | How to Advertise
Reprints and links | Partnerships | Subscribe to NW
About Network World, Inc.

Copyright, 1994-2006 Network World, Inc. All rights reserved.