Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide

NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Searchable, convenient, complete TCP/IP information.
The TCP/IP Guide

Custom Search

Table Of Contents  The TCP/IP Guide
 9  The Open System Interconnection (OSI) Reference Model
      9  Key OSI Reference Model Concepts

Previous Topic/Section
Data Encapsulation, Protocol Data Units (PDUs) and Service Data Units (SDUs)
Previous Page
Pages in Current Topic/Section
Next Page
Understanding The OSI Reference Model: An Analogy
Next Topic/Section

Indirect Device Connection and Message Routing

Most of the explanations that I have provided in the other topics of this section have discussed the mechanisms by which machines connect to each other over a network directly. However, one of the most powerful aspects of networking is that it is possible to create internetworks—networks of networks—which allow devices to be connected indirectly. For example, machine “A” may send a message to machine “B” without really even knowing where it is on the network at all.

If a message is being sent between devices that are not on the same network, then it must be passed between directly-connected networks until it reaches its final destination. The process of transmitting a message from one network to another is called forwarding, and the collective process of forwarding from one device to another is routing. These concepts are fundamental to all internetworking, including the Internet itself. Every time you access an Internet resource such as a Web site, you are sending messages that get routed to that site, and the responses you receive get routed back.

Note: Even though the technically-correct term for moving a message from one network to an adjacent network is “forwarding”, over time the term “routing” has come to often be used both for a single network-to-network transfer as well as the overall process of transmitting a message from one device to another.

In the context of the OSI Reference Model, routing is an activity that generally takes place at the network layer—layer 3. Recall that data encapsulation causes a higher-layer message to be surrounded by headers and/or footers at the lower layers. When a message is routed, here's what happens:

  • A high-level application on a machine decides to send a datagram to a distant computer. The datagram is packaged, and then passed down vertically through the protocol stack on the originating machine. Each layer encapsulates the data as described earlier. The datagram is addressed to the final destination device. When the message gets to the network layer and below, however, it is not packaged for local delivery directly to its ultimate destination, but rather to an intermediate device. This is the device that is responsible for routing to that destination network. The message is passed down to the data link layer and then the physical layer for transmission to that intermediate device.

  • The intermediate device (often called a router) receives the message at the physical layer. It is passed up to the data link layer, where it is processed, checked for errors and so on, and the data link layer headers are removed. The resulting packet is passed up to the network layer. There, the intermediate device determines if the destination machine is on its local network, or if it needs to be forwarded to another intermediate device. It then repackages the message and passes it back down to the data link layer to be sent on the next leg of its journey.

  • After several potential intermediate devices “handle” the message, it eventually reaches its destination. Here, it travels back up the protocol stack until it reaches the same layer as the one of the application that generated the message on the originating machine.

    Figure 17: Message Routing in the OSI Reference Model

    This diagram shows how routing is accomplished conceptually in the OSI model. The intermediate device connects the networks of the message transmitter and recipient. When data is sent, it is passed up to the network layer on the intermediate device, where it is repackaged and sent back down the stack for the next leg of its transmission. Note that the intermediate device actually has two different layer 1 and 2 implementations; one for the interface to each network. Also note that while the layer 3 protocol must be the same across the internetwork, each network can use different technologies at layers 1 and 2.


The key to this description is that in the intermediate devices, the message travels back up the OSI layers only to the network layer. It is then repackaged and sent back along its way. The higher layers are only involved on the source and destination devices. The protocol used at layer 3 must be common across the internetwork but each individual network can be different. This demonstrates some of the power of layering, by enabling even rather dissimilar physical networks to be connected together. The process is illustrated in Figure 17.

Key Concept: In the OSI model, the process of routing occurs when data is sent not directly from transmitter to ultimate recipient, but indirectly through the use of an intermediate system. That device, normally called a router, connects to two or more physical networks and thus has multiple interfaces to layer two. When it receives data, the data passes up only to the network layer, where it is repackaged and then sent on the next leg of its journey over the appropriate layer two interface.


Previous Topic/Section
Data Encapsulation, Protocol Data Units (PDUs) and Service Data Units (SDUs)
Previous Page
Pages in Current Topic/Section
Next Page
Understanding The OSI Reference Model: An Analogy
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $

Home - Table Of Contents - Contact Us

The TCP/IP Guide (
Version 3.0 - Version Date: September 20, 2005

Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.