Skip to main content

Command Palette

Search for a command to run...

Understanding Computer Networking: A Comprehensive Guide

Published
4 min read
Understanding Computer Networking: A Comprehensive Guide
K

I Like to Learn and share new things to you guys! I will update my Tech Stacks over Time

As the world becomes more connected than ever before, the importance of computer networking cannot be overstated. Every time we access the internet or connect to another device, we're utilizing computer networks. However, for many people, the world of computer networking can be confusing and overwhelming.

In this guide, we'll provide a comprehensive overview of computer networking, from the basics of how it works to the different protocols and layers involved.

The Basics: Modem/Router, IP Address, DHCP, TCP, and UDP

At its most basic level, a computer network is a group of devices that are connected to each other to share resources and data. But how do these devices communicate with each other?


That's where the modem/router comes in.

A modem/router is responsible for converting an analog signal to a digital signal that can be transmitted over a network. It also assigns IP addresses to each device that connects to the network using DHCP (Dynamic Host Configuration Protocol).

IP addresses are like the phone book of the internet. They allow devices to find and communicate with each other on the network.

Every device on the internet has its own unique IP address, which is a series of four numbers separated by dots (for example, 1.1.1.1).

When it comes to network protocols, there are two main types:

  • connection-oriented and connectionless.

  • Connection-oriented protocols ensure reliable communication

  • while connectionless protocols prioritize speed over reliability.

  • TCP (Transmission Control Protocol) is an example of a connection-oriented protocol, while UDP (User Datagram Protocol) is a connectionless protocol.


The OSI Model: Understanding the Seven Layers

OSI Image

To better understand how computer networks function, it's helpful to use a model that breaks down the different layers involved in network communication. The OSI (Open Systems Interconnection) Model is a seven-layer model that describes the different functions that occur during network communication.

The seven layers of the OSI Model are:

  1. Application Layer:

    This layer is where software applications like browsers and messaging apps operate. Data is sent from the application layer to the presentation layer.

  2. Presentation Layer: After receiving data from the application layer, the presentation layer converts the data into machine language and encrypts and compresses it. It then sends the data to the session layer using SSL (Secure Sockets Layer) protocol.

  3. Session Layer: This layer helps to set up and manage connections, allowing for the sending and receiving of data, followed by the termination of the connected sessions. Before a session is established, authentication and authorization take place.

  4. Transport Layer: This layer is responsible for transmitting received data segments from one computer to another. It's also where TCP and UDP reside.

  5. Network Layer: This layer is responsible for logical addressing (IP addresses) and routing. It assigns sender and receiver IP addresses to every segment and forms IP packets so that every packet can reach its destination.

  6. Data Link Layer: The data link layer receives IP packets from the network layer and assigns physical addressing (MAC addresses) to the packets in the form of frames.

  7. Physical Layer: This is the hardware section of the network that transforms 0s and 1s into signals that can be transmitted over wires.


HTTP and Email Protocols: A Closer Look

Two of the most common protocols used in computer networking are HTTP (Hypertext Transfer Protocol) and SMTP (Simple Mail Transfer Protocol).

HTTP is a protocol used for communication between web servers and web clients (like browsers)

  • It uses TCP to ensure reliable communication and has four main methods:

  • GET, POST, PUT, and DELETE.

  • HTTP status codes are used to indicate the status of a request or response.

Cookies:

Cookies are also an important part of HTTP. A cookie is a unique string stored on a client's browser that allows the server.

  • Cookies are small pieces of data that websites store on a user's computer or mobile device.

  • They are used to remember user preferences, login information, and another browsing history.

  • Cookies can also be used for tracking user behavior and serving personalized ads.

  • However, cookies can also raise privacy concerns, as they can potentially be used to collect sensitive data.

Email Protocol:

  • Email protocol refers to the set of rules and standards that govern the transmission of email messages between devices and servers over the Internet.

  • There are several email protocols, including Simple Mail Transfer Protocol (SMTP), Internet Message Access Protocol (IMAP), and Post Office Protocol (POP).

  • SMTP is used for sending email messages from the sender's email client to the recipient's mail server.

  • The SMTP server then relays the message to the recipient's email server.

  • IMAP and POP, on the other hand, are used for retrieving email messages from the server to the user's email client.

  • IMAP is preferred for its ability to synchronize emails across multiple devices, while POP is simpler and downloads emails directly to the user's device.

Email protocols also include security measures, such as Secure Sockets Layer (SSL) and Transport Layer Security (TLS), which encrypt the communication between the email client and server to prevent unauthorized access to the messages. Additionally, anti-spam and anti-virus measures are often implemented to filter out unwanted or malicious messages.