Deep Dive of OSI Model

Deep Dive of OSI Model

How Internet works Internally ?

The concept of OSI is that the process of communication between two endpoints in a network can be divided into seven distinct groups of related functions or layers. Each communicating user or program is on a device that can provide those seven layers of function.

TCP: Transmission control protocol ensures that the data will reach the destination and not be corrupted on the way.

UDP(USER DATAGRAM PROTOCOL):
Whether 100% of the data is reaching or not to the server for example video call.

HTTP: Hypertext transfer protocol: which is used by the web browser
example: Web client web server

Port numbers and IP addresses :

big entities to small entities than to service providers to the us
submarine cables connected throughout the world: optical fibre cables
not satellite but cables because it is faster than satellite

physically: optical fibre cables
wireless: Bluetooth, wifi, 3g 4g 5g

How countries are connected :
LAN (local area network ): local internet by area wise through ethernet cable
network adapters, wifi
MAN(Metropolitan area network): Across a city
WAN(wide area network): across the networks through
optical fibre cables -> Sonet (synchronous optical networking ) ->
using optical fibre to carry the data hence it covers a larger network area

2. Frame Relay:
To collect your local area network to the wider network
Modem: This is used to convert digital signals into an analogue signals and vice-versa
router: the device which routes the data packet based on the IP addresses

various ways of connection :
TOPOLOGIES :

  1. Bus topology: Every system in bus topology is like a backbone and computers are connected to nodes. if a single link gets broken it spoils the entire network.
    only one person can send data at a particular time.

  2. Ring: Computers are connected in a ring way -> every system communicates with one another a-b-c and so on.
    Limitation: One of the cables break we can't transfer the data
    2nd one is if call a-b will call c-d also

  3. Star: every node is connected to a centralised device.

  4. Tree: the combination of bus and stars... every single one can have. a star topology many stars are connected by one busway

  5. Mesh: Every single computer will be connected to every single computer
    limitation: Expensive -> scalability issue

    Structure of Network

Structure of Network: Data transport -> received
OSI Model:
It stands for open system interconnected Internet, The standard way of can two or more computers can communicate with each other There are certain layer's for OSI:

*Application Layer
*Presentation layer
*Session Layer
*Transport Layer
*Network Layer
*Data Link
*Physical Layer

Application:
It is implemented in software so the user interacts with the users from Application to application, Sending data over the application to the presentation layer.

Presentation:
In a presentation whatever the data has been transmitted (Ascii, char) it converts the data into the machine-readable format (EBCDIC)
and further steps it checks for encoding, and encryption to the readable form. The data over here is also compressed

Session:
The session helps in setting up and managing the connection and it enables the sending and receiving of data, followed by the termination of the connection, Then authentication and authorization take place.
An example of a session layer could be the payment session while ordering the food, It set up the connection for payment till the payment is received it logs out of the session.

Transport:
In the transportation layer, it has its protocol for how to transfer the data further for example in (TCP / UDP ) and it could be in 3 ways:

A~ Data being received from the session layer will be divided into small units called segments and every segment will contain the Port Number containing the port and destination number (where the data is transferred to the application accordingly) and the Sequence number: which helps in reassembling the segments in the correct order (The data which divided into chunks will each have the sequence number).

B~ Transport control Then it will have transport control for enough amount of data transmission to get connected. it also adds the checksum of whether the data is good or not.

Network:
Transmission of segments located at different locations, This is where the Router takes place, It performs a sort of logical addressing (IP address) and transfers the data.

Data-Link:
It allows us to directly communicate with the other computer and host, The data Link will receive the data packet from the data packet which contains the IP addresses of both the sender and the receiver. it consists physical address(MAC address) A 12-digit alpha-numeric network. of computer. could be different for other assets, So the data link adds the mac address in a frame and transports it further.

Application Layer: In this layer, it interacts with the users with web browsers.
it lies on the devices.

Client Server Architecture:-
Sending the signal~ From client to server and getting the response from the server to the client. we can use this CLI to check the ping (ping any server)
packet (64 bytes ) sending the data in chunks called segments.

Can we reduce the ping?
Possibly No because it sends the signal almost at the speed of light at the best speed.

Peer to peer: In this server, the computers are connected and each server is a node (Decentralised system).
for eaxmple Torrenzt.

Repeater: It operated the physical layer, this regenerates the signal over the same network before the signal becomes too weak or gets corrupt to extend the length to which the signal can be transmitted over the same signal network.

Hub: A hub is basically a multiport repeater. A hub connects multiple wires coming from the different branches, The connector in a star topology connects different stations.
There are two Hubs :

*Active Hub: In this hub, it boosts the signal as they have its own power supply and can clean, it serves both as a repeating and wiring centre.

*Passive Hub: These are the hubs which collect wiring from the nodes and power supply from the active hub. These hubs relay signals onto the network without cleaning and boosting them and can't be used to extend the distance between nodes.

Ports: Ephemeral ports, These ports internally assign a random number of ports.

HTTP Method

HTTP basically an application layer which uses a transport layer to send the data to the server while requesting the response.

GetMethod: This actually tells the server what to do.
PostMethod: In this method where you are sending some form of data to the server. for-example-Username/Password
Put: This puts data at the specific location
Delete: This deletes the data from the server.

Status Code

When the data is sent to the server from the client it flags up with the signal called status code:
1xx information error
2xx success error
3xx Redirectory error
4xx Client error
5xx Server error

Cookies: The HTTP is stateless whenever we visit the browser there's the same state it's not saving any data, still the browser is not logging you out from the shopping website or some e-commerce website that's happening because of the cookie which is unique sort of string stored in the browser
and send the data to the server database about who is contacting. The cookie is stored in the browser and stored in the server as per the user value.

How Email Works?
The application layer protocol for sending the email is SMTP (simple mail transfer protocol) and the response is (pop3)
When the user pushes the email to the server and then it is transferred to the user receiver server from the sender SMPT to the receiver SMPT server & internally it works on TCP(transmission control protocol)

POP: Post office protocol
we first connect the client-server to the pop server using TCP on port 110
then it authorizes and transacts and the client asks the server for all the new emails and then we can download and keep the email on the server.

IMAP: Internet message access protocol
It allows us to view our emails on multiple devices, We can sync on our folder as well.

DNS: Domain name server
When we search google.com then it will find out the IP address of the google
Since we cannot remember the IP addresses so we use the Domain name
for example, Google.com is the domain name mail.google.com.

Root DNS server
where mail is the subdomain and google is the second-level domain and .com/org/.in/.io is the top-level domain (dig server/ man dig)

Transport Layer: In the transport layer, it takes care of the transferring of the message from one computer to another computer to which application it going to send the data, It also takes care of congestion control and data travels from the transport layer to the network layer.

CheckSums: To send the data and make sure it will be transferred in the correct order we use checksums which calculate the data as per the string value when the data we transferred, It is attached to the checksum with the data and the other user (receiver) calculate the checksum algorithm from their end and if the value is different it's invalid thou it should be same.

Did you find this article valuable?

Support Siddharth verma by becoming a sponsor. Any amount is appreciated!