2.2 The OSI Reference Model
2.2.4 Encapsulation
You know that all communications on a network originate at a source, and are sent to a destination, and that the information that is sent on a network is referred to as data or data packets. If one computer (host A) wants to send data to another computer (host B), the data must first be packaged by a process called encapsulation. 

Encapsulation wraps data with the necessary protocol information before network transit. Therefore, as the data packet moves down through the layers of the OSI model, it receives headers, trailers, and other information. (Note: The word "header" means that address information has been added.) 

To see how encapsulation occurs, lets examine the manner in which data travels through the layers as illustrated in the Figure . Once the data is sent from the source, as depicted in the Figure, it travels through the application layer down through the other layers. As you can see, the packaging and flow of the data that is exchanged goes through changes as the networks perform their services for end-users. As illustrated in the Figures, networks must perform the following five conversion steps in order to encapsulate data:

Figure :

  1. Build the data.
    As a user sends an e-mail message, its alphanumeric characters are converted to data that can travel across the internetwork.
  1. Package the data for end-to-end transport.
    The data is packaged for internetwork transport. By using segments, the transport function ensures that the message hosts at both ends of the e-mail system can reliably communicate.
  1. Append (add) the network address to the header.
    The data is put into a packet or datagram that contains a network header with source and destination logical addresses. These addresses help network devices send the packets across the network along a chosen path.
  1. Append (add) the local address to the data link header.
    Each network device must put the packet into a frame. The frame allows connection to the next directly-connected network device on the link. Each device in the chosen network path requires framing in order for it to connect to the next device.
  1. Convert to bits for transmission.
    The frame must be converted into a pattern of 1s and 0s (bits) for transmission on the medium (usually a wire). A clocking function enables the devices to distinguish these bits as they travel across the medium. The medium on the physical internetwork can vary along the path used. For example, the e-mail message can originate on a LAN, cross a campus backbone, and go out a WAN link until it reaches its destination on another remote LAN. Headers and trailers are added as data moves down through the layers of the OSI model.
icon2.gif (1232 bytes) Web Links
The OSI Seven Layers Model