What is TCP/IP and how does it work

Jun 16, 19

TCP/IP short for Transmission Control Protocol/Internet Protocol, is a suite of two protocols in one, mainly TCP and IP. It is used to interconnect network devices with each other on the internet. 

The TCP part performs the handshake or connection between the network devices that will establish a socket. This socket will remain open during the duration of the communication. After this, the source will convert the data into packets and send it to the source destination of the TCP. 

The TCP will perform an acknowledgment for the successful delivery of the packets. This will make sure that if a packet should fallout on the way, that the TCP component will resend this packet. On the other side is the IP layer, which is responsible for sending and receiving the data to the correct destination. Coming from data being analyzed the TCP/IP stack is comprised of the following layers.

1. The Application Layer

This top layer is responsible for the TCP/IP protocol suite and is the application that is also responsible for entertaining the requests that will be initiated at the application level. This layer uses different types of protocols in order to complete the requests for different programs. Some of the protocols that are used by the application layer include Hyper Text Transfer Protocol (HTTP), the File Transfer Protocol(FTP) and the Simple Mail Transfer Protocol (SMTP). When a request is sent out in order to access a web server from a browser, the HTTP protocol is called first in order to complete the request. 

This is very similar to when someone wants to upload (or download) a file through a program, that the application layer is using to port and pass on the data into the transport layer. These ports have logical addresses and interfaces that connect to computers and internal or external devices. The use of these ports makes it easier for the transport layers to understand the type of data that is being transmitted. 

An example of this is data that is being sent over a port 25, which means that the data is about the email request. Data that is sent over the ports 21 and port 22 means that it is FTP data based.   

2. The Transport Layer 

This part of the application layer sends data back to the lower layer of the protocol, which is called the transport layer. The transport layer converts the data into data packets and sends this back to the destination devices. The transport layer uses Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) as well. The TCP is used for reliable communication and the UDP is used when reliability is less important.

When this transport layer is received with data from the application layer, it is transformed into the data packets. The TCP and UDP then adds a header to the data packets. These TCP layers contain different fields like source and destination port information, that includes the packets sequence number, acknowledgment information together with checksum values. 

Each field will play its role in the data packets and can be exchanged when needed. An example of this would be the checksum field that is used to check if any packet during the data exchange process has been tampered with. These sequence numbers tell the TCP at the destination about the order of the packets. These include the TCP at the receiving end together with a combined packet in the successful delivery of the packets. 

If the sender does not receive an acknowledgment by the receiver in a specified period of time or window, this is then resent back to the packets. The whole packet at the receiving end is arranged into the correct order, while the headers are removed from the packets before reassembling them into a complete message.   

3. Network Layer    

All data packets from the transport layer will travel down to the network layer. Different protocols that are operating at the network layer level will include the Internet Protocol(IP), Internet Control Message Protocol (ICMP), along with the Address Resolution Protocol (ARP). This is different at the network level layer, which is a header called the IP header and is added to the data packet. 

This IP header contains the source and destination IP address as well, which is then sent out via a router. The Router contains a table with IP addresses of different hosts including the gateway devices, which can also be other routers. These routers check if the destination of the IP address matches with the IP address that is saved in the table. 

If this router fails to locate the destination IP address, it is then sent to the data packets in order to locate another device. This process will continue until the packets reach its destination.    

4.Data Link Layer

This part of the TCP/IP is subdivided into three different layers, this is namely, the Logic, Link Control, Mac Layer, and Physical Layer. The Logic Link Control (LLC) has the information about the protocol that is used by the delivery of the data packet in order to correspond to the protocol at the destination MAC address and to the data frames. 

The Physical layer is then converted to data frames into a format that can be transmitted over the network. An example would be that the physical layer can convert the data frames into electrical signals if the path is wired. The data frames may also be converted into electromagnetic waves for a wireless communication medium. These aforementioned layers work conversely at the receiving end. While the electric signals or electromagnetic waves are converted back into data frames. After this, all headers are removed from the packets and is finally reassemble into complete data. 

The internet has managed to bring us unstoppable technologies like Bitcoin, with its decentralized nature to the financial system and will continue to develop over the years. There is a lot be learned in this space with innovation happening on the edge everyday around the globe.

Cryptocurrency and blockchain technology Researchers with a strong focus on the development of applications for wide-spread adoption.

Upvotes (0)
No one upvoted yet. You can be the first one!

Comments (0)
sort by  /