Demystifying Computer Networking

·

11 min read

Demystifying Computer Networking

Hey there, welcome to my 2nd blog, in this one we gonna discuss the head and body of computer networking and expose everything hidden in the wild!

Now, stop and think for a moment - how often do you check your phone, send a message, or play a game? It all seems so easy, but have you ever stopped to wonder how all those devices and websites are connected? The answer lies in computer networking - it's like the bridge that holds everything together. Imagine a superhighway that connects billions of devices around the world, allowing them to communicate and share information, no matter where they are located. Computer networking makes it all possible, whether you're creating content, video chatting with your friends, or gaming with your friends in a gaming room. So with a little interest being peaked, let's dive in!

Client-Server Architecture

The client-server architecture is the most fundamental abstraction of the concept of the Internet, which is like the largest network. So there are broadly 2 things, a client and a server. Every interaction that you make within the internet can be broken down into the client-server model. A client is like a customer, placing an order with the server. The server is like the chef in the kitchen, fulfilling orders and sending them back to the customer. The internet acts like a waiter through which the client's request propagates to the server, and then the server sends a response back to the client.

What is server – BytesofGigabytes

Well, that seems cool. But, what about this intermediate called the "Internet"? How does it work? What "magic" does it do to enable the above? Well, that's what we'll be getting into in our next sections.

The Internet

Internet World Wallpapers - Top Free Internet World Backgrounds -  WallpaperAccess

The Internet is a globally vast and complex network of networks, connecting billions of computers around the world. It's like a giant spider web, with each strand representing a different connection between two devices. And just like a spider web, the Internet is constantly evolving and changing as new computers and connections are added every day.

But what does the Internet look like? Well, it's actually made up of many different types of networks, each with their own unique characteristics. There are local area networks (LANs), wide area networks (WANs), metropolitan area networks (MANs), and many more. It's like a bustling city with different neighborhoods, each with its own vibe and culture.

How it works

When you type a web address into your browser, your device(client) sends a request to a server asking for the website's data. A server is a machine that just store information and pass it on when requested by a client. But how does the data make its way from the server to your device? That's where the internet comes in. The Internet is a vast network of computers, servers, routers, and switches that work together to transmit data. The data is broken down into smaller packets and sent through the network, traveling across different routers and switches until it reaches its destination.

Each device on the internet has a unique IP address, which is a unique identifier of that device. In addition to IP addresses, the Internet uses a variety of protocols, which are a set of rules to ensure that data is transmitted reliably and efficiently, in order. One of the most important protocols is TCP (Transmission Control Protocol), which breaks data into packets and reassembles them in the correct order on the receiving end. Another important protocol is HTTP (Hypertext Transfer Protocol), which is used for transmitting web pages and other content over the internet.

To get the IP of the server from which the response shall be received, we have the concept of DNS(Domain Name System). DNS acts like a phonebook for the internet, translating human-readable domain names (like google.com) into machine-readable IP addresses (like 142.250.194.238). Your device sends a DNS query to a DNS server, which returns the IP address of the server hosting the website you requested.

Internet service providers (ISPs) provide access to the Internet for consumers and businesses. ISPs use various technologies to connect users to the internet, such as cable, DSL, or fiber.

To send and receive data, devices use specific ports that are like doors on a house. Different types of data use different ports, like email using port 25 or web browsing using port 80. When you enter a website's address into your browser, your device sends a request to the server's IP address on the appropriate port.

Internet Connectivity

Now let's dive into the nuances of everything mentioned above, and how they sort of interconnect.

Types of Networks

  1. Local Area Networks (LANs): Think of LANs as the neighborhood block party. They connect devices that are physically close to each other, like computers in an office or a group of gaming consoles in a living room.

  2. Metropolitan Area Networks (MANs): MANs are like the city transportation system. They connect devices that are within a specific geographic area, like a college campus or a city block.

  3. Wide Area Networks (WANs): WANs are like the long-distance relationships of the networking world. They connect devices that are far away from each other, like a company's headquarters in one city and its branch offices in another. The internet itself is a type of WAN!

ISPs

ISPs, or Internet Service Providers, are the companies that provide you with access to the internet. They are like the gatekeepers of the internet, providing the pathway for you to connect to all the websites, apps, and online services you use on a daily basis.

Just like how you pay for electricity or water to be delivered to your home, you pay your ISP for internet service. ISPs offer a range of plans with different speeds and data limits to fit your needs.

But how do ISPs actually connect you to the internet? They do this through their own network infrastructure, which includes things like cables, routers, and servers. These networks connect to the larger internet backbone, which allows you to access websites and services from all around the world.

Protocols

Internet Protocols are a set of rules and standards that govern communication on the Internet. They ensure that devices can communicate and share data with each other, regardless of their location or type.

