Apply the concept of network to configure the IPV4 for private and public IPs
Aim / Objective
To understand IPv4 structure, classes (A, B, C, D, E), CIDR notation, and RFC 1918 Private IP ranges versus Public IPs; calculate subnet masks, network addresses, broadcast addresses, and usable host ranges; and manually configure static IPv4 parameters on Windows and Linux systems.
Hardware & Software Requirements
Hardware Components
- Two or more desktop computers connected to a common local Ethernet switch
- Cat6 Ethernet patch cables
- Broadband Router with active Internet connection (for comparing Public WAN IP vs Private LAN IP)
Software, OS & Tools
- Windows 10/11 (`ncpa.cpl`, `ipconfig`, `route`, `ping`)
- Linux Terminal (`ip addr`, `ip route`, `nmcli`, `netplan`)
- Web Browser visiting public IP verification services (e.g. `icanhazip.com` or `ifconfig.me`)
Teacher's Lab Delivery Guide
Essential briefing notes, pedagogy, and setup tips for lab instructors⏱ 5-Minute Pre-Lab Lecture Briefing:
Teach IPv4 as a 32-bit binary number divided into 4 octets separated by dots. Highlight that an IP address without a Subnet Mask is meaningless. Write the 3 RFC 1918 Private ranges on the board and explain NAT: why your home/lab has 192.168.x.x internally, but the entire world sees only one public IP on your router.
📝 Key Concepts to Write on Whiteboard:
- IPv4 anatomy: 32 bits, 4 Octets (8 bits each), Network ID vs Host ID
- Classful addressing: Class A (1-126, /8), Class B (128-191, /16), Class C (192-223, /24), Class D (Multicast), Class E (Experimental)
- RFC 1918 Private IP Ranges (Non-routable over the public Internet):
- - 10.0.0.0 to 10.255.255.255 (10.0.0.0/8)
- - 172.16.0.0 to 172.31.255.255 (172.16.0.0/12)
- - 192.168.0.0 to 192.168.255.255 (192.168.0.0/16)
- Subnet Mask & CIDR (Classless Inter-Domain Routing): /24 = 255.255.255.0, /25 = 255.255.255.128, etc.
- Calculating Network ID (all host bits 0) and Broadcast ID (all host bits 1)
- Static IP configuration vs Dynamic DHCP assignment
Step-by-Step Practical Procedure
Examine Current IP Configuration via Terminal
Open Command Prompt (Windows) or Terminal (Linux). View current IP address, subnet mask, default gateway, and DNS servers assigned by DHCP.
Windows: ipconfig /all || Linux: ip -c a
Compare Private LAN IP with Public WAN IP (NAT Concept)
Compare your local private IP with the public IP assigned by your ISP by querying an external web service via curl. Notice that multiple lab PCs share the identical public IP through NAT (Network Address Translation).
curl https://ifconfig.me/ip
Subnetting Calculation Exercise
Given subnet `192.168.50.0/26`: Calculate the Subnet Mask, number of subnets, total addresses ($2^6 = 64$), usable host addresses ($64 - 2 = 62$), Network Address (`192.168.50.0`), First Host (`192.168.50.1`), Last Host (`192.168.50.62`), and Broadcast Address (`192.168.50.63`).
Formula: Usable Hosts = 2^(32 - CIDR) - 2
Configure Static IPv4 Address on Windows
Press `Win + R`, type `ncpa.cpl` to open Network Connections. Right-click Ethernet -> "Properties" -> Double-click "Internet Protocol Version 4 (TCP/IPv4)". Select "Use the following IP address". Enter IP: `192.168.50.10`, Subnet Mask: `255.255.255.192` (/26), Default Gateway: `192.168.50.1`. Add Preferred DNS: `8.8.8.8`. Click OK.
Shortcut: Win + R -> ncpa.cpl -> IPv4 Properties
Configure Static IPv4 Address on Linux (CLI)
In Linux, configure a static IP on network interface `eth0` or `enp0s3` using the `ip` command or `nmcli`.
sudo ip addr add 192.168.50.12/26 dev eth0 && ip route show
Verify Peer Connectivity & Cross-Subnet Isolation
Ping the adjacent machine on the same subnet (`ping 192.168.50.11`). Next, temporarily change the IP of one machine to a different subnet (`192.168.60.10/24`) without a router and observe that ping fails, proving subnet broadcast isolation.
ping 192.168.50.11 -t
Interactive Hands-On Lab Simulator
Practice and test concepts virtually before or after performing on physical lab equipmentObservations & Student Lab Record
Students are required to record the following measured parameters, hardware specifications, and output status into their physical lab journals:
| Parameter | Class A Example | Class B Example | Class C Example | Subnetted (/26) Example |
|---|---|---|---|---|
| IP / CIDR Notation | 10.50.1.10 /8 | 172.16.20.5 /16 | 192.168.1.100 /24 | 192.168.50.10 /26 |
| Subnet Mask | 255.0.0.0 | 255.255.0.0 | 255.255.255.0 | 255.255.255.192 |
| Network ID | 10.0.0.0 | 172.16.0.0 | 192.168.1.0 | 192.168.50.0 |
| Broadcast Address | 10.255.255.255 | 172.16.255.255 | 192.168.1.255 | 192.168.50.63 |
| Usable Host Range | 10.0.0.1 - 10.255.255.254 | 172.16.0.1 - 172.16.255.254 | 192.168.1.1 - 192.168.1.254 | 192.168.50.1 - 192.168.50.62 |
| Total Usable Hosts | 16,777,214 hosts | 65,534 hosts | 254 hosts | 62 hosts |
Conclusions & Learning Outcome
IPv4 addressing, classification, and subnetting were explored theoretically and verified practically. Static IP parameters were configured in both Windows (`ncpa.cpl`) and Linux (`ip addr`). The separation between private local subnets and public routable IPs via Network Address Translation (NAT) was confirmed.
Oral Exam & Viva Questions with Answers
Essential questions asked by external examiners and lab evaluators (Accordion UI)1. Class A Private: `10.0.0.0` to `10.255.255.255` (`10.0.0.0/8`)\n2. Class B Private: `172.16.0.0` to `172.31.255.255` (`172.16.0.0/12`)\n3. Class C Private: `192.168.0.0` to `192.168.255.255` (`192.168.0.0/16`)