TCP/IP | Backend 101
Internet protocol suite1
The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria.
The foundational protocols in the suite are
In the development of this networking model, early versions of it were known as the Department of Defense (DoD) model because the research and development were funded by the United States Department of Defense through DARPA.
This functionality is organized into four abstraction layers, which classify all related protocols according to each protocol’s scope of networking. An implementation of the layers for a particular application forms a protocol stack. From lowest to highest, the layers are
- link layer, containing communication methods for data that remains within a single network segment (link)
- internet layer, providing internetworking between independent networks
- transport layer, handling host-to-host communication
- application layer, providing process-to-process data exchange for applications
How They Work
- Pysical -> Data Link
- 0/1 Data to Frame (Ethernet Protocol)
Header: Mac Address IP-Packet: Data Trailer: Error Checking Data
- Mac Address: A3:12:56:B5:95:7F
- IP Address:
- In the world of Internet protocol traffic, consumers can choose between a TCP or UDP setup for their business or personal use. When it comes to TCP vs UDP features and functions, each brings its own set of advantages and challenges.
- What is TCP?
- Transmission Control Protocol (TCP) is connection-oriented.
- Once a connection has been established, data can be transmitted in two directions.
- TCP has built-in systems to check for errors and to guarantee data will be delivered in the order it was sent, making it the perfect protocol for transferring information like still images, data files, and web pages.
- But while TCP is instinctively reliable, its feedback mechanisms also result in a larger overhead, translating to greater use of the available bandwidth on your network.
Sender TCP ---Connection Request---> Receiver TCP
Sender TCP <----------ACK---------- Receiver TCP
Sender TCP ----------ACK----------> Receiver TCP
# Three-way Handshake
- What is UDP?
- User Datagram Protocol (UDP) is a simpler, connectionless Internet protocol wherein error-checking and recovery services are not required. With UDP, there is no overhead for opening a connection, maintaining a connection, or terminating a connection.
- Data is continuously sent to the recipient, whether or not they receive it.
- Although UDP isn’t ideal for sending an email, viewing a webpage, or downloading a file, it is largely preferred for real-time communications like broadcast or multitask network transmission.
- What is the Difference Between TCP and UDP?
- TCP is a connection-oriented protocol, whereas UDP is a connectionless protocol.
- A key difference between TCP and UDP is speed, as TCP is comparatively slower than UDP. Overall, UDP is a much faster, simpler, and efficient protocol, however, retransmission of lost data packets is only possible with TCP.
- Another notable discrepancy with TCP vs UDP is that TCP provides an ordered delivery of data from user to server (and vice versa), whereas UDP is not dedicated to end-to-end communications, nor does it check the readiness of the receiver (requiring fewer overheads and taking up less space).
- The application layer is the highest abstraction layer of the TCP/IP model that provides the interfaces and protocols needed by the users. It combines the functionalities of the session layer, the presentation layer and the application layer of the OSI model.
- The functions of the application layer are −
- It facilitates the user to use the services of the network.
- It is used to develop network-based applications.
- It provides user services like user login, naming network devices, formatting messages, and e-mails, transfer of files etc.
- It is also concerned with error handling and recovery of the message as a whole.
- This layer uses a number of protocols, the main among which are as follows −
- Hyper Text Transfer Protocol, HTTP − It is the underlying protocol for world wide web. It defines how hypermedia messages are formatted and transmitted.
- File Transfer Protocol, FTP − It is a client-server based protocol for transfer of files between client and server over the network.
- Simple Mail Transfer Protocol, SMTP − It lays down the rules and semantics for sending and receiving electronic mails (e-mails).
- Domain Name System, DNS − It is a naming system for devices in networks. It provides services for translating domain names to IP addresses.
- TELNET − It provides bi-directional text-oriented services for remote login to the hosts over the network.
- Simple Network Management Protocol, SNMP − It is for managing, monitoring the network and for organizing information about the networked devices.