As software engineers, we work with APIs, databases, servers, and web applications almost every day.
When we make an API request, our application communicates with a server to get a response. Similarly, when we connect to a database, it might be running on a completely different machine.
All these communications happen through a network.
We often come across terms like IP addresses, ports, HTTP, TCP, and routers etc... while developing applications. Understanding these concepts helps us understand how our applications communicate with other systems.
I often find myself searching Google to understand networking concepts and how they actually work.
I wanted to explain these concepts in a simple way, so that others learning networking don't have to spend as much time searching for explanations as I did.
So, I decided to start a series called Networking Essentials for Software Engineers, where I'll share what I've learned in a simple and easy-to-understand way.
In this first part, we'll cover some common networking terms and concepts.
Internet
When we make a video call to a friend through WhatsApp, we can see and talk to each other even when we're in different locations.
Our phone might be connected to a Wi-Fi network, while our friend's phone is connected to a mobile network.
Even though we're connected to different networks, we can still communicate through the Internet.
So, the Internet is simply a global network of interconnected computer networks that allows devices across the world to communicate with each other.
A Little History
The development of the Internet can be traced back to ARPANET (Advanced Research Projects Agency Network), a network developed with funding from the U.S. Advanced Research Projects Agency (ARPA).
ARPANET initially connected computers at different research institutions, allowing them to communicate and share resources.
Later, more independent networks were developed, and there was a need for a common way for these networks to communicate.
This led to the development and adoption of TCP/IP (Transmission Control Protocol / Internet Protocol), a set of communication protocols that allows different networks to exchange data.
In 1983, ARPANET switched to TCP/IP.
Over time, more networks became interconnected, gradually forming the global Internet we use today.
World Wide Web (WWW)
When we browse the Internet, we often move from one webpage to another by clicking on links.
For example, while reading an article on Wikipedia, we might click on a link to open another related article.
These links are called hyperlinks, and they connect webpages and other web resources.
The World Wide Web (WWW) is a system of interconnected webpages and resources that we can access through the Internet using a web browser.
The Internet provides the network connectivity needed to access these resources, while the World Wide Web allows us to navigate between them through hyperlinks.
Client–Server Architecture
When we open google.com in a browser, the browser sends a request to Google's server, which processes it and sends back a response.
This is called Client–Server Architecture, where:
- Client: An application or device that requests data or services.
- Server: An application or system that receives and processes requests and returns responses.
In this example, the browser acts as the client, and Google's server handles the request.
We use this same architecture when a frontend application communicates with a backend API.
Protocols
In places like colleges and offices, we follow certain rules to maintain proper communication and coordination.
Similarly, when computers communicate over a network, they need to follow a set of rules to exchange data.
These rules are called protocols.
Some commonly used networking protocols are TCP (Transmission Control Protocol), UDP (User Datagram Protocol), HTTP (Hypertext Transfer Protocol), etc.
How Is Data Transferred Over a Network?
When we send an image or a file to someone through WhatsApp, the entire file is not necessarily transferred as a single piece of data.
Instead, the data is usually divided into smaller units called packets.
These packets travel through the network to reach the destination, where the data is put back together so the receiver can access the original file.
But how does the network know where to send these packets?
IP Address
An IP (Internet Protocol) address is a logical address assigned to a device's network interface, allowing data to be sent to the correct destination.
For example, when our laptop is connected to home Wi-Fi, it usually gets a private IP address from the router.
But multiple devices connected to the same Wi-Fi network can access the Internet through a single public IP address.
How is this possible?
Private and Public IP Addresses
Our home router connects devices like laptops, mobiles, and TVs to the Internet.
Each device has its own private IP address within the local network, while the router typically uses a public IP address for communication over the Internet.
When our laptop sends a request to a website, the router usually translates the private IP address into its public IP address using NAT (Network Address Translation).
When the response comes back, the router uses its translation information to forward the data to the correct device.
Ports
Our laptop might be running multiple applications at the same time, such as Chrome, WhatsApp, and a game.
The IP address helps deliver data to the correct device, but how does the operating system know which application should receive it?
A port is a number used by transport protocols such as TCP and UDP to identify communication endpoints.
Port numbers are 16-bit values, ranging from 0 to 65535.
Some commonly used ports are:
- 80: HTTP
- 443: HTTPS
- 27017: MongoDB
- 3306: MySQL
Port numbers are divided into three categories:
-
Well-known ports (0–1023): Commonly used by standard services. On Linux, normal users generally cannot bind applications to these ports without additional permissions and may receive a
Permission deniederror. - Registered ports (1024–49151): Used by registered applications and services. We can also use available ports in this range for our applications.
- Dynamic or private ports (49152–65535): Commonly used for temporary connections. For example, when a browser connects to a web server, the operating system can assign a temporary source port. The actual automatic port range depends on the operating system's configuration.
An IP address helps identify the destination device, while a port number helps identify the communication endpoint on that device.
Internet Speed
Internet speed is commonly measured in bits per second (bps).
- 1 Kbps = 1,000 bits per second
- 1 Mbps = 1,000,000 bits per second
- 1 Gbps = 1,000,000,000 bits per second
How Does Communication Between Computers Happen?
Computers can communicate with each other through two types of transmission media:
1. Guided (Wired) Communication
In guided communication, data travels through a physical medium, such as a cable, connecting the devices.
For example, two computers connected using an Ethernet cable can exchange data through that connection.
Some commonly used wired media are:
- Twisted-pair cables
- Coaxial cables
- Optical fiber cables
2. Unguided (Wireless) Communication
In unguided communication, data travels through electromagnetic waves without requiring a physical cable between the devices.
For example, when we connect our laptop to Wi-Fi or transfer files using Bluetooth, we're using wireless communication.
Some commonly used wireless technologies are:
- Wi-Fi
- Bluetooth
- Mobile networks (3G, 4G, 5G)
Modem
Computers work with digital data (0s and 1s). But communication mediums like traditional telephone lines carry analog signals.
To transmit data through these lines, we need a device that converts digital data into signals suitable for transmission.
A modem (Modulator–Demodulator) performs this conversion in two ways:
- Modulation: Converts digital data into signals suitable for transmission over the communication medium.
- Demodulation: Converts the received signals back into digital data that the computer can process.
For example, when our computer sends data through a traditional telephone line, the modem modulates the data into an analog signal. At the receiving end, another modem demodulates that signal to recover the digital data.
Modern fiber and cable connections use different signaling technologies, but the purpose remains the same: enabling data transmission over the communication medium.
How Are We Connected to the Internet?
At home, we connect our laptops and mobile phones to Wi-Fi to access the Internet.
But who provides this Internet connection?
Companies like Jio, Airtel, and BSNL provide Internet connectivity. These companies are called Internet Service Providers (ISPs).
Our home router connects to the ISP's network, allowing our devices to access the Internet.
But our ISP isn't directly connected to every server or website in the world. It communicates with other networks to exchange data.
For example, our Internet connection might be provided by Jio, but the website we're accessing could be hosted on a network operated by another company.
The data can travel through multiple interconnected networks before reaching the destination.
How Are Different Countries Connected?
Networks across countries and continents are connected through communication infrastructure, including submarine optical fiber cables laid under the oceans.
Companies such as Tata Communications operate international network infrastructure, including submarine cable systems.
ISPs can connect directly with other networks or use larger network providers to reach networks in different regions.
Types of ISPs
ISPs are commonly grouped into three tiers based on how they connect to other networks.
Tier 1: Large global networks that connect different countries and continents, often through submarine fiber cables. They exchange traffic with other Tier 1 networks without paying for Internet transit. Examples include Tata Communications and AT&T.
Tier 2: These providers mainly operate at regional or national levels. They connect with other networks and may purchase connectivity from larger providers. Examples include Airtel, Jio, and BSNL.
Tier 3: These are typically local Internet providers that purchase connectivity from larger ISPs and provide Internet access to homes and businesses. Examples include SITI Cable and Spectra.
Types of Networks
Networks can be classified based on the geographical area they cover.
1. LAN (Local Area Network)
A LAN connects devices within a small area, such as a home, office, or college.
For example, computers connected through the same Wi-Fi router at home are usually part of a LAN.
LANs can use Ethernet cables or Wi-Fi to connect devices.
2. MAN (Metropolitan Area Network)
A MAN connects networks across a city or metropolitan area.
For example, cable TV networks that connect different areas within a city can be considered a MAN.
3. WAN (Wide Area Network)
A WAN connects networks over large geographical distances, such as between cities, countries, or continents.
For example, cellular networks (3G, 4G, and 5G) can operate as WANs, connecting mobile devices across large geographical areas through interconnected network infrastructure.
The Internet is the largest example of a WAN, connecting networks across the world.
Network Topologies
When multiple computers are connected in a network, they can be arranged and connected in different ways.
The arrangement of devices and their connections in a network is called Network Topology.
There are five common types:
1. Bus Topology

All devices are connected to a single main cable called the backbone.
Only one device can successfully transmit at a time on a traditional shared bus network. If the main cable breaks, communication across the network can be disrupted.
2. Ring Topology

Devices are connected in a circular arrangement, with each device connected to two neighboring devices.
Data travels through the ring to reach its destination. In a basic single-ring setup, a cable or device failure can interrupt communication.
3. Star Topology

All devices are connected to a central device, usually a switch.
If one device's cable fails, the other devices can still communicate. However, if the central switch fails, communication between connected devices is disrupted.
4. Tree Topology

Devices are connected in a hierarchical structure, often using multiple interconnected switches.
It combines smaller star networks into a larger structure. A failure in an upstream connection can affect the devices connected below it.
5. Mesh Topology
Devices are connected through multiple paths, allowing data to take alternative routes.
In a full mesh, every device is directly connected to every other device. In a partial mesh, only some devices have multiple connections.
Mesh topology provides redundancy, but requires more connections and configuration.
I hope this article helped you understand the basics of networking. I've tried my best to explain everything in a simple way.
If I've made any mistakes or missed something, please feel free to correct me in the comments.
In the next part, we'll explore the structure of network.













Top comments (0)