Networking would be highly complicated without the OSI layers(Open system interconnection).Every networking device including a switch, router, hub etc works based on one of these layers.These layers form the basic framework of any network.This concept of OSI layers was developed by an international standards organization.The following are the 7 layers
A typical example of a physical layer device is the RJ45 cable which we normally use. This layer mainly involves the transmission of bits through a medium.The medium may be an electric voltage or through radio frequencies.It can even transmit through the light.Another layer 1 devices include ethernet, connectors, and Hub.
Data link layer
Switches are the commonly used layer 2 devices.Data link layer is responsible for error control, flow control and transmission of frames.Media access control layer and logical link layer are the two parts of data link layer.As the name says MAC layer is responsible for access control and LLC layer is responsible for flow control.Another layer 2 device includes bridges.Unlike layer 1 devices, both switch and bridge are intelligent devices.MAC address is a unique address given to each networking device by the manufacturer.The layer 2 devices work using this address.
Routing is the key function of the network layer.Thus, the router is the device-constituting layer 3.Internet protocol is the concept behind the layer 3 devices.The IP address is an address which is responsible for communication.Without IP address internet would be impossible.The source and destination are identified by the respective IP address.Address resolution protocol is also a major part of this layer which is responsible for mapping IP address and MAC address.
Transmission control protocol and user datagram protocol constitute transport layer.As the name defines, this layer is responsible for transmission of data and flow control of data.The major difference is that TCP is reliable and UDP is unreliable.
This layer is involved in managing sessions which include setting up a connection, terminating a connection and resuming a connection.
Encryption and decryption are the jobs done by the presentation layer.It ensures compatibility between the application layer and the lower layers.
The end user is the target of the application layer.It provides data in the format that can be understood by the user.This includes file transfer, email transfer, and browsing.Hypertext transfer protocol and file transfer protocols are commonly used protocols in this layer.
In near future SOFTWARE DEFINED NETWORKING is expected.If this is established, then only the top 4 layers will exist.The 3 lower layers and its devices would become extinct.