Logo

dev-resources.site

for different kinds of informations.

Introduction to Computer Networking: A Beginner's Guide to How the Internet Works

Published at
11/11/2024
Categories
computernetworking
beginners
webdev
interviewprep
Author
vignesh_j
Author
9 person written this
vignesh_j
open
Introduction to Computer Networking: A Beginner's Guide to How the Internet Works

I've recently refreshed my networking knowledge, and I often hear people saying, "I struggled with networking questions in my interview." So, I thought it would be helpful to create a blog series on Computer Networking to simplify these concepts and make it easy to review them right before interviews. This is the first and introductory part of the series, where we’ll cover the basics of networking. Let’s dive right into it!

Table of Contents

  1. What is a Network?
  2. The Internet
  3. How Did It Start?
  4. Protocols
  5. World Wide Web (WWW)
  6. IP Address
  7. Port Numbers
  8. Internet Speed

What is a Network?

In simple terms, it's just computers connected together.

Network

The Internet

The internet is essentially a collection of these computer networks.

How Did It Start?

The Advanced Research Projects Agency (ARPA) initially set up networks across four locations:

  • MIT
  • Stanford
  • UCLA
  • Utah

To enable communication between these locations, they developed ARPAnet, which used the TCP/IP protocol (we’ll discuss this in more detail later).

Protocols

Protocols are the rules established by the Internet Society on how data is sent. Examples include TCP, IP, and UDP.

World Wide Web (WWW)

The World Wide Web, commonly called the web, is an information system where documents and other resources are identified by URLs. These resources can be interlinked via hyperlinks and accessed over the internet.This is the first ever website.

IP Address

Every device on the internet that can communicate with others has an IP address.

Format of an IP Address

An IP address is typically in the format:
X.X.X.X

Each "X" can range from 0 to 255.

To check the IP address of your computer, use these commands:

  • Windows: ipconfig
  • Mac and Linux: ifconfig

You’ll come across different types of IP addresses: global and local.

  • Global IP Address: This is the IP address assigned by your Internet Service Provider (ISP) and is the same for all devices connected to that network.
  • Local IP Address: This is the unique identifier for your device within your ISP’s network.

IP addresses are assigned using Dynamic Host Configuration Protocol (DHCP).

If you’re connected to the internet through a modem, that modem assigns IP addresses to all connected devices using DHCP.

When you request data from the internet, that request goes first to your ISP, then to your modem, which uses Network Address Translation (NAT) to decide which device made the request.

Port Numbers

Now, you might wonder: even with IP addresses, how do we know which application requested the data? This is where port numbers come in.

Each port number corresponds to a specific application, allowing data to reach the correct app. For example, all HTTP requests happen on port 80.

Ports are 16-bit numbers and are divided into three ranges:

  • Well-Known Ports: 0–1023
  • Registered Ports: 1024–49151
  • Dynamic or Private Ports: 49152–65535

The well-known ports are system-assigned, registered ports are for specific applications, and dynamic ports are for private use. You can check a detailed list of ports here.

Internet Speed

Let’s talk about speed—not the streamer, but internet speed! A common misconception is that Mbps stands for megabytes per second, but it actually means megabits per second (the same applies to Kbps and Gbps).

  • 1 Mbps = 1,000,000 bits per second

It’s a high speed, though people often underestimate it. Wondering how data transfers at such speeds? The internet doesn’t travel through air or clouds; it moves through wires and cables across oceans and land. Check out how these cables are laid at submarinecable.com.


Feel free to connect with me and check out my other work:

LinkedIn: Vignesh J
GitHub (Personal): Vignesh025
GitHub Organization (VigneshDevHub): VigneshDevHub
Join our Open-Source Community on Discord: VigneshDevHub

interviewprep Article's
30 articles in total
Favicon
Leetcode Blind 75
Favicon
Comprehensive Guide to the OSI Model, TCP/IP Model, and Application Layer
Favicon
Networking Devices Explained: A Beginner's Guide to Routers, Switches, Hubs, and More
Favicon
Exploring Network Types and Topologies
Favicon
Introduction to Computer Networking: A Beginner's Guide to How the Internet Works
Favicon
🚀 Journey to Senior Developer 🚀
Favicon
How to Determine if an Integer is a Palindrome on LeetCode
Favicon
Diving Deep into DSA on My Journey to L5-L6! 🚀
Favicon
How to validate a Sudoku board
Favicon
How to Find First and Last Position of Element in Sorted Array
Favicon
Using Emails and Socials to get job referrals
Favicon
How did you know?
Favicon
What happens when you type a URL into your browser?
Favicon
Intro to Software Engineering Interview Prep and System Design: Tips and Resources for Success
Favicon
System Design and Interview Platform
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 6: Computer Science Fundamentals
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 5: Behavior Round
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 4: Prepare For System Design Interview
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 3: Prepare For Coding Interview
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 2: Apply For Jobs and Manage Your Applications
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 1: Get Your Resume Ready
Favicon
Everything you need to know about Interview Kickstart: Is it worth the cost?
Favicon
Depth-First Search of a Binary Tree
Favicon
Leetcode pair programming
Favicon
Interview Kickstart Review by Marvin Gersho (Cracked Amazon’s Solutions Architect Interview)
Favicon
Weekly Coding Questions W-1
Favicon
How Much Should You Talk During an Interview?
Favicon
The complete guide to the System Design Interview in 2022
Favicon
24 microservices interview questions and answers to land that job
Favicon
Introduction to Data Structures

Featured ones: