TCP/IP Explained

tcp ip

TCP/IP protocol represents two protocols embedded to TCP /IP stack which are used for data streaming: Transmission Control Protocol (TCP) and Internet Protocol (IP). TCP/IP is the most common protocol used for providing communication between two network devices.

osi vs tcp/ip

OSI Model has 7 layers while TCP/IP has 4 layers which are application, transport, internet and network interface. Application layer refers to “Application + Presentation + Session” , Transport refers to “Transport” , Internet refers to “Network” and network interface refers to ” Data Link + Physical” layers of OSI Model. According to TCP/IP Model, data is packed and sent according to the diagram above, receiver gets the data and controls it if it has any errors or not. You can check if the protocol is installed on your network device or not via “ping 127.0.0.1” command.

LAYER – 1 : Network Interface

This layer defines the structure of the data on the cable and provides monitoring 1s and 0s physically.  Ethernet is the most common local area network technology which is used for monitoring the physical view of the data at the network interface layer. ethernet has three sub-layers : LLC (Logic Link Control Layer), MAC (Media Access Control) and Pyhsical. LLC sub-layer determines the protocol of the frame and passes it through MAC. LLC and MAC adds their own headers to data and they create a complete frame structure. Physical sub-layer converts this frame to electrical signal or wireless signal.

LAYER – 2 : Internet

This layer is the place where source and target IP addresses added to data and data is converted to a “datagram” which has a maximum size of 65,535 bytes. IP, ICMP, IGMP and ARP protocols work on the internet layer.

LAYER – 3 : Transport

Transport layer defines how the data is transported.TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) protocols work on this layer. These protocols add control headers to the data. TCP is the protocol to send the data without loss. A special TCP Acknowledge packet is sent for the data and received packets are checked for errors. Sender sends the packet again and again until acknowledge of the receiver comes. So that no packet loss occurs. Three-Way Handshake connection is established between network devices if TCP is used between two network devices. Data stream on HTTP, HTTPS, POP3, SMTP, FTP, SFTP protocols are made via TCP. Protocols like TFTP and SNMP use UDP to transport the data and data stream control and repeated sends are not made for these protocols. Because it is not important if the data is transported without an error or not. For example a voice call uses UDP too. UDP consumes less bandwith according to TCP.

LAYER – 4 : Application

Different types of protocols work on application layer according to file type and the software which tries to send data. Communication between softwares and transport protocols is provided on this layer using ports. Ports are numbered standard applications. For example HTTP protocol uses port 80.

Leave a Reply

Your email address will not be published. Required fields are marked *