4.Transport layer
It breaks up data between into smaller parts as complete data can't be send over the network as a single unit.
So, it has to be converted/divided into many smaller units (called Data Units)before transmission at sending side, which are then re-assembled at receiving side.
- This whole process is known as Segmentation & these smaller untis are known as Segments at transport later.
It establishes end-to-end connectivity using port numbers !
Ensure reliable data delivery via error detection & re-transmission (using TCP)
Protocols Used :(TCP/UDP)
- TCP is used for relieble communication (by TCP 3-way handshaking process)
-e.g. SMTP, FTP
- UDP is used for unreliable communications
-e.g. Phone calls, Video calls
Port numbers : Range - 0 to 65535
0 to 1023 - well known port numbers
1024 to 64511 - used fir general client server sessions
64512 to 65535 - private or dedicated port numbers
Socket - IP address + Port Numbers
---------------------------------------------------------------------------------------------------------------------------------
5.Network Layer
It provides connectivity & path selection
- Routing (Packet Switching)
Defines logical addressing
- IPv4
- IPv6
Devices & Protocoal at this layer:
- Router
- IPv4 , IPv6 , ICMP
Note :
Type : IFCONFIG in your CMD and see the IP address details !
-----------------------------------------------------------------------------------------------------------------------
6.Data Link Layer
It completes the Final Formatting of the data before actully sending it over the physical links.
Defines Physical Addressing:
- Mac addressing
Controls Error Detection:
Cyclic Redundancy Check (CRC)
Devices & Protocaols at L2 :
-Switches, Bridges, Wireless Access Points, Ethernet, PPP
-------------------------------------------------------------------------------------------------------------------------------
7.Phisical Layer
It defines physical media properties:
- electrical/ optical functions
- Phsical data rates
- Physicial connectors
- Cable distances
- Optical wavelengths
- Wireless frequencies
Devices & Protocols :
- Hubs, Repeaters, CAT cables, Fiber Optics etc.
--------------------------------------------------------------------------------------------------------------------------------
WHY USE LAYERED ARCHITECTURE?
Devices only need to be aware of their own layer:
- Web-servers don;t care if the requests are coming from wired cables or wireless frequencies
- Switches don;t care if they are sending either IPv4 or IPV6 as they have nothing to do with it
Allows inter-operability between devices & vendors:
- Google chrome can freely talk to Apache server as they both agree on HTML standards
- HUAWEI Ethernet switch can talk to D-Link Ethenet switch as they agree on Ethenet standards
- Cisco router can connect to Juniper router as they agree on Ip routing standards
--------------------------------------------------------------------------------------------------------------------------------
ENCAPSULATION & DE-CAPSULATION
It is the process of
- Breaking a large amount of data into smaller pleces
- Adding informamtion of each layer in the forms of headers & traillers
- Creating a Protocol Data Unit (PDU)
So, basiically PDU is the resulting data that eachj layer creates
- Header is added at the start of data
- Trailer is added at the end of data
Note: DATA LINK LAYER IS THE ONLY LAYER THAT UESES TRAILER AS WELL AS HEADER!
-------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------
Encapsulation:
- Process of addding data formatting on the sending host to creat a PDU
- It occurs when data moves down the OSI stack I.E.7>6>5
- Data is passed to the layer below
- The process repeats until the pyhsical layer is reached
De-Capsulation:
- Process of removing data formatting on the Receiving host to retrieve information from a PDU
- It occurs when data moves up OSI stack i.e. 1>2>3 and so on
- Each layer removes its own header/trailer
- Data is then passed up to the layer above
- Process repeats until application is reached
--------------------------------------------------------------------------------------------------------------------------------
Where is OSI HELPFUL IN REAL LIFE
When troubleshooting a network problem we often go up the OSI model:
I.E.
Pyhsical - network cable plugged in?
Data Link - have a link light ?
Network - get an IP?
Transport - ping your default gateway?
Session - DNS sever info ?
- Ping 8.8.8.8 but not google.com ?
Presentation & Application - Can you browse a website ?