OSI model
OSI model
OSI model is an acronym for Open Systems Interconnection is used to define how data is transferred from one system to another system in a computer network. Now you may ask how a network is formed? If two computers are connected to each other with LAN cables, connectors and Network Interface Card forms a network. Since the designing and infrastructure won't be similar of two computers the OSI model was introduced by ISO(International Organization for Standardization) in 1984 for a successful communication between computers or networks.
OSI model consists of 7 different layers
1. Application layer
2. Presentation layer
3. Session layer
4. Transport layer
5. Network layer
6. Data link layer
7. Physical layer
Now I'm going to give a mnemonic to remember the OSI model
Please-Do-Not-Throw-Sausage-Pizza-Away, easy right?
Application layer -
- Application layer does not include applications like chrome, firefox instead it includes application layer protocols that are needed to make these application work correctly in the network or internet.
- Application layer is used by Network Application for eg. applications that uses internet, web browser is a network application running in your PC, it does not reside in the layer but uses application layer protocols such as HTTP or HTTPS.
- There are n number of protocols that are enabled to do various functions at this layer.
- Eg. HTTP, HTTPS, FTP, NFS, DHCP, SNMP, TELNET, POP3, IRC.
- For file transfer it uses FTP i.e File Transfer Protocol, for web surfing it uses HTTP/HTTPS, for email transfer it uses SMTP i.e Simple Mail Transfer Protocol, for virtual terminal it uses TELNET.
Presentation layer -
- Presentation layer receives data from application layer. Since computer only understands binary format data - 0s and 1s, data which is received from application layer is in the form of characters and numbers so presentation layer converts these formats into binary form.
- Conversion of data from ASCII to EBCDIC is known as translation.
- Before transmission, this layer reduces no. of bits used to represent original data, this process is known as compression. Which can be lossy or lossless.
- To maintain the integrity of data before transmission data is encrypted. At sender's side data is encrypted at receiver's side data is decrypted,which enhances the security of data
- SSL is used in presentation layer for encryption and decryption
Session layer -
- Session layer helps in setting up and managing connections enabling sending and receiving of data followed by termination of connections or sessions.
- Session layer has API's, NETBIOS for basic network input output system is an e.g of API which allows applications on different computers to communicate with each other.
- Before session is established with a server, it performs a function called as authentication.
- Authentication is a process to verify who you are which uses username and password, onced this is matched connection is established between your server and computer.
- After authentication, authorization is checked. Authorization is a process to determine if an authenticated user has permission to access a file if not a message will be displayed saying you are not authorized to access this file.
- Session layer keeps a track of files that are downloaded. for e.g a webpage contains texts, images these texts and images are stored as separate files from the web server.
- When you request a website in your web browser, your web browser opens a separate session to download these files which are received in the form of a data packets.
- Session layer keeps a track of which data packets belong to which file, either text file or image file and tracks where these received data packets go, which helps is session management
Transport layer -
- Transport layer controls the reliability of communication through segmentation, flow control and error control.
- Protocols of this layer are TCP and UDP
Segmentation -
- Here data received from session layer is divided into small data units called as segments.
- Each segments contains a source and destination port numbers and a sequence number
- Port number helps to direct each segment to the correct application and sequence numbers helps to rearrange the segments in the correct order to form a correct message.
Flow Control -
- Transport layer controls the amount of data being transmitted.
- Suppose our mobile is connected to a server which can transmit a data upto 100Mbps and our mobile can process data upto 10Mbps, now we are downloading file from the server and server starts sending data at 50 Mbps, so mobile phones with the help of transport layer can tell the server to reduce the transmission rate and vice versa
Error control -
- If data is not arrived in the destination, transport layer uses Automatic Repeat Request Scheme to retransmit the lost or corrupted data.
- A group of bits called as checksum is added to each segment to find out received corrupted segment.
Network layer -
- Transport layer passes segments to the network layer, data units in the network layer are called as packets.
- It is the layer where router resides. The functions of network layer are logical addressing, path determination and routing.
- IP addressing is done in network layer known as logical addressing.
- Routing is the method of moving data packets from source to destination and it is based on logical address.
- Choosing a best possible path for data delivery from source to destination is known as path determination.
Data Link layer -
- This layer receives data packets from network layer, there are two types of addressing- logical addressing and physical addressing.
- Logical addressing is done in network layer whereas physical addressing is done in data link layer.
- Where MAC address of sender and receiver are assigned to each data packet to form a frame.
- Data link layer is embedded as software in NIC of a computer and provides means to transfer data from one computer to another via local media.
- Local media includes copper wire, optical fiber or air for radio signals.
Physical layer -
- This layer converts this binary sequence into signals and transmit over local media.
- It can be an electrical signal in case of copper cable, light signal in case of optical fiber and radio signal in case of an air.
- So signal generated in physical layer depends on the type of the media used to connect two devices.
- At the receiver, physical layer receives signals converts it to bits and passes it to the data link layer as a frame.
- Finally data is moved to application layer, application layer protocols makes the sender's message visible in the application in the receiver's computer screen.
Learn : Ethical Hacking Terminologies
- If data is not arrived in the destination, transport layer uses Automatic Repeat Request Scheme to retransmit the lost or corrupted data.
- A group of bits called as checksum is added to each segment to find out received corrupted segment.
Network layer -
- Transport layer passes segments to the network layer, data units in the network layer are called as packets.
- It is the layer where router resides. The functions of network layer are logical addressing, path determination and routing.
- IP addressing is done in network layer known as logical addressing.
- Routing is the method of moving data packets from source to destination and it is based on logical address.
- Choosing a best possible path for data delivery from source to destination is known as path determination.
Data Link layer -
- This layer receives data packets from network layer, there are two types of addressing- logical addressing and physical addressing.
- Logical addressing is done in network layer whereas physical addressing is done in data link layer.
- Where MAC address of sender and receiver are assigned to each data packet to form a frame.
- Data link layer is embedded as software in NIC of a computer and provides means to transfer data from one computer to another via local media.
- Local media includes copper wire, optical fiber or air for radio signals.
Physical layer -
- This layer converts this binary sequence into signals and transmit over local media.
- It can be an electrical signal in case of copper cable, light signal in case of optical fiber and radio signal in case of an air.
- So signal generated in physical layer depends on the type of the media used to connect two devices.
- At the receiver, physical layer receives signals converts it to bits and passes it to the data link layer as a frame.
- Finally data is moved to application layer, application layer protocols makes the sender's message visible in the application in the receiver's computer screen.
Comments
Post a Comment