OSI Model:- Basic standards for network communication
Protocols
Standards of communication : Packaging / Addressing / Payment
/ Getting the package on the network
Layers: Application
Presentation
Session
Transport
Network
Data Link
Physical
Here remember layers numbered from bottom to top so Layer 3 means Network layer in OSI model.
Function of each Layer
Application:- Deals with Network API's(Application programming interface's). It is an interface between your application and Operating Sytem. (Interfaces which communicates with your applications)
Presentation:- Deals with the formatting of the information that going out on the network.
Session:- synchronization / sending and receiving computer in synch with one another.
Transport:- Packet management, Data when it is sent, it is broken into packets and transport layer which manages those packets.
Keeping track of how many they are and did they get their.
Network:- Deals with addressing and routing, addressing with TCP/IP, And routing from one network to another.
Data:- Deals with data frames, frames means ethernet frames, Tocken ring frames etc. What kind of network we are using to package this datas.
Physical:- All about the Hardware, Network cards attached to the cables. an interface between application and OSI model.
Sending Computer Receiving Computer
Application -------------- Application
| ^
| |
> |
Presentation -------------- Presentation
| ^
| |
> |
Session -------------- Session
| ^
| |
> |
Transport -------------- Transport
| ^
| |
> |
Network -------------- Network
| ^
| |
> |
Data -------------- Data
| ^
| |
> |
Physical -------------- Physical
| ^
| |
|__________________________________|
Network Cable
Arrows goes down through on sending side And they go up through the OSI model on the Receiving side. that is important,
When sending some data, on sending side it starts from Application layer to Physical layer, and pick's up network cables and on Receiving end it goes up starting from Physical layer to Application Layer and each layer acknowledges what the corresponding layer on sending side added to the information.
When data goes down from application layer to physical layer while sending some data's will append to front or back ie, header or trailer of the data. and it travels through Network cable and reaches to the Physical layer of the Receiving end and moves up to Application layer and each layer tripping off the data of corresponding layer from the sending side has put on.
Device's in each Layer
Phyical Layer: USB, HUB, Bluetooth, NIC card
Data Link Layer: Switch(do filtering based on computers mac address)
Network: Router, IPV4, IPV6 and ICMP
Rest three layers has no hardwares in it only protocols
Transport: TCP, UDP
Session: PPTP, TLS/SSL
Presentation: MIME
Layer 3 lavel VPN Router:-
Network Layer, bcz layer counting from bottom to top.
TCP/IP Model
Application: it will do the functionality of presentation and session layer of OSI model
Transport:
Internet:
Network Access:
TCP/IP Protocols
Application:- HTTP, FTP, SNMP, DNS, SMTP
Transport:- TCP,UPD
Internet:- IP, ICMP,
Network Access:- Ethernet, Token Ring
TCP, Connection Oriented:- Connection Must be Established before data exchange, It will establish with something called Three-way Handshake
UDP, Connection less:- and un-reliable. Many used for Multi cast addressing ie, One computer is broadcasting and many listeners.
ICMP is used for Diagnostic and error reporting. icmp is used with UDP # ping
Protocol is a set of rules and procedure for communication.
ThreeWay HandShake
1. The client sends a SYN packet to the server indicating
that it wants to set a TCP connection.It also sends ISN (Initial Sequenc Number). Here ISN is x.
2. If the server is 'alive' and listening on the requested
port and can accept an incoming connection, it replies with its own SYN + ACK packet. It sends its own ISN (Initial Sequence Number)(for this connection, y ) and acknowledges the clients request by sending back client's ISN + 1 sequence number (x + 1).
3. Finally, after receiving the server's SYN + ACK response, the client sends back an ACK packet with a sequence number of server's ISN + 1 (y + 1).
In Some Easy Steps:-
Host A sends a TCP SYNchronize packet to Host B
Host B receives A's SYN
Host B sends a SYNchronize-ACKnowledgement
Host A receives B's SYN-ACK
Host A sends ACKnowledge
Host B receives ACK.
TCP socket connection is ESTABLISHED.
No comments:
Post a Comment