What is tcp/ip Protocol -
TCP/IP(Transmission Control Protocol/Internet Protocol) is the basic communication language or the protocol of the internet.It can aslo be used as a communication protocol in a private network.When you are setup with direct access to the internet,your computer is provided with a copy of the tcp ip program just as every other computer that you may send message to or get information from also has a copy of tcp ip.
Working of TCP/IP Protocol -
TCP/IP is a two layer program.The higher layer,Transmission Control Protocol,manages the assembling of a message or file into smaller packets that are transmitted over the internet and received by a TCP layer that reassemble the packets into origial message.The lower layer,Internet protocol(IP),handles the address part of each packets so the it gets to the right destination,Each gateway computer on the network clecks this addesss to see where to forward the message,Even through some packets form the same messgae are routed differently than others,they'll be reassembled at the destination.
TCP/IP use the client/server model of communication in which a computer user requests and is provided a service by another computer(a server) in the network in the network.TCP/IP communication is primarily point-to-point meaning each communication is form one point in the network to another point or host computer.Protocol related to TCP/IP include the User Datagram Protocol(UDP),which is use instead of TCP for special purpose.Other protocols are used by the network host computer for exchanging router information.These include the Internet Control Message Protocol(ICMP).te Interior Gateway Protocol(IGP),the Exterior Gateway Protocol(EGP).
Theory of TCP/IP Protocol -
Communication between computers on a network is done through protocols suits.The most widely used and most widely available protocol suits is tcp/ip protocol suits.A protocol suits consists of a layered architecture where each layer depicts some functionality which can be carried out by a protocol.Each layer usually has more than one protocol option to carry out the responsibility that the layer adheres to TCP/IP is normally considered to be a layer system.The 4 layers are as follows, The network access layer corresponds to a combination of the data link layer and physical layer of the OSI model. Different authors interpret the TCP/IP model differently, where the network access layer is split into two: the link layer and the network access layer. Anyway, they both correspond to the physical layer. This turns the tcp/ip protocol into five layers. The session and presentation layers of the OSI stack are considered to be the application layer of the tcp/ip model.The Internet layer of tcpip corresponds to the network layer of the OSI model. Protocols like IP belong to this layer, and they are responsible for delivering packets from the source to the destination. The transport layer of the TCP/IP model corresponds to the same transport layer of the OSI model. This layer assures that the end-to-end communication is error free.there are following tcp/ip layers-
- Application Layer
- Transport Layer
- Network Layer
- Data link Layer
Application Layer - This is the top of TCP/IP protocol stack.This layer includes application or processes that use transport layer protocols to deliver the data to destination computer.
- HTTP(Hypertext transfer Protocol)
- FTP(File transfer protocol)
- SMTP(Simple mail transfer protocol)
- SNMP(Simple network management protocol)etc.
Transport Layer -
Network Layer -
Data Link Layer -
This layer is also as network interface layer.This layer normally consists of device drivers in the OS and the network interface card attached to the system.Both the device drivers and the network interface card take care of the connectio detials with the media being used to transfer the data over the network.In most of the cases,this media is in the form of cables.Some of the faamous protocols that are used at this layer include ARP(Address resolution protocol),PPP(Point to point protocol)etc.
TCP/IP Concept With Example -
One thing which is worth talking note is that the interaction between two computers over the network through TCP/IP protocol suite takes place in the form of a client server architecture.Client requests for a service while the server processes the request for client.
- As seen in the above figure,the information flows downward through each layer on the host machine.At the time ,since http prototcol is being used,so an HTTP request is formed and sent to the transport layer.
- Here the protocol TCP assigns some more informatio over the data coming form the upper layer so that the communication remains reliable ,a track of sent data and received data could be maintained.
- At the next lower layer,IP adds is own information over the data coming form transport layer.This information would help in packet travelling over the network.Lastly the data link layer makes sure that thhe data link layer can be reliable or unreliable.This information travel on the physical media(like ethernet) and reaches the target machine.
- Now at the target machine(which in our case in the machine at which the websites is hosted)the same series of interactions happen,but in reverse direction.
- The packet is first received at the data link layer the information is read and of the data is passed to the upper layer.
- Similarly at the network layer,the information set by the network layer protocol of host machine is read and rest of the information is passed on the next upper layer.Same happen at the transport layer and finally the HTTPS request sent by the application is received by the target application(Website server).
- At the target machine,when packet at this layer,the TCP at this layer makes notes of the sequence number of the packet and sends an acknowledgement.
- Now,if the host TCP does not receive the acknowledgement within some specified time,it resend the same packet.So this way TCP makes sure that no packets gets lost.So we see tat protocol at every layer reads the information set bt its coterpart to achieve the functionality of the layer it represents.