Some of the most commonly used internet protocols include:

  1. Transmission Control Protocol (TCP): This protocol breaks data into packets, ensures that they are sent in order, and retransmits any lost packets to ensure the reliable delivery of data. It first establishes a connection between 2 endpoints, then exchanges data without any loss of data packets.

  2. User Datagram Protocol(UDP): This protocol is similar to TCP but does not guarantee the reliable delivery of data(some data packets might be lost). It is often used for applications that require speed and efficiency over reliability, such as online gaming and making video calls. It's like a postcard which doesn't guarantee that the message will be received, nor does it require a recipient to acknowledge receipt.

  3. Dynamic Host Control Protocol(DHCP): It is like a personal assistant that assigns IP addresses to computers on a network, ensuring that everyone gets a seat at the table and can join in on the conversation.

  4. Hypertext Transfer Protocol(HTTP): It's an application layer protocol that establishes HOW data is requested and sent back to the client. It uses TCP under the hood. It is a stateless protocol, meaning that the server does not keep any data (state) between two requests, and each request is treated as a new request.

  5. Hypertext Transfer Protocol Secure(HTTPS): It is a secure version of HTTP that encrypts data transmitted between the web server and the browser to prevent any unauthorized capture of data packets or other attacks.

Some other protocols include :

  • SMTP(Simple Mail Transfer Protocol)

  • POP3(Post Office Protocol)

  • IMAP(Internet Message Access Protocol)

  • SSH(Secure Shell)

  • VNC(Virtual Network Computing)

  • FTP(File Transfer Protocol)

DNS

DNS is like the phone book of the internet. Just like how you use a phone book to look up someone's phone number by their name, your computer uses DNS to look up the IP address of a website by its domain name. The IP address is a unique set of numbers that identifies the location of the website's server on the internet.

When you enter a website address into your browser, your computer sends a request to a DNS resolver, which is like a middleman between your computer and the DNS system. The resolver then sends a request to the DNS server, asking for the IP address of the website you're trying to access.

The DNS server then checks its database to see if it has the IP address of the website. If it does, it sends the IP address back to the resolver, which then sends it back to your computer. If the DNS server doesn't have the IP address, it sends a request to another DNS server, which may send it to yet another DNS server, until the IP address is found and sent back to your computer.

The entire process happens in a matter of milliseconds, allowing you to access websites quickly and easily.

IPs and Ports

When your device wants to send or receive data over the internet, it needs to identify the other device it wants to communicate with. This is done through the use of IP addresses and port numbers.

An IP address is a unique numerical identifier assigned to every device(client/server) connected to the internet. It's like a phone number that allows devices to send and receive data to each other. IP addresses can be either IPv4 (32-bit) or IPv6 (128-bit) and are represented as a series of numbers separated by dots or colons, respectively. There are a total of 2^32(approximately 4.3 billion) unique IPV4 addresses. However, due to the explosive growth of the internet and the increasing number of devices connected to it, IPv4 addresses have become scarce. IPv6 was developed as a solution to this problem. IPv6 uses 128-bit addresses, which allows for 2^48(approximately 3.4 x 10^38) unique addresses - enough to support the growth of the internet for the foreseeable future.

Once your device has identified the IP address it wants to communicate with, it also needs to identify the specific process or service on that device it wants to send data to or receive data from. This is where port numbers come in. A Port is like a specific endpoint on that IP, while a port number is a 16-bit number used to identify the specific port on that IP to establish connection with. It's like a room number in a hotel that allows people to find a particular room where someone is staying.

HTTP Methods and Status Codes

An HTTP Method tells the server what should be the required action for a particular type of request. Types of HTTP Methods :

  1. GET: This method is used to retrieve information from the server. When a web browser requests a page, it uses the GET method to retrieve the HTML code and any associated images or resources.

  2. POST: This method is used to send data to the server to be processed. For example, when you submit a form on a website, the data is sent to the server using the POST method.

  3. PUT: This method is used to update an existing resource on the server. For example, if you edit a blog post, the changes are sent to the server using the PUT method.

  4. DELETE: This method is used to delete a resource from the server. For example, if you delete a post on a social media platform, the request is sent to the server using the DELETE method.

  5. HEAD: This method is similar to the GET method, but it only retrieves the headers of the response, not the actual data. It can be used to check if a resource exists without actually downloading it.

When a client sends a HTTP Request to the Server, the HTTP response status codes indicate whether a particular type of request has been successfully completed.

1XX - Informational Response

2XX - Successful Response

3XX - Redirection Response

4XX - Client error

5XX - Server error

The World Wide Web(WWW)

The World Wide Web is like a vast digital library where you can access information, media, and resources from all over the world with just a few clicks. It's like a giant amusement park, with websites as the rides and hyperlinks as the paths that connect them all together. You can hop on a ride and enjoy the content, then follow a path to another ride that catches your eye.

And just like an amusement park, the Web is constantly growing and evolving, with new websites and content being added all the time. So jump on in and start exploring - there's always something new and exciting to discover on the Web!

Conclusion

In conclusion, computer networking is a vast and fascinating field that enables communication and data exchange between devices across the world. From the client-server architecture to the World Wide Web, every aspect of networking plays a crucial role in how we access and utilize information on the internet.

The internet's complex network infrastructure, various protocols, IP addresses, and port numbers are all essential components of networking that work together seamlessly to make our online experience possible. And with the advent of emerging technologies like 5G and the Internet of Things (IoT), the possibilities of what we can achieve through networking are endless.