Understanding how computer networks work starts with learning a few essential terms. This post introduces some of the core networking concepts in a simple and practical way. If you’re just getting started with networking or brushing up on the basics, this will give you a solid foundation to build on.
1. IP Address and Mask
An IP address is like a digital address given to each device on a network. It identifies the device and helps data find its way to the correct destination.
Example of an IPv4 address: 192.168.1.10
But the IP address alone isn’t enough. We also need a subnet mask, which helps separate the network part of the IP from the host part.
Example:
- IP address: 192.168.1.10
- Subnet mask: 255.255.255.0
This means 192.168.1 represents the network part, and 10 identifies the individual device within that network. So, two devices like 192.168.1.10 and 192.168.1.20 are part of the same network if they share the same subnet mask.
What is a Subnet Mask?
A subnet mask is a 32-bit number used with an IP address to define which portion is for the network and which is for the host.
You can think of it as a divider: it tells the system where the network ID ends and the host ID begins.
Why is it needed?
Let’s say you have the IP address 192.168.1.10. How does your system know which part refers to the network and which part refers to the host?
That’s where the mask helps. Wherever the mask has a 1 in binary, those bits belong to the network portion. The remaining bits are for the host.
Example in Binary:
- IP: 192.168.1.10 → 11000000.10101000.00000001.00001010
- Mask: 255.255.255.0 → 11111111.11111111.11111111.00000000
So the network part is 192.168.1, and the host is 10.
This tells us that all devices with IPs from 192.168.1.1 to 192.168.1.254 are part of the same network.
A few key points:
- Subnet masks are not IPs—they just define how the IP should be interpreted.
- Common masks:
- 255.0.0.0 → Class A
- 255.255.0.0 → Class B
- 255.255.255.0 → Class C
- It helps determine whether the destination is within the local network or if data needs to go through the router.
Real-world use:
When a device wants to send data:
- It uses the subnet mask to check if the destination is in the same network.
- If yes → sends directly.
- If no → sends it to the default gateway (router).
2. Network Stack – OSI Model and TCP/IP
To understand how data travels across networks, we use reference models that break down communication into layers.
The OSI Model is a 7-layer theoretical framework used to explain how different network functions work together.
The TCP/IP Model, also known as the Internet Protocol Suite, is a simpler 4-layer model that is actually used in real-world networks like the internet.

Clarifying the Terminology: Internet Layer and Link Layer
When learning about the TCP/IP model, especially from different books, courses, or tutorials, you might come across multiple names used for the same layer. Here’s a quick clarification:
🔹 Internet Layer
This layer is responsible for logical addressing and routing of packets between networks.
Common alternative names you might see:
- Network Layer (borrowed from OSI terminology)
- IP Layer (because it handles the Internet Protocol)
RFC 1122 officially refers to this as the Internet Layer.
🔹 Link Layer (Bottom Layer)
This is the lowest layer in the TCP/IP model, handling physical transmission and framing of data between directly connected devices.
Other names you may encounter:
- Network Interface Layer
- Network Access Layer
- Host-to-Network Layer
- Sometimes even called Data Link + Physical Layer (when mapping to OSI)
In RFC 1122, it is referred to as the Link Layer, which is the preferred and official term
3. Interfaces and Ports
An interface is where a device connects to the network. This could be:
- A physical port (Ethernet)
- A wireless interface (Wi-Fi)
- A virtual interface (used in virtual machines or cloud systems)
The word “port” is also used in software—these are logical ports used by applications to communicate.
Examples:
- Port 80: HTTP
- Port 443: HTTPS
- Port 22: SSH
So depending on the context, port may refer to either hardware or a software communication endpoint.
4. Packet and Frame
When data travels over a network, it is broken into smaller pieces.
- A packet is used at the Network layer (Layer 3). It contains the IP address info.
- A frame is used at the Data Link layer (Layer 2). It contains MAC address info.
In simple terms:
- Think of a packet as the actual message or letter.
- The frame is the envelope that helps deliver that message to the next point.
5. Switch vs Router – What’s the Difference?
Let’s first understand what a network is. A network is a group of devices that share the same IP range, based on the subnet mask.
Example:
- IP: 192.168.1.10
- Mask: 255.255.255.0
→ All devices with IPs starting with 192.168.1. are in the same network.
Switch:
- Used to connect devices within the same network.
- Works at Layer 2 (Data Link).
- Uses MAC addresses to forward data.
- Ideal for building local networks (LANs).
Router:
- Used to connect different networks together.
- Works at Layer 3 (Network).
- Uses IP addresses to route data.
- Used when data has to travel from one network to another (like from your home network to the internet).
So, switches are used for communication within the same network, while routers enable communication between different networks.
Summary Table
| Term | What It Means |
| IP Address | Unique address for a device on a network |
| Subnet Mask | Defines the network and host portions of the IP |
| OSI Model | 7-layer theoretical model for network communication |
| TCP/IP Model | Real-world 4-layer model used on the internet |
| Interface | Network connection point (physical or virtual) |
| Port | Communication endpoint (hardware or software) |
| Packet | Network layer unit with IP info |
| Frame | Data link layer unit with MAC info |
| Switch | Connects devices in the same network |
| Router | Connects devices across different networks |
We’d love to hear your feedback and suggestions about this article. Feel free to reach out to us using the WhatsApp number below.
About The Author:
Sajith Achipra has been a trainer and testing consultant at Zframez Technologies since 2009. With 15+ years of experience, he specializes in networking, Python, development, and testing. He conducts online courses to help students and professionals enhance their skills. You can reach him on WhatsApp at +91 8884 884 844 for your training and testing requirements.