"Demystifying Computer Networks: A Beginner's Guide"

"Demystifying Computer Networks: A Beginner's Guide"

An Entertaining Journey through Client-Server Architecture, IP Addresses, Protocols, and More!"

Β·

8 min read

The Internet is like a giant family reunion, except the relatives are devices and they multiply at a rate that even rabbits πŸ‡ can't keep up with. The word "Internet" itself means an interconnection of networks. It is an extensive network having a bunch of devices connected to each other.

It's like a never-ending party where we can order breakfast, book movie tickets, and listen to songs, all without leaving our couches. But seriously, have you ever thought about how this magical connection works? How does typing a question into Google lead to finding the perfect recipe for Dalgona coffee β˜•? Let's dive into the mysteries of the Internet and networks, one laugh at a time 🀣

Client-server architecture

When it comes to the Internet, we humble users become mere clients, with the website servers acting as all-powerful deities, graciously gifting us with the information we desire. These divine machines are capable of endless requests without showing any signs of exhaustion. What's even more impressive is that this celestial knowledge can come in various forms, from words to images to even video! All hail the mighty server, for it is only through its divine connection that we mortals are able to communicate with the vastness of the Internet.

The journey begins...πŸ”°

Picture this: you're sitting at home, sipping on a cup of coffee, and contemplating sending a simple request from your device to a server. Little do you know, this innocent act sets off a wild adventure through the convoluted world of computer networks. It's like navigating a maze filled with quirky characters like routers, Network Address Translation, the master of disguise, Internet Service Providers, the gatekeepers of the digital realm, and a host of protocols. Oh, and who can forget the Domain Name Systems? It's a wild, crazy, and sometimes confusing journey, but hey, at least it keeps things interesting in the world of computer networks!

Understanding IP addresses

Every device connected to the Internet requires a unique identity. This identity is called an IP address. This address has a specific format. For IPv4, the address consists of 4 sets of numbers separated by 3 dots. Each set of numbers is called an octet. Whenever a device is connected to the router, the router hands out an IP address to that device. There can be 232 such IP addresses.

The use of DHCP

When a device is connected to a router, the Dynamic Host Configuration Protocol automatically assigns IP addresses to devices on the network. DHCP servers store a pool of IP addresses and provide them to DHCP clients when they are connected to the router. This eliminates the need for manual configuration and reduces network administration.

The scarcity of IP addresses?

Yes, you read that right. Even with such a huge number of addresses, we ran out of IP addresses. The mammoth number of 232 was surpassed and there we no more unique IP addresses. 😱

Network Address Translation πŸ˜‡

To overcome this problem, NAT or Network Address Translation came to the rescue. NAT assigns a private IP address to each device connected to a router, which can be the same for millions of devices. The ISP provides a single public IP address for all the devices.

When a device wants to connect outside the network, the router converts the private IP address to a public one. This means that devices connected to the same router share the same public IP address

Port Numbers

Router uses port numbers to send the response from the Google server to the correct device. Port numbers uniquely identify applications running on the device and work together with IP addresses to specify a specific application or service on the network.

Use of IPv6 addresses

With the depletion of traditional IPv4 addresses, IPv6 emerged as a solution. IPv6 addresses are 128-bit alphanumeric numbers, offering a massive 340 trillion trillion trillion unique IP addresses. Every cellphone worldwide has a unique IPv6 address, managing its identity when accessing the internet directly via mobile data.

Domain Name System

It turns out that people aren't very good at remembering long strings of numbers, like IP addresses. It's just not practical to remember the addresses of all the websites we visit every day. That's why we have something called the Domain Name System, or DNS for short (it's like a technological wizard Harry Potter! star). DNS helps us translate ordinary words into numbers, so we can easily find our way to our favorite sites. It's like having a personal GPS for the Internet!

In a nutshell

Our journey started with a device sending a request to Google's server via a router and DNS resolving the website name. The request was sent from a private IP address, converted to a public IP by the router, and forwarded to the ISP. The ISP transmitted the request to Google's server, and the router directed the response to the correct device using port numbers. Finally, the device received the response on the designated port number, completing our internet journey.

Components of network...

