The following is the fifth installment of a multi-part series on the fundamentals of routing. Each tip is excerpted from Routing First-Step by William Parkhurst, published by Cisco Press. Check back frequently for the next installment,
TCP/IP layered protocol model
There are different types of service that you can use when delivering a letter. You can use a best effort model. This means that you simply place a stamp on the letter and drop it in a mailbox. How do you know if the letter was delivered? You don't. Not unless the recipient somehow tells you they received the letter. If you want to ensure delivery, you could send a registered letter. After the letter has been delivered, you will receive an acknowledgment from the post office. The layered postal delivery model needs to be modified to include this feature. (See Figure 3-14.) Although IP is used to deliver packets, and TCP and UDP are transport level protocols, the layer model for the Internet is usually referred to as the TCP/IP model.
Figure 3-14 - Post Office Layered Protocol Model
At the Addressing – Person layer, two options have been added:
The Internet layered model has two additional protocols that are equivalent to normal and registered mail:
Integrating TCP and UDP into the Internet model gives you the complete TCP/IP layered protocol model. (See Figure 3-15.)
The port information in the UDP header is used to identify the sending and receiving applications. (See Figure 3-16.)
The source port is equivalent to the person who is sending the letter. The destination port is equivalent to the person who is to receive the letter. Applications initially will use a well-known port number. For example, if you are using a web browser to contact the Cisco website, your application will send a message to port 80 at IP address 220.127.116.11. The source port is usually assigned dynamically for the application and is included in the UDP header. When the webserver for Cisco.com sends a reply, it will send it back to the dynamic port number that was assigned for the sender's application. The destination IP address is used to reach the host running the web server, and the destination port number is used to reach the proper application. The combination of a port number and an IP address is called a socket. A socket is sufficient to identify a particular application on a specific host.
The TCP header is similar to the UDP header with additional fields to enable acknowledgments. (See Figure 3-17.)
The source and destination port numbers serve the same function as they did in the UDP header. The remaining fields are used to send the equivalent of registered mail. The operation of the TCP protocol can be complex. If you are interested in learning more, consult the reference list at the end of the chapter.
Before moving on to the next exciting topic, let's trace the flow through the TCP/IP protocol stack. (See Figure 3-18.)
The application sends the data, such as the text of an e-mail, you are sending to UDP or TCP where the destination and source port numbers are recorded. The IP layer adds the source and destination IP addresses, and sets the protocol field to UDP or TCP depending on what is being used. The IP layer then hands the packet off to the network interface layer. This example uses Ethernet, so the network interface layer adds the source and destination Ethernet addresses. Finally, the entire thing is sent to the network to be sent to the destination.
Upon receipt of an IP packet by a host, the destination Ethernet address is first inspected. If it matches the host's Ethernet address, the Ethernet header is stripped off, and the remaining part of the packet is sent up the protocol stack to the IP layer. The IP layer looks at the destination IP address. If it is the correct IP address, the IP layer strips off the IP header, and sends what is left either to TCP or UDP—depending on the setting of the protocol field. UDP or TCP then uses the destination port number to send the data to the correct application.
All parts reproduced from the book Routing First-Step, ISBN 1587201224, Copyright 2005, Cisco Systems, Inc. Reproduced by permission of Pearson Education, Inc., 800 East 96th Street, Indianapolis, IN 46240. Written permission from Pearson Education, Inc. is required for all other uses. Visit www.ciscopress.com for a detailed description and to learn how to purchase this title.
This was first published in October 2004