To better understand how network switching works, it is vital to understand how the OSI model works and how data moves through the OSI model. How you move through the OSI model depends on whether you are the sender or the receiver. The sending side wraps, or encapsulates, the data, much as you enclose a letter in an envelope. The receiving side unwraps, or decapsulates, the data, much as the receiver opens an envelope to remove the contents.
Sending, or encapsulating, data requires five steps, as follows:
To demonstrate the encapsulation of data, let's look at what happens when you write and send a letter (a real, old-fashioned letter, not e-mail), as illustrated in Figure 2-2.
As shown in Figure 2-2, data (in this case, old-fashioned mail) is sent (or encapsulated) as follows:
User data (Layers 5?7)? You write your words using a specific style, such as Roman characters or script, on a piece of paper, in a certain language, such as English.
Segments (Layer 4)? You fold the paper and place it into an envelope. If your letter is made up of multiple pages, each page, or "segment," is numbered so the letter is reassembled in the correct order by the receiver.
Packets (Layer 3)? You write the sender's and receiver's postal address on the envelope. Like an envelope, a packet contains user information and identifies the sending and receiving address.
Frames (Layer 2)? Your letter is put into a mailbag with other letters to be carried to the same destination. The mailbag here is the frame carrying multiple packets. These frames are put onto a mail truck, in which a truck driver carries the envelope to its destination.
Bits (Layer 1)? The truck is driven across the highways and other roads to reach the receiver.
The following steps demonstrate what happens to the data on the receiving end, where it is opened (decapsulated):