In the world of computer networks, we have models that act like fancy translators, helping different computers from various manufacturers talk to each other. These models have layers and they simplify network design and boost performance, making everyone happy.

There are 2 models in computer networks.

  • Open Systems Interconnection (OSI)

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

The TCP/IP model is the cool kid on the block, commonly used in real-life situations. It's practical and gets the job done. On the other hand, we have the OSI model, the brainiac of the bunch. Network engineers love it for its detailed network modeling, like creating intricate blueprints for their virtual worlds.

The TCP/IP Model

The TCP/IP model or stack is incorporated in every computer and widely used. It is a set of rules that help the seamless connection of devices. It consists of 5 layers with each layer assigned a specific work and using specific devices.

  1. Physical Layer:

    Transmits data over a physical medium, such as a cable or a wireless signal.

  2. Data Link Layer:

    Provides error detection/correction for data sent over the physical layer.

  3. Network Layer:

    Routes data between different networks.

  4. Transport Layer

    Provides a reliable connection between two applications.

  5. Application Layer

    Provides services to the user, such as file sharing, printing, and email.

The OSI Model

The 1st four layers i.e. Physical Layer, Data Link Layer, Network Layer, and Transport Layer are the same. However, the Application Layer is further divided into 2 layers.

  1. Physical Layer

  2. Data Link Layer

  3. Network Layer

  4. Transport Layer

  5. Session Layer

  6. Presentation Layer

  7. Application Layer

The Session Layer is responsible for managing communication between two hosts. The Presentation Layer is responsible for formatting data so that it can be understood by the receiving host.

Network Protocols

A network protocol is a set of rules that govern how devices communicate with each other on a network. Protocols are necessary for devices to understand each other and to ensure that data is transmitted accurately and reliably.

The most commonly used protocols are:

  1. Transmission Control Protocol (TCP)

  2. User Datagram Protocol (UDP)

  3. HyperText Transfer Protocol (HTTP)

Transmission Control Protocol

TCP is a connection-oriented protocol that ensures reliable and ordered delivery of data between applications on hosts connected through an IP network. It is widely used by major internet applications like the World Wide Web, email, and file transfer.

It takes your data and breaks it into little segments, puts addresses on them, and sends them on a journey through the network. At the receiving end, it puts everything back together again. TCP even knows when to slow down and not bombard your inbox with too much information. However, it's not the fastest worker around, so be patient. Just like a good worker, TCP also establishes a connection before starting the job to ensure a smooth delivery.

User Datagram Protocol

User Datagram Protocol (UDP) is a connectionless protocol that provides best-effort delivery of datagrams between applications running on hosts communicating via an IP network.

UDP is like a daredevil of the internet world, it's fast and reckless! It delivers datagrams without any flow control or error checking because it's too cool for those. But beware, this thrill-seeking protocol is unreliable, so expect a few data losses and errors along the way. It's like a wild horse you can't control. But hey, it's the go-to for streaming video and audio, so it must be doing something right!

Hypertext Transfer Protocol

Hypertext Transfer Protocol (HTTP) is like a traffic cop for websites, directing users to the right webpage. It's the foundation for all communication on the World Wide Web.

Even better, HTTP is a stateless protocol, which means it has no memory - it's like a goldfish 🐑 with a three-second memory. This makes HTTP super efficient and helps us avoid any awkward moments of realizing we forgot to wash our hands in between requests. Plus, HTTP is a simple protocol that even your grandma can understand, making it the go-to for web communication.

Conclusion πŸŽ‰

The Internet is like a never-ending party, connecting devices in a vast network of communication. From DNS translating words into numbers to the client-server relationship, it's a wild adventure navigating routers, ISPs, and protocols. The scarcity of IPv4 addresses led to the magic of NAT, while port numbers ensure the right response reaches the correct device. IPv6 brought a massive address pool, and the OSI and TCP/IP models simplified network design. TCP and UDP protocols handle data delivery, while HTTP directs us through the web. In this magical world, the Internet keeps us connected, entertained, and a little bit amazed.

That's all for this one and I hope you found it funny and useful. Feel free to leave a comment and don't forget to like if it tickled your funnybone. Thank you so much for this one and I'll see you in the next blog! πŸ‘‹

Β