Skip to main content

Command Palette

Search for a command to run...

๐ŸŒ Day 6 of My DevSecOps Journey

Published
โ€ข4 min read
๐ŸŒ Day 6 of My DevSecOps Journey

Networking, OSI Model, IP Addressing, Subnetting, DNS, ARP, Storage, Volume Mounting & NFS (Complete Guide)

Day 6 was a deep dive into Linux networking and Linux storage โ€” two pillars that every DevOps/Cloud/DevSecOps engineer must master.
From OSI layers to subnetting, and from disk partitioning to NFS sharing, todayโ€™s learnings helped me understand how systems communicate and store data in real environments.

Letโ€™s break it down ๐Ÿ‘‡


๐ŸŒ 1๏ธโƒฃ Understanding Networking in Linux

๐Ÿ”Œ Network Interface

A network interface is the point where a computer connects to a network โ€” physical or virtual.
Examples:

  • eth0, ens3, wlan0

Used for routing, communication, and network troubleshooting.


๐Ÿงฑ 2๏ธโƒฃ OSI Model โ€” The 7 Layers Explained Simply

The OSI model explains how data travels across a network.
I learned each layer one by one:

โšซ Layer 1 โ€” Physical

Transmits raw bits through cables, signals, fiber.
Devices: NICs, cables, switches.

Node-to-node communication.
Handles error detection & correction.
Contains MAC addresses.

๐Ÿ”ต Layer 3 โ€” Network Layer

Responsible for routing, choosing best path for data.
Contains IP addressing.

๐ŸŸข Layer 4 โ€” Transport Layer

Handles sequencing, reassembly, and flow control.
Two major protocols:

  • TCP โ†’ Reliable, connection-oriented (mail, web apps)

  • UDP โ†’ Fast, connectionless (gaming, streaming)

๐ŸŸก Layer 5 โ€” Session Layer

Manages sessions between applications.
Establishes โ†’ Maintains โ†’ Terminates.

๐Ÿ”ถ Layer 6 โ€” Presentation Layer

Formats data, encrypts and decrypts.
Ensures sender & receiver interpret data correctly.

๐Ÿ”ด Layer 7 โ€” Application Layer

Closest to users.
Common protocols:

  • HTTP/HTTPS โ†’ Web

  • SMTP/POP3 โ†’ Email

  • FTP โ†’ File transfer

  • DNS โ†’ Domain resolution


๐Ÿ’ก 3๏ธโƒฃ IP Addressing, Subnet Masks & Classes

๐ŸŸฉ IPv4 Format:

a.b.c.d โ†’ Each part = 8 bits (0โ€“255)

๐Ÿ“˜ IP Classes

  • Class A โ†’ /8 โ†’ 1.0.0.0

  • Class B โ†’ /16 โ†’ 128.0.0.0

  • Class C โ†’ /24 โ†’ 192.0.0.0


๐Ÿงฎ 4๏ธโƒฃ CIDR Notation & Subnetting

Example: 192.168.1.0/24

  • Network Address: 192.168.1.0

  • Broadcast Address: 192.168.1.255

  • Usable Hosts: 192.168.1.1 โ†’ 192.168.1.254

๐Ÿ”น Subnetting /24 into 4 subnets

Each block size = 256 / 4 = 64

a) 192.168.1.0 โ†’ 192.168.1.63
b) 192.168.1.64 โ†’ 192.168.1.127
c) 192.168.1.128 โ†’ 192.168.1.191
d) 192.168.1.192 โ†’ 192.168.1.255

Subnetting helps design secure, efficient VPC networks.


๐ŸŒ 5๏ธโƒฃ DNS (Domain Name System)

DNS acts like the Internetโ€™s phonebook:

๐Ÿ‘‰ Converts domain names โ†’ IP addresses
Example:
www.google.com โ†’ 142.250.x.x

Makes the internet usable without remembering IP numbers.


๐Ÿ”— 6๏ธโƒฃ ARP (Address Resolution Protocol)

ARP maps:
IP Address โ†’ MAC Address

Used inside local networks so devices find each other.
Critical for routing, switching, and troubleshooting LAN issues.



๐Ÿ’พ 7๏ธโƒฃ Storage in Linux โ€” RAM, Disk & 3 Storage Layers

๐Ÿง  RAM

Temporary storage (clears after reboot).

๐Ÿ’ฝ HDD / SSD

Permanent storage for OS, logs, files, apps.

Linux storage works in 3 layers:


๐ŸŸฆ Layer 1 โ€” Raw Disk Partitioning

Splitting a disk into sections.
Example: 10GB โ†’ 5GB + 5GB partitions.

๐ŸŸฉ Layer 2 โ€” File System

Formatting partitions using:

  • ext4

  • xfs

  • btrfs

๐ŸŸง Layer 3 โ€” Mount Points

Connecting the formatted partition to a usable folder.


๐Ÿ› ๏ธ 8๏ธโƒฃ Practical: Attaching a Volume to a VM & Mounting It

I practiced attaching a new volume to a Linux VM.

๐Ÿ“Œ Step 1 โ€” Create VM

Launch instance, configure security groups.

๐Ÿ“Œ Step 2 โ€” Create Volume

Choose size โ†’ select same availability zone as VM.

๐Ÿ“Œ Step 3 โ€” Attach Volume

Inside VM, partition disk:

sudo fdisk /dev/nvme1n1

๐Ÿ“Œ Step 4 โ€” Format the Partition

sudo mkfs.ext4 /dev/nvme1n1p1

๐Ÿ“Œ Step 5 โ€” Mount the Disk

sudo mount /dev/nvme1n1p1 /mnt/data1

Now the new disk is active and usable.


๐Ÿ“ 9๏ธโƒฃ Practical: NFS (Network File System) Setup

I configured file sharing between two VMs:
nfs-server and nfs-client.


๐Ÿ–ฅ๏ธ Server Configuration

sudo mkdir -p /srv/nfs_server
sudo chown nobody:nogroup /srv/nfs_server
sudo chmod 777 /srv/nfs_server
sudo vi /etc/exports   # added export rule for client
sudo systemctl restart nfs-kernel-server

๐Ÿ“Œ Important:
Open port 2049 in the security group.


๐Ÿ’ป Client Configuration

sudo mkdir -p /mnt/nfs_client
sudo mount <Server-IP>:/srv/nfs_server /mnt/nfs_client

Here the NFS server storage becomes accessible to the client VM.


๐ŸŽฏ Day 6 Takeaway

Todayโ€™s learning helped me build deeper understanding of:

โœ”๏ธ OSI layers & network fundamentals
โœ”๏ธ Classes, CIDR, subnetting & broadcast concepts
โœ”๏ธ DNS & ARP โ€” how computers find each other
โœ”๏ธ Linux storage architecture
โœ”๏ธ Disk partitioning, formatting & mounting
โœ”๏ธ NFS server-client communication

These are foundational skills for cloud networking, DevOps automation, Kubernetes clusters, and secure infrastructure design.

Excited for Day 7! ๐Ÿš€

More from this blog

D

DevSecOps - Zero To Hero

19 posts