Let’s dive into some of the essential networking fundamentals we need to learn, as well as hands-on tasks to get started!
What is Networking?
Networking is the process of connecting computers, servers, and other devices to share information and resources. It enables communication between systems, allowing data to be transmitted across local and global networks.
In simple terms, networking is how devices (like computers, phones, and servers) talk to each other over wired or wireless connections.
How Does Networking Work? Let’s say you want to visit www.example.com in your web browser…
1️⃣ You type www.example.com in your browser.
2️⃣ Your computer asks a DNS server for the IP address of example.com.
3️⃣ The DNS server responds with an IP address like 192.168.100.10.
4️⃣ Your computer sends a request to that IP address over the internet.
5️⃣ The web server at 192.168.100.10 sends back the website data.
6️⃣ Your browser displays the website.
Networking Fundamentals
- Hosts and IP Addresses
• Hosts: Host are any device which sends or receives traffic. These are devices connected to a network, such as computers, servers, routers, etc. Think of any device that connects to the internet.
• IP Address: A unique identifier assigned to each host on a network.
There are two types of IP addresses:
• IPv4 (e.g., 192.168.1.1) – Uses 32-bit addresses.
• IPv6 (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334) – Uses 128-bit addresses.
Task: Find the IP address of your computer using the ipconfig (Windows) or ifconfig (Linux/Mac) command.
For Windows:
Open Command Prompt (Press Win + R, type cmd, and press Enter).
Type the following command and press Enter:
ipconfig
- Look for the IPv4 Address under your active network connection.
For Linux/Mac:
Open Terminal.
Type the following command and press Enter:
ifconfig
(If ifconfig is not available, try ip a on Linux.)
- Look for the inet entry under your active network interface (e.g., eth0 or wlan0).
If you need your public IP address, you can visit https://whatismyipaddress.com/ or run:
curl ifconfig.me
- Networking Devices
Repeaters: Regenerates signal from a distance.
Hub: A basic network device that sends data to all devices connected to it. It operates at Layer 1 (Physical Layer) of the OSI model. Hubs are simply multi-port Repeaters.
Bridge: Used to connect two or more network segments and filter traffic between them. It operates at Layer 2 (Data Link Layer).
Switch: Similar to a bridge but more advanced. It operates at Layer 2 and can send data only to the specific device it is intended for, reducing network congestion.
Router: Directs traffic between different networks, such as from your local network to the internet. It operates at Layer 3 (Network Layer) of the OSI model.
Routing is the process of moving data between networks.
- A Router is a device whose primary purpose is Routing.
Switching is the process of moving data within networks.
- A Switch is a device whose primary purpose is switching.
If you prefer this content in video form, check out these videos from Practical Networking:
Network Devices - Hosts, IP Addresses, Networks - Networking Fundamentals - Lesson 1a
Network Devices - Hub, Bridge, Switch, Router - Networking Fundamentals - Lesson 1b
Note: If we did not have network devices there would be a lot of manual movement of data.
Task: Identify and Classify Networking Devices in Your Environment
Look around your home, office, or school and identify networking devices such as routers, switches, modems, or hubs.
Note their function based on what you’ve learned: Is it a router directing internet traffic? A switch connecting multiple devices within a network?
If possible, log into your router’s admin panel (usually through 192.168.1.1 or 192.168.0.1) and check connected devices.
Observe how different devices (laptops, phones, printers) are connected and communicating within your local network.
- Subnets
• Subnetting divides a network into smaller, more manageable sub-networks. This helps organize the network.nd improve security.
• Subnet Mask: Defines the range of IP addresses available within a network. It helps to determine which portion of an IP address is the network and which is the host.
• Example: 192.168.1.0/24 means the network range includes all IP addresses from 192.168.1.1 to 192.168.1.254.
Task: Subnet a network. For example, if you have the network 192.168.1.0/24, divide it into smaller subnets (e.g., 192.168.1.0/26, 192.168.1.64/26).
Networking Protocols
- HTTP/HTTPS: Used for web browsing (HTTP = port 80, HTTPS = port 443).
Task: Check Connectivity to a Web Server Using ping and telnet
Objective: Use basic networking tools to check the status of specific ports related to the protocols mentioned.
Ping a Web Server (HTTP/HTTPS):
- Type the following command to check if you can reach a popular web server (e.g., Google):
ping www.google.com
You should see a response with the server’s IP address and round-trip time.
Check HTTP Port (Port 80) with telnet:
- Type the following command to test the connectivity to HTTP (port 80):
telnet www.google.com 80
If the connection is successful, you will see a blank screen or some response indicating that the port is open.
Check HTTPS Port (Port 443) with telnet:
- In the same way, check the HTTPS port:
telnet www.google.com 443
If successful, you’ll see a similar response showing the connection is open.
FTP: Used for transferring files (FTP = port 21).
SSH: Secure Shell used for remote server management (SSH = port 22).
DNS: Resolves domain names into IP addresses (DNS = port 53). DNS translates human-readable domain names (e.g., google.com) into IP addresses (e.g., 172.217.10.46).
Task: Find the IP Address of a Website Using nslookup
Goal: Learn how DNS resolves domain names into IP addresses.
Steps:
Open Command Prompt (Windows) or Terminal (Mac/Linux).
Type the following command and press Enter:
nslookup google.com
- You will see an output similar to:
Name: google.com
Address: 142.250.190.78
This shows the IP address of google.com.
Understanding the Output:
• The Name is the domain you queried.
• The Address is the corresponding IP address (IPv4 or IPv6).
Extra Experiment:
Try running:
nslookup google.com 8.8.8.8
This tells your system to use Google’s public DNS server (8.8.8.8) instead of your default one, helping you understand how different DNS servers might resolve a domain.
DHCP (Dynamic Host Configuration Protocol)
DHCP assigns IP addresses dynamically to hosts on a network.
DHCP (Dynamic Host Configuration Protocol) is a network management protocol used to dynamically assign IP addresses to devices on a network. Instead of manually configuring IP addresses for each device, DHCP automates this process, making network management more efficient.
Task: Check Your IP Address & DHCP Status
For macOS & Unix-based Systems Command:
ifconfig
Example Output:
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.1.100 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::1a2b:3c4d:5e6f:7g8h%en0 prefixlen 64 scopeid 0x4
ether 8c:85:90:12:34:56
media: autoselect
status: active
📌 Key Info:
• inet 192.168.1.100 → DHCP-assigned IP address
• ether 8c:85:90:12:34:56 → MAC address
Check DHCP Lease Details:
scutil --dns
Example Output:
DNS configuration (for scoped queries)
resolver #1
search domain[0] : example.com
nameserver[0] : 8.8.8.8
nameserver[1] : 8.8.4.4
📌 Key Info:
• nameserver[0] : 8.8.8.8 → Shows DNS servers from DHCP
For Linux Systems Command:
ip a
Example Output:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:ab:cd:ef brd ff:ff:ff:ff:ff:ff
inet 192.168.1.101/24 brd 192.168.1.255 scope global dynamic eth0
valid_lft 85623sec preferred_lft 85623sec
inet6 fe80::1a2b:3c4d:5e6f:7g8h/64 scope link
valid_lft forever preferred_lft forever
📌 Key Info:
• inet 192.168.1.101/24 → DHCP-assigned IP
• dynamic eth0 → Confirms DHCP is used
• valid_lft 85623sec → Lease validity (time left in seconds)
Check DHCP Lease Details:
cat /var/lib/dhcp/dhclient.leases
Example Output:
lease {
interface "eth0";
fixed-address 192.168.1.101;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
option domain-name-servers 8.8.8.8, 8.8.4.4;
option dhcp-lease-time 86400;
option dhcp-message-type 5;
renew 6 2024/02/21 12:30:00;
rebind 6 2024/02/21 18:30:00;
expire 6 2024/02/21 20:30:00;
}
📌 Key Info:
• fixed-address 192.168.1.101; → Assigned IP
• option routers 192.168.1.1; → Default gateway
• option dhcp-lease-time 86400; → Lease time (24 hours)
• renew, rebind, expire → Lease renewal times
For Windows Systems Command (CMD or PowerShell):
ipconfig /all
Example Output:
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : example.com
Description . . . . . . . . . . . : Intel(R) Ethernet Connection
Physical Address. . . . . . . . . : 00-1A-2B-3C-4D-5E
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.102 (Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
Lease Obtained . . . . . . . . . : Tuesday, February 20, 2024 12:00:00 PM
Lease Expires . . . . . . . . . . : Wednesday, February 21, 2024 12:00:00 PM
📌 Key Info:
• DHCP Enabled. . . . . . . . . . . : Yes → Confirms DHCP is in use
• IPv4 Address. . . . . . . . . . . : 192.168.1.102 → Assigned IP
• DHCP Server . . . . . . . . . . . : 192.168.1.1 → DHCP server IP
• Lease Obtained & Lease Expires → Shows lease duration
Check DHCP Lease Details (PowerShell):
Get-NetIPAddress
Example Output:
InterfaceAlias AddressFamily IPAddress PrefixLength
-------------- ------------- --------- ------------
Ethernet IPv4 192.168.1.102 24
Ethernet IPv6 fe80::1a2b:3c4d 64
📌 Key Info:
• IPAddress 192.168.1.102 → Assigned IP
• PrefixLength 24 → Subnet mask equivalent (255.255.255.0)
By running simple commands like ipconfig, ifconfig, or checking DHCP leases, you can verify whether your device is using DHCP and gather important network details.
ARP (Address Resolution Protocol)
Task: Check MAC Address of a Device on the Network
Show the ARP table (Windows/Linux/macOS):
arp -a
The OSI Model
Imagine you are sending a letter to a friend. The OSI model is like a set of steps that help your letter travel safely from you to your friend. It has 7 layers, and each one has a specific job.
1. Physical Layer (Wires & Signals)
What it does: This layer is like the postal service trucks and roads that carry your letter. It deals with actual physical connections like cables, Wi-Fi signals, and network hardware.
Example: Ethernet cables, Wi-Fi signals, fiber optics.
2. Data Link Layer (MAC Addresses & Switching)
What it does: It makes sure your letter is put in an envelope with the right address before it is sent through the postal system. This layer handles direct communication between devices using MAC addresses.
Example: MAC addresses, Ethernet switching, Wi-Fi protocols.
3. Network Layer (IP Address & Routing)
What it does: This layer decides the best route for your letter to reach your friend. It adds an IP address (like a home address) so that routers know where to send the data. Anything with an IP could be considered Layer 3.
Example: IP addresses, routers, the Internet.
4. Transport Layer (Reliable Delivery - TCP/UDP)
What it does: This ensures that your letter is delivered correctly. It can track the letter, confirm its arrival, or send it quickly without tracking.
Example:
• TCP (like signed document mail): Ensures delivery, tracks packets (used in websites and emails).
• UDP (like a postcard): Sends without tracking (used in video calls and online games).
5. Session Layer (Managing Conversations)
What it does: This layer keeps track of ongoing conversations between two computers, ensuring that the connection stays open and secure.
Example: Video calls, logging into a website, online banking sessions.
6. Presentation Layer (Encryption & Formatting)
What it does: Converts data into a format the receiving computer understands. It also handles encryption to keep information secure.
Example:
• Encryption (like a secret code in a letter) – used in HTTPS.
• Compression (shrinking large files) – used in videos and images.
7. Application Layer (User Interaction - Websites, Emails, Apps)
What it does: This is what you see as a user – emails, websites, chats. It’s the final layer where data is presented in a way we understand.
Example:
• Web browsing (HTTP/HTTPS)
• Emails (SMTP, POP3)
• File transfer (FTP)
Tasks to try
- Networking Commands: Practice using basic networking commands:
• ping: Test connectivity between devices.
• traceroute/tracert: Trace the route packets take to reach a destination.
Run: traceroute google.com (Linux/macOS) or tracert google.com (Windows). This shows the route your data takes across different networks to reach Google.
• curl: Send HTTP requests to test web servers.
• dig/nslookup: Query DNS records.
- Write a Python script to ping a list of servers and output whether they are up or down.
Python Script Example:
import os
def ping_server(server):
response = os.system(f"ping -c 1 {server}")
if response == 0:
return f"{server} is reachable"
else:
return f"{server} is not reachable"
servers = ['google.com', 'yahoo.com', 'nonexistentwebsite.com']
for server in servers:
print(ping_server(server))
Building a strong foundation in networking is essential for any IT professional. As cloud adoption and data-driven decision-making continue to grow, networking skills remain indispensable for optimizing performance, securing systems, and troubleshooting connectivity issues. For any aspiring Cloud, DevOps, or Data Engineer, networking is not just a supporting skill—it’s a fundamental pillar of success.
Find the GitHub repo here.
If you find this blog helpful too, give back and show your support by clicking heart or like, share this article as a conversation starter and join my newsletter so that we can continue learning together and you won’t miss any future posts.
Thanks for reading until the end! If you have any questions or feedback, feel free to leave a comment.