The TCP/IP Internetwork Layer

Imagine that you just wrote a letter to your favorite person on the other side of the country and that you also wrote a letter to someone on the other side of town. It’s time to send the letters. Is there much difference in how you treat each letter? Not really. You put different addresses on the envelope for each letter because the letters need to go to two different places.
You put stamps on both letters and put them in the same mailbox. The postal service takes care of all the details of figuring out how to get each letter to the right place—whether it is across town or across the country.
Inside the postal service, both letters are processed. One letter gets sent to another post office, then another, and so on, until the letter gets delivered across the country. The local letter might go to the post office in your town and then simply be delivered to your friend across town, without going to another post office.
So what does this all matter to networking? Well, the internetwork layer of the TCP/IP networking model, the Internet Protocol (IP), works much like the postal service. IP defines addresses so that each host computer can have a different IP address, just like the postal service defines addressing that allows unique addresses for each house, apartment, and business. Similarly, IP defines the process of routing so that devices called routers (ingenious name, huh?) can choose where to send packets of data so that they are delivered to the correct destination. Just like the postal service created the necessary post offices, sorting machines, trucks, and personnel to deliver the mail, the internetwork layer defines much of the details needed to implement the necessary networking infrastructure.
First, some basic information about the figure will help. The LAN cabling details are not important for this example, so both LANs simply are represented by the lines shown near Bob and Larry, respectively. When Bob sends the data, he is sending an IP packet, which includes the IP header, the transport layer header (TCP, in this example), the application header (HTTP, in this case), and any application data (none, in this case). The IP header includes both a source and a destination IP address field, with Larry’s IP address as the destination address and Bob’s as the source.
A groan grasps the peanut near the offending anthology.