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 tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.
Thanks for your understanding!
Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide
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 internetworksnetworks of networkswhich 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 layerlayer 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:
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.