What is Computer Networking? A Beginner's Overview

Table of contents
- How did it start?
- Protocols
- ISP (Internet Service Provider)
- Topologies
- Structure of the Network
- OSI Model (Open Systems Interconnected Model)
- Model Number 2: TCP / IP Model
- Protocols
- Status Words
- Transport Layer
- UDP (User Datagram Protocol)
- TCP (Transmission Control Protocol)
- 3 - Way Handshake
- Network Layer
- Types of routing
- Internet Protocol (IP)
- Class of IP addresses
- Internet Engineering Task Force (IETF)
- IPV4 vs IPV6
- TCP (Data Link Layer)

C - commonly
O - oriented
M - machine
P - particularly
U - used for
T - training
E - educational
R - research
Network: Devices linked to each other.
Internet: A group of connected computer networks.
How did it start?
Advanced Research Projects Agency (ARPA)
UCLA
Stanford Research Institute (SRI)
University of Utah
UC Santa Barbara
Tim Berners-Lee invented the World Wide Web (WWW).
The world’s first website is: World's First Website
There was no search engine, so you couldn’t look up anything.
The Internet Society establishes protocols and manages the Internet. Protocols are developed through the RFC (Request for Comments) system.
I believe Yahoo was the first search engine.
Q: Why do we need these protocols/rules?
A: To communicate seamlessly without conflicts.Q: What are a server and a client?
A: A client sends a request to the server, and the server sends back a response. Our computer can also act as a server when working on a local host.
Protocols
Protocols are the rules set by the Internet Society for how data is transferred.
TCP (Transmission Control Protocol): It ensures that the data reaches its destination without being corrupted along the way.
UDP (User Datagram Protocol): is a fast, connectionless protocol used for sending data packets over networks. Unlike TCP, it doesn't guarantee delivery, order, or error correction, making it faster but less reliable. It’s often used in applications like streaming, online gaming, and DNS queries, where speed matters more than perfect delivery.
HTTP (Hyper Text Transfer Protocol): Used by web browsers and the World Wide Web, it defines the format of data and how it's transferred between the client and the server.
IP Addresses
Format: [x.x.x.x], where each 'x' ranges from 0 to 255.
Command to check your own IP Address: $ curl ifconfig.me -s
is used to retrieve your public IP address from the ifconfig.me
website, with the -s
flag suppressing the progress bar and other unnecessary output, displaying only the IP address.
ISP (Internet Service Provider)
For example, AirTel provides us with a modem/router. This modem has the global IP address, and devices connected to it will share the same IP address visible to everyone around the world.
Suppose Device 01 (D01), Device 02 (D02), and Device 03 (D03) are connected to the router/modem. The modem/router will assign IP addresses to these devices, like IP 01 for D01, IP 02 for D02, and IP 03 for D03. These are called local IP addresses, and they are assigned using DHCP (Dynamic Host Configuration Protocol).
Note: When we search google.com from any of the devices, Google will see only the global IP address, meaning Google will recognize that only one device is making the request.
The modem will also determine which device made the request—whether it was Device 01, Device 02, or Device 03. The modem does this using NAT (Network Address Translation).
Q: We know which device made the request, but now tell me which application made that request.
A: It is determined by the port numbers.
The IP address determines where the computers are located, and the port number determines which application made the request.
Ports are 16-bit numbers, meaning they have 16 bits, with each bit containing 0's and 1's.
The total possible port numbers are 2^16, which equals 65,536.
We know that web pages use HTTP, and all HTTP traffic happens on Port 80.
For example: MongoDB uses port 27017 (correct me if I'm wrong), and SQL uses port 1433.
Port numbers from 0 to 1023 are called reserved ports. Port numbers from 1024 to 49152 are registered by various applications. We can use the remaining ports.
Q: What is 1 Mbps?
A: 1 Mbps = 10^6 bits per second
1 Gbps = 10^9 bits per second
1 Kbps = 10^3 bits per second
There are two ways in which communication between computers happens.
Guided Way: A path is already set.
Unguided Way
Q: Why use cables instead of satellites?
A: Because it is faster.
LAN (Local Area Network): Small houses/offices (typically limited to a specific area).
MAN (Metropolitan Area Network): Across a city.
WAN (Wide Area Network): Across countries.
The Internet is essentially a collection of all these three layers.
Synchronous Optical Networks (SONET): It carries data using optical fiber cables, allowing it to cover larger distances.
Frame Relay: A method to connect your LAN to a WAN.
Modem: A device used to convert digital signals to analog signals and vice versa.
Routers: A device that routes data packets to the correct IP addresses.
Topologies
A network topology is the physical and logical layout of nodes and connections in a network.
Types
Bus Topology: If the link breaks, it disrupts the internet connection.
Ring Topology: each device in the network is connected to two other devices, forming a circular (or ring-like) structure.
Limitations:If the cable breaks, we can't send the data.
Unnecessary calls are made; for example, when making a call from A to F, it also makes a call from B to C.
Star Topology: all devices in the network are connected to a central device.
Limitations: If the control system fails then the network will go down.Tree Topology: Bus Topology + Star Topology.
Mesh Topology: Every device in the network is connected to every other device. This creates a fully interconnected network where data can be transmitted through multiple paths, providing high redundancy and reliability.
Limitations: Expensive and scalability issues.
Structure of the Network
Order → Amazon → Delivery Company [US] → Transport → …
… → Transport [India] → Delivery Company → Amazon → Received
Order
and theReceived
are part of the Application Layer.The rest is the internet.
OSI Model (Open Systems Interconnected Model)
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
1, 2, 3, and 4 each have their own network.
The router is located somewhere between 4 and 5.
Devices 5, 6, and 7 have their own another separate network.
Application Layer: It’s implemented in software, where users interact with the application. We send our data from the application layer to the presentation layer.
Q: What is the purpose of the presentation layer?
A: It converts user data into a machine-readable binary format. Encoding and encryption also take place here, and it provides abstraction.
First, the data is sent to the session layer, which helps manage and set up connections, enabling the sending and receiving of data, followed by terminating sessions.
Next comes the transport layer, responsible for sending data to the appropriate destination easily.
The data received from the session layer is then segmented into smaller units called segments.
Each segment contains the source and destination port numbers and the sequence number (which is used to reassemble the segments in the correct order).
Then, flow control is applied.
The network layer is responsible for transmitting the received data segments from one computer to another located on a different network. Its function is logical addressing.
The data link layer enables direct communication with computers and hosts (also known as physical addressing, such as the MAC address, which is a 12-digit alphanumeric number). It also adds the MAC address.
Finally, the physical layer deals with cables and hardware for actual data transmission.
Model Number 2: TCP / IP Model
Developed by ARPA.
Similar to the OSI model, but instead of 7 layers, it has only 5 layers.
Application Layer
Transport Layer
Network Layer
Data Link Physical Layer
Application Layer: Users interact with this.
Example: Browsers, WhatsApp, etc.Q: Where does it lie?
A: On your devices.
Uses the same protocols (client-server architecture).
If we need to create our own server, we should have a reliable IP address that clients can reach.
The collection of servers in a large company is called a data center. It may have static IP addresses (addresses that don't change), a reliable internet connection, and high upload speeds.
- Peer-to-peer (P2P) architecture: Various applications/devices run on multiple devices. There is no dedicated computer, and you can scale it rapidly.
Example: Torrent.
Protocols
Web Protocols:
are rules and standards used to enable communication and data transfer between computers on the internet. They govern how web browsers, servers, and other devices interact with each other.
TCP/IP
HTTP: How data is transferred.
DHCP: Allocates IP addresses to the devices and users connected to your network.
FTP: How files are transferred.
SMTP: It is used to send emails.
POP3/IMAC: Receive emails.
SSH: How to access a computer's terminal remotely.
VNC: It is used for graphical control.
TELNET: It enables users to connect to a remote host or device using a TELNET client.
UDP: Stateless connection.
Sockets: When we need to send a message from one system to another, we use sockets.
- Ports (Ephemeral Ports): It can exist on the client side, but on the server side, you need to know the port number.
HTTP (Hypertext Transfer Protocol) in detail:
It is a client-server protocol and an application layer protocol. These application layer protocols also require a transport layer protocol. HTTP uses TCP for this purpose (ensuring all data is sent and received). So, HTTP operates at the Application Layer, while TCP works at the Transport Layer. HTTP is also a stateless protocol, meaning the server does not store any data from the client by default.
Note: In links, everything after the “?” are the arguments.
HTTP Method: Is essentially telling the server what to do.
GET: Requesting the data.
POST: Is a client and want to send something to the server.
PUT: Puts data at a specific location.
DELETE: Want to delete the data from the server.
Status Words
1xx: Informational.
2xx: Success.
3xx: Redirecting.
4xx: Client’s error.
5xx: Server’s error.
Cookies: It is a unique string stored in the client’s browser and has an expiry date.
Third-Party Cookies: These are the cookies set for websites you don’t visit.
Q: Where are all these IP addresses stored, and how do they find the server?
A: Here comes the concept of DNS (Domain Name System). Essentially, domain names are mapped to IP addresses.
Example: mail.google.com
Here, 'mail' is the sub-domain, 'google' is the second-level domain, and 'com' is the top-level domain. Top-level domains are also known as root DNS servers. They are the first point of contact for your query.
.com
- For commercial purposes..edu
- For educational institutes..org
- For the non-profit organizations..us
,.uk
,.in
- Country-specific.
These are managed by ICANN (Internet Corporation for Assigned Names and Numbers).
Note: Whenever we visit a site for the first time, our computer stores its IP address in the local machine's cache.
Local DNS server → the first point of contact.
Your ISP has all the information on the sites you visit, even if you're in incognito mode. If something bad happens, they are obligated to share that information with the government or the police.
You can’t buy a domain name; you can only rent it.
Transport Layer
Transportation of a message from one computer to another is handled by the network layer. However, within the computer, the transportation of data from the network to the application is managed by the transport layer.
Box (Your’s) → CC 01 (Courier Company of India) => Done by Transport Layer.
- - - - - Transportation between CC 01 and CC 02 is done by Network Layer. - - - - -
CC 02 (Courier Company of Germany) → Box (Friend) => Done by Transport Layer.
Note: The Application Layer also helps manage congestion control.
Checksums: To check whether the data is corrupted or not. It is like a number. It helps set the order of the data.
UDP (User Datagram Protocol)
Data may or may not be delivered.
Data may change.
Data may not be in order.
Connectionless Protocol.
UDP Packet
Source Port Number.
Destination Port Number.
Length of Data Gram.
Checksums.
Data.
1, 2, 3, and 4 are known as the header and have a size of 8 bytes (2 bytes each).
Total size = 2^16
Size of data = 2^16 - 8
Use cases:
Video Calls.
Gaming.
TCP (Transmission Control Protocol)
Transport layer protocol.
The application layer sends a lot of raw data (TCP segments). This data is divided into chunks, and a header is added. It is also called the data network layer.
Congestion control.
Handles situations when data does not arrive and maintains the order of data using sequence numbers.
Features:
Connection-oriented.
Error control.
Congestion control.
Bi-directional/Full-duplex.
Note: Only one TCP connection is established between two computers.
3 - Way Handshake
Network Layer
Here, we work with routers.
Transport: Segments.
Network: Packets.
Data Link Layer: Frames.
Hop-by-hop routing.
Forwarding routing.
Routing table.
192.168.2.30: (192.168.2 → Network Address/Subnet ID and 30 → Device Address/Host ID)
Q: Who creates these routing tables?
A: Control Plane.Every router is a node.
Links between routers are the edges.
Types of routing
Static Routing: Adding an address manually.
Dynamic Routing: When there is a change in the network, they are updated automatically.
Internet Protocol (IP)
The protocol that operates in the network layer.
IPV4: 32-bit number, 4 words.
IPV6: This is the future: a 128-bit number, 8 words.
Hopping basically occurs at the ISP’s router (main).
The Internet Society created classes for subnet and host IDs and so on.
Class of IP addresses
Class A: [0.0.0.0 to 127.255.255.255]
Class B: [128.0.0.0 to 191.255.255.255]
Class C: [192.0.0.0 to 223.255.255.255]
Class D: [224.0.0.0 to 239.255.255.255]
Class E: [240.0.0.0 to 255.255.255.255]
Subnet Masking: Basically, it means that the subnet mask will mask the network part of the IP address, leaving us with the host part.
Variable Length Subnet: We can set the length of our subnet network.
In the early days, a first-come, first-serve approach was used. As a result, institutions like MIT, Stanford, and others received the Class 'A' IP addresses.
Internet Engineering Task Force (IETF)
It assigns IP addresses based on the region to minimize hopping.
Some IPv4 addresses are reserved.
For example: localhost is 127.0.0.1, which is known as a loopback address.
IPV4 vs IPV6
IPV4 → 2 ^ 32 = 4.3 billion
IPV6 → 2 ^ 128 = 3.4 × 10 ^ 38
Cons of IPV6
Not backward compatible.
ISPs would have to shift to a lot of hardware.
Representation:
There are 8 numbers, each being a hexadecimal digit that represents a 16-bit part of the address.
Format: a.a.a.a.a.a.a.a (Each is a 16-bit hexadecimal number.)
Middle Boxes: An extra device that also interacts with the IP packets.
TCP (Data Link Layer)
The Data Link Layer is responsible for transferring the received packets over the physical link.
DHCP servers have a pool of IP addresses.
But at the end of the Data Link Layer, they communicate with each other using link-layer addresses/MAC addresses (not of the device, but of the component).
This is NOT a PROFESSIONAL blog.
Subscribe to my newsletter
Read articles from Vibhanshu Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
