.
.

Explanation Encapsulation Process

Encapsulation and packages to transfer data

In order to achieve reliable network communication, data can be sent in less tractable packages. This is achieved using the process 'encapsulation'. Encapsulation begins in the 'application layer' and then descends down into the following two layers where it is preparing to send by creating a common data format. After that 'transport layer' breaks the data into smaller objects called 'segments'. Also known as a 'sequential numbers segments' that would enable the recipient to unscramble them draw. After that 'network layer' encapsulated 'segments' into packets and adds the source and destination address (usually a logical IP address) package. Then 'data link layer' encapsulates packets and creates frames.

The data link layer adds a frame source and destination MAC (physical) address. The 'data link layer' then sends binary bits over the 'physical layer' of the medium. When data is sent over the local network, referring to the frames, since MAC addresses everything you need to make the data received from the source to the destination. If you send data to another host via an intranet or the Internet, it is understood that we are talking about the packages. This is because the network address in the packet contains the destination address of the destination to send the packets.

The lower levels of the OSI model are the primary senders of data over the Intranet and Internet. The only exception is a device called the 'Gateway'. It is a device that converts data forms the upper levels of the OSI model (application, presentation, and session level) in other forms of data. Gateway makes working on all seven levels of the OSI model.

Transfer data between devices that work on the first (1) level

IT devices that run on the first level of the OSI model can be 'active' or 'passive'.
Passive example: connectors, patch panels, physical media. They have a role to forward the bits with less distortion.

Active example: repeaters, hubs - they have a role to regenerate the bits on the physical level. Transceivers are also active devices that operate solely on the first level with the task of an adapter or converter media.
Not a single device that works on the first level does not analyze the header or data encapsulated packet. They are interested only 'ones and zeros'.

Data transmission equipment operating on the second (2) level

It is important to know that the packages are in Frame. For understanding of the device on the second level is necessary to understand the frame containing the encapsulated packet. Everything that happens happens in the frame and package. Devices that run on the second level are the devices that work with MAC addresses - NIC, bridge, switch. MAC address, which is located in the ROM network card is kind of key information to create frames.
Bridge work studying the MAC addresses of incoming frames. If the local frame (the MAC address in the same segment as the incoming port Bridge, the frame is not forwarded to the other port Bridge, and vice versa.
Switch the device can be viewed as a bridge with multiple ports. He reads the MAC address and forwards the frame to the port where there is a default address.

Data transmission equipment operating in the third (3) level

Head device used on the third level of the Router device. It actually works on all three first layer (first layer - the bits on the media interface, the second layer - the frames forwarded from one interface to another, a third layer - choosing the path). Router device in his work he uses logical (IP) address. After you select an appropriate output port, the router encapsulates the packets into frames and sends packets to the next destination.

Transferring data in levels 1-7 and 'clouds'

Certain IT devices operate at all seven layers of the OSI model. An example of such a device is a PC - it does a process that could be classified in each level of the OSI model. Encapsulation and Decapsulation are two examples of this.
A device called a Gateway (the computer is capable of converting information to one protocol to another) is also a device that uses all 7 levels. An example would be a gateway computer on the local network through which to access IBM mainframe or fax system. In both cases, the data must go around the OSI model through all the layers to be converted in the form of data that would understand the devices.
Clouds can contain several types of media, Network cards, Switches, Bridge, Router, Gateway and other network devices. Because it does not contain a single device but a lot of them working at different levels, the clouds are considered devices working at levels 1-7.

The trajectory of the data packet through all 7 layers of the OSI model

For example we will take the ping command, which sends several TCP/IP packets that address.
If the specified address is active, it will answer us, and if not properly and we have entered a destination, you probably have a problem on the network.
When the prompt type ping "www.cisco.com", our request will first go through all 7 levels down to our computer. The network will send a series of 'zeros and ones'. We assume that our network consists of Hubs and Routers for the Internet.

How did Hub device that runs on the first level, the Hub is our request to simply forward all your ports. Other workstations in our network will reject our request because it is not addressed to them. But as one of our hub port hooked up the router, it will de-encapsulating frame and look for the IP address in the table route. The table is written that if he wants to get to host 198.150.11.163 (www.cisco.com), must go through the interface 198.150.11.65. Hub device will re-pack the data into a frame and send them via the interface 198.150.11.65 on the interface of another router 198.150.11.66. The router will again de-encapsulate frame and observe the IP adresu198.150.11.163.

How the router device connected to the switch device, router device will pack the package and send the frame Switch device. Switch reads the MAC address of the frame and notes to come must reconnect to the port where the requested address is located. Forwards the frame to the addresses and the requested address in reverse by returning an answer.

Layers of OSI model

Cisco curiculum - Detailed encapsulation process

All communications on a network originate at a source, and are sent to a destination. The information 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 through 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.
To see how encapsulation occurs, examine the manner in which data travels through the layers as illustrated in Figure 1 . Once the data is sent from the source, it travels through the application layer down through the other layers. The packaging and flow of the data that is exchanged goes through changes as the layers perform their services for end users. IT networks must perform the following five conversion steps in order to encapsulate data:
Build the data – As a user sends an e-mail message, its alphanumeric characters are converted to data that can travel across the internetwork.
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.
Add the network IP address to the header – The data is put into a packet or datagram that contains a packet header with source and destination logical addresses. These addresses help network devices send the packets across the network along a chosen path.
Add the data link layer header and trailer – 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.
Convert to bits for transmission – The frame must be converted into a pattern of 1s and 0s (bits) for transmission on the medium. 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.
Figure 1.

Transfer data through the OSI Model