Computer Networking - 2

Computer Networking - 2

We addressed some of the fundamentals of computer networking in the previous blog. We will look at new topics in this part.

Structure Of Network

Open System Interconnection Model (OSI Model)

There are 7 layers in OSI Model

1. Application Layer:- Basically in this layer the data is presented in a visual form that the user can understand. Ex:- browsers, emails ...etc.

2. Presentation Layer:- It converts the data of the application layer into machine representable binary format. In this layer, encryption is done.

Encryption is a method of safeguarding digital data by using one or more mathematical procedures, as well as a password or "key" used to decode the data.

3. Session Layer:- In this layer sessions are created which are devoted to a particular activity. The layer provides the mechanism for opening, closing, and managing a session between end-user application processes. Here Authentication and Authorization take place.

4. Transport Layer:- Here the data received from the session layer is divided into small data units called segments. Every segment has the addresses of the source, destination, and sequence number.

5. Network Layer:- The transmission of the received data segments from one computer to another. Routing is done here.

Routing is the process of selecting a path for traffic in a network or between or across multiple networks.

6. DataLink Layer:- It receives the data from the network layer and divides it into manageable units called frames. It then provides the addressing information by adding a header to each frame.

7. Physical Layer:- Hardware stuff like wires, router, cables, wifi ...etc.


This is how OSI Model works.

TCP (Transmission Control Protocol) / IP (Internet Protocol) Model

It is the more used model compared to OSI Model. In this model, we have 5 layers

  1. Application Layer

  2. Transport Layer

  3. Network Layer

  4. DattaLink Layer

  5. Physical Layer

Web Protocols

  • HTTP ( HyperText Transfer Protocol) is the protocol used to transfer data over the web.

  • DHCP (Dynamic Host Control Protocol) is mainly used to assign an IP address to any device.

  • FTP (File Transfer Protocol) refers to a group of rules that govern how computers transfer files from one system to another over the internet.

  • SMTP (Simple Mail Transfer Protocol) is mainly used to send emails.

  • POP3 (Post office Protocol) & IMAC (Internet Message Access Protocol) used to receive emails.

  • SSH (Secure Shell Protocol) enables the communication between two computer devices securely like username/password.

  • VNC (Virtual Network Computing) is a type of remote-control software that makes it possible to control another computer over a network connection.

Now let's deep dive into some of these.


It is a client-server protocol. It tells us how the client requests the data from the server (HTTP Request) and how the server sends back the data to the client (HTTP Response). HTTP uses TCP inside it. TCP makes sure that all the data is received or not. HTTP is a stateless protocol. It is a part of the Application Layer.

HTTP Method it means telling the server what to do. The most commonly used methods are

  1. ** GET-** You are requesting data

  2. PUT- Puts data at a specific location

  3. ** POST-** Client gives some data to the server like web forms

  4. DELETE- Deletes data from the server

When you request the server, do you need to know whether the request is successful or not? To clear this confusion we use STATUS CODE.

** Error / Status Code**

1xx -> Informational

101 Switching Protocols

2xx -> Success

202 Accepted

3xx -> Redirectinig

303 See Other

4xx -> Client Error

404 Not Found

5xx -> Server Error

505 HTTP Version Not Supported


DNS (Domain Name System) We have learned about IP Addresses in the previous blog if you haven't read it please go check it. In brief, we map these IP addresses to domain names. So that if we just type the domain name we can get our desired result because the back domain name is mapped to the IP address.

When we type the HTTP protocol takes the domain name and uses DNS to find the IP Address. This is the reason why DNS is essential.

We all know that there are numerous web URLs in the world, and putting all of them in one database is not a smart idea because if the database has a problem, we will be unable to access any URL in the database. To address these issues, domain names are categorized into classes.

  1. Subdomain

  2. Second-level domain

  3. Top-level domain

Here there are multiple databases for these 3 categories.

The top one is Root DNS Servers, which is the first point of contact when you submit a request. Following that, we have Top-level domains such as .io, .org, .com, and Second-level domains such as,,, and so on.


Transport Layer

So, we have covered the Application layer in HTTP. Now we are going to deep dive into Transport Layer.

A transport layer is a layer that sits on top of devices. Isn't it a little concise? Don't worry, I explain it with a simple example.

Ex:- Assume you live in India and have a family in the US who wants to send you an iPhone. So he goes out and buys a new iPhone and delivers it to your house. Now, the courier firm in the United States sends your box to the Indian branch of its company, which either delivers it to you or arranges for you to pick it up. The transport layer refers to the movement of the package from the owner to the USA courier service branch and from the Indian courier service branch to the receiver. The journey from the United States to India is referred to as the network layer. I believe your confusion has gone.

We can see from the above example that the transport layer's primary function is to transmit data from the application to the network layer and from the network layer to the application layer. TCP and UDP are transport layer protocols.

Because data travels in packets, the transport layer assigns socket port numbers to them so that they can reach their intended destination. In the transport layer, multiplexers and demultiplexers are used.


You submitted the data, but how can you be sure that all of it was sent correctly, or that some data was lost? So, checksums are used to overcome this problem.

Checksums are often calculated using a hash function. If both the transmitted and received checksums are the same, we may conclude that data has been sent correctly and fully.


UDP (User Datagram Protocol)

UDP offers a technique for detecting incorrect data in packets, but it does not attempt to solve other packet-related issues, such as lost or out-of-order data or packets. It is a protocol that does not require a connection.


TCP (Transmission Control Portal)

It is intended to transfer packets across the internet and ensure the error-free delivery of data and messages over networks. TCP is a bi-directional communication protocol that is connection-oriented.

3-way Handshake

A three-way handshake is also known as a TCP handshake or SYN-SYN-ACK and requires both the client and server to exchange SYN (synchronization) and ACK (acknowledgment) packets before actual data communication begins.


Network Layer

From the example of the transport layer, we know what the network layer is. We operate with routers in the network layer, and each router has a network address.


If data is sent, each router will determine if the data packet is for this router or not. If not, it will use the forward table in the routing table to forward the data packet.

Here the routing table is created by the Control plane.

IP (Internet Protocol) is a network layer protocol.

The data link layer is in charge of sending data packets received from the network layer to the physical layer. The data link layer is in charge of dealing with mac addresses. It works on both the router and the physical devices. It turns data into 0's and 1's and sends it to physical devices through protocols.

MAC address is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment.

You've made it to the end and you've learned a lot about computer networking. If you haven't read the previous blog on computer networking, Click Here.

That's all for now. Please like and share if you found this information informative. If you have any questions, please leave them in the comments section and I will do my best to answer them.

Thank you for reading, and I'll see you next time.

Did you find this article valuable?

Support WeMakeDevs by becoming a sponsor. Any amount is appreciated!