Both OSI and TCP/IP are models which specifies how data is processed and flows from one node to another.
TCP/ IP model: **** A four layered model, each layer processes the data and passes on to the next one.
# | Name | Protocol/ App |
---|---|---|
4 | Application | HTTP, SMTP |
3 | Transport | TCP/UDP |
2 | Internet | MAC |
1 | Link | RJ45 |
OSI Model: A seven layered model, each layer processes the data and passes on to the next one.
# | Name | Protocol/ App |
---|---|---|
7 | Application | HTTP, SMTP |
6 | Presentation | TLS |
5 | Session | SOCKS |
4 | Transport | TCP/ UDP |
3 | Network | IP routing |
2 | Data Link | MAC address |
1 | Physical | RJ45 etc. |
TCP (Transfer Control Protocol) | UDP (User Datagram Protocol) |
---|---|
Reliable, acknowledgement is sent | Unreliable, no acknowledgement is sent |
Re-transmission of packets in case | Re-transmission isn't available |
Slow | Fast |
Sequential | Non Sequential |
Alice | Bob | |
---|---|---|
SYN | → | |
← | Syn, ACK | |
ACK | → |
The handshake is followed by the communication which ends with FIN message.