--- title: 1. Networking Fundamentals collection: computer networks author: Akash Kadlag updated: 2026-09-17 source: https://docs.chaicode.com/networking/networking-fundamentals --- # 1. Networking Fundamentals ![Networking Fundamentals](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/e70b3a84e6e6b7ffa94d64b48a71c01fcee20eb74047913aff26ed724e17b40e.png) Networking Fundamentals — Chap 1 The "why" before the "how." ![History of Computer Networks](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/9cb679a37def6eed310881016524ab0f49032662cbb0e7cb83caa012ca462747.png) History of Computer Networks — In 1960s. The Cold War is at its peak. The US military has a very real problem. If the Soviet Union destroys one communication centre, the entire US military communication system goes down. This problem gave birth to the internet. In 1969, the US Department of Defense funded a project called ARPANET - Advanced Research Projects Agency Network. The goal was simple but radical for its time - build a network where if one node goes down, the data finds another route and still gets through. ![History of Computer Networks](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/8e0fa79522cd51250e5a1285d1ccc6e1b0d0e53119537352e63d4b9a0c497738.png) History of Computer Networks — On October 29th, 1969 - the first ever message was sent over ARPANET between two computers at UCLA and Stanford. The message was supposed to be "LOGIN." The system crashed after two letters. So the first message ever sent over what became the internet was - "LO." 1970s and 80s, ARPANET expanded - but it was still limited to military and research institutions. Universities started connecting. Scientists started sharing data. The network grew. In 1983, ARPANET adopted a new communication standard called TCP/IP. This is the moment the internet got its universal language. Any computer, anywhere, could now connect and communicate. ![An illustration showing a path connecting two computers with a digital folder traveling between them to demonstrate file sharing across a network.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/aa22f32c624909877bef6f8b8e0c36b30cd4a07b7643faae6a59df59e3d5624a.png) Basic Terminologies — A computer network is a digital communications medium which allows nodes to share resources. Host is any device which gets an IP Address. E.g. PC / Laptop / Server / Mobile. Sharing Data and Resources in a network is known as Networking. Internet is a network of networks. ![Illustrations depicting different locations with networks: a living room representing home, an office desk, a university building, and smartphones.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/fdceead33bf0138ffa2e753b9f00dbad81e0f4e1138dc7812ff15e3c8ef5c35f.png) What is Internet..? — The internet is, at its core, a network of networks. Think about it this way. Your home has a Wi-Fi network. Your office has a network. Your college has a network. Your phone company has a network. Data centres have networks. ISPs (internet service providers) have massive networks. Here is something most developers never think about. The internet is physical. The internet is cables. It is hardware. It is buildings. ![The broader picture of the internet](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/a4f0e07713bf8031aaec1f393b5cfccc3b7fd565c8ff7fa9b0778e25a465f4b2.png) The broader picture of the internet — Nobody owns the internet. And everybody owns a piece of it. Your ISP - Jio, Airtel, BSNL owns the cables and equipment that connect your home to the wider network. They own that piece. A data centre company owns their servers and infrastructure. Now here is the big question - your phone is connected to Wi-Fi. Wi-Fi connects to your router. Router connects to your ISP. But how does your ISP in India connect to a server sitting in the United States? The answer is submarine cables. When you open a website hosted in the US right now, there is a very real chance your request travelled from your device, through your ISP, down to a coastal landing station, through an undersea cable across the ocean, and arrived at a data centre on the other side. That is not magic. That is engineering. ![A photograph of a diver inspecting an underwater fiber optic cable alongside a global map of submarine communications cable routes.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/ffa7f220a88a103e8f86291899481dce18e9a50c3a90f449cd0f9d74f8b9d799.png) The broader picture of the internet — Right now, underneath the ocean literally on the ocean floor - there are thousands of kilometres of fibre optic cables connecting continents. To know more → submarinecablemap.com. It shows every active undersea cable on the planet in real time. ![WWW vs Internet](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/7772da2c738634a98593cdabe36fcc6ac37ae284f9459425130a11d0eb501362.png) WWW vs Internet — When I say "the internet" and you probably keep thinking about browsing websites, watching videos, using apps. But here is the thing - what you are actually using most of the time is not the internet directly. It is something built on top of the internet. It is called the World Wide Web. And it is not the same thing as the internet. This is one of the most common confusions in tech - even among experienced developers. So let's fix it properly. Think of the internet as a transport system. It is a massive, global network that moves data from one place to another. The internet itself does not care what that data is. It could be an email. A video call. A file transfer. A WhatsApp message. A multiplayer game. The internet just moves the data. ![WWW vs Internet](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/532a704f98d4c0a398d4d87145c85afe6edb417b583460d021daf2d5fe0d9e6b.png) WWW vs Internet — The World Wide Web is one specific application that runs on top of the internet. In 1991 - a British scientist named Tim Berners-Lee built something on top of the internet that changed everything for regular people. His idea was simple - create a system of interlinked documents that anyone could access over the internet using a browser. He invented three things to make this work • HTML language to write and structure documents. • HTTP protocol that defines how those documents are requested and delivered over the internet. • URL system to give every document a unique address so anyone could find it. ![An illustration of a server room representing internet infrastructure alongside icons of gears representing web services.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/158324c194582c3e9c20cef404725ff9b454b52e93a7fd4b48287e2238119aa7.png) WWW vs Internet — Put those three together and you have the Web. A massive collection of pages, linked to each other, accessible through a browser, delivered over the internet using HTTP. So to summarise, The Internet is the infrastructure. The World Wide Web is a service that runs on that infrastructure ![An illustration showing three client devices labelled PC, Mobile, and Laptop connecting via dashed lines to a cloud-hosted Server.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/d18a18722102eb383513f09cab0455caa17a876d93c92924b317a94d78f0f4aa.png) Client-Server Architecture — A client is anything that makes a request. Your browser is a client. Your mobile app is a client. Your terminal is a client. A server is anything that listens for requests and responds to them. ![An illustration showing a client sitting at a computer sending a request labeled "Req" to a server stack and receiving a response labeled "Res".](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/78e1352aadec7bba0098fa4e8b9d379854753051ad98f0c6bfe1e60a03b2695d.png) Client-Server Architecture — A server is not some special magical machine. A server is just a computer. Running software that listens on a port, waiting for incoming requests, and sending back responses. Your own laptop can be a server. Client sends a request. Server processes it. Server sends back a response. A single server handles thousands, sometimes millions of client requests simultaneously. ![A sequential diagram illustrating network connectivity from a smartphone through Wi-Fi, to a router, to a telecommunications tower, and finally to the Earth representing the global internet.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/8b1aa78d40784a5d6f8f0a4a51fe08c69f571a3e5dd5eb4317f4d4fa96ca497d.png) Types of networks — Your phone is connected to your home Wi-Fi right now. That Wi-Fi connects to your router. Your router connects to Jio or Airtel. And through them - to the rest of the world. But here is the thing - not all of those connections are the same type of network. They have different names, different scales, different purposes. And as a engineer - you will hear these terms constantly. In cloud architecture diagrams, in server configurations, in security discussions. So let's define them properly - once and for all. ![A network diagram illustrating the hierarchy and scopes of different types of networks—PAN (Personal Area Network), LAN (Local Area Network), MAN (Metropolitan Area Network), and WAN (Wide Area Network)—connecting personal devices, office computer networks, and buildings across a metropolitan area.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/4195d136741cdef672347b15d7ff82564c04149f13f9d77e165b1b5969709a0f.png) Types of networks — LAN Local Area Network MAN Metropolitan Area Network WAN Wide Area Network LAN Local Area Network LAN Local Area Network PAN ![PAN](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/47488f4a3596c20bca87ac91ca2cbeffc2c9c61e25035e28332d8d043fb429b9.png) PAN — PAN stands for Personal Area Network. This is the smallest scale - the network of devices around a single person. Your phone connected to your earbuds via Bluetooth that is a PAN. Your smartwatch syncing with your phone is a PAN. Tiny range, personal devices, no internet required. ![LAN](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/d3887739d03879c007caeb5340d556e8896d7c01146d253a74c648a8f3e9f2b3.png) LAN — LAN stands for local area network. It's like a mini-network that covers a relatively small area, such as a home, office building, or campus. LANs are perfect for sharing resources like printers, files and even communicating between devices. Later you will hear about private networks inside VPCs. Those are essentially LANs in the cloud. ![MAN](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/edb2721866e3c8a8c3e0e6e6206460613775314730f539b4b112576cf70042e8.png) MAN — MAN stands for metropolitan area network. It's like a bigger sibling of LANs. MANs cover larger geographical areas, typically spanning a city or metropolitan area. They connect multiple LANs or network segments within the same region. MANs are often used by businesses, educational institutions, or government organizations. Later you will encounter the concept in cloud regions and availability zones. When AWS says a region has multiple data centres across a city - they are essentially describing a MAN-scale infrastructure. ![WAN](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/75e2d6546476235ac5be6ecff3a9616ed61125908fcea82577c78fbef01b7325.png) WAN — Wide Area Network → Across countries WANs cover wide geographical areas, like multiple cities, countries, or even continents. The internet itself is the largest example of a WAN. But WANs are not just the internet. Large companies have their own private WANs - connecting offices in Mumbai, Bangalore, New York, and London into one unified corporate network. Banks do this. Airlines do this. ![Types of Network](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/35f5547f64e25800804e65098bf84cba81164bf53cc1495a39c835e84da50f6a.png) Types of Network — Let me put these side by side so they stick. PAN - your personal devices. Bluetooth range. Just you. LAN - your home, your office, your campus. One building or site. Private. MAN - a city or large campus. Multiple buildings connected. Regional. WAN - countries, continents, the entire globe. The internet is the biggest example The Internet is a collection of all these types of networks! ![Network topologies](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/f6cc2af0bd69f7b5524aa8ccf7dfcac98e58169134a01a0def2c95db4dbbeecc.png) Network topologies — Imagine you're setting up Wi-Fi for a small office. You have 6 computers, a printer, and one internet connection. How do you connect them all? Do you run a cable from every computer to every other computer? Do you plug everything into one central box? Do you arrange them in a line? Network Topology help us to find these solutions. The word topology comes from the Greek word for place or arrangement. In networking, topology means the way devices are arranged and connected to each other. ![A diagram illustrating a bus topology where five computers are connected along a single central horizontal cable.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/fc83856566a65957177e72ca8ab37f49736d29bd638cb6e822299ebe94b0b2a4.png) Bus Topology — In a bus topology, all devices are connected to a single cable called the bus. It's like a group chat where everyone can see and participate in the conversation. ![A ring topology diagram displaying various devices, including computers, a printer, and a server, connected sequentially in a circular loop.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/7e65b6b885afe6e75c776b2d9a23fbbf2a6fe5364a3aeaff22e1d589dbb6276f.png) Ring Topology — Here each device is connected to the next device in a circular loop, forming a ring. Data travels around the ring in one direction, passing through each device. ![A network diagram showing four computers and a printer each connected via individual links to a central network device labeled "Hub" in a star topology layout.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/87429a7648065c834aff8652a9f807f3270445cbb88bb3ba4d442e36a99a31b7.png) Star Topology — In this setup, all devices are connected to a central hub or switch. The hub or switch acts as the central point of connection, and data flows through it to reach the intended devices. ![A glowing network diagram illustrating a mesh topology with six interconnected computer monitors.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/1cd9cbe15c0c4437eef6c1f4ba03a3d2a2f3da274d0d4284ce68a6b71f039a1d.png) Mesh Topology — In a mesh topology, each device is connected to every other device in the network. It forms a network of interconnected paths, providing multiple routes for data to travel ![A network diagram illustrating a tree topology, featuring a central hub branched out to secondary hubs, each connected to multiple computer workstations.](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/3f2650c45b73c841fbe0e05d8622160827b4f9d00ca30f1185d42eaaa33ede57.png) Tree Topology — It's a hierarchical network topology that combines elements of the bus and star topologies. It's like a family tree where everyone has their place in the hierarchy. ![Networking Fundamentals](https://docs.chaicode.com/cdn-cgi/image/width=1600,format=auto,fit=scale-down/assets/642336b34ef25e440a754da02c9a69dc1a968a76e925f9a1f13ecb5dfd9edfff.png) Networking Fundamentals — The "why" before the "how." History of Computer Networks WWW vs Internet Basic Terminologies Client–Server architecture What is Internet..? Types of networks The Broader picture of internet Network topologies In the next chapter, we'll understand how data travels across networks.