Skip to content

NetPractice is an introductory project to the world of networking. Through 10 progressive exercises, you'll learn fundamental concepts of TCP/IP addressing by configuring small-scale networks to enable communication between devices.

Notifications You must be signed in to change notification settings

msabr/NET-PRACTICE-1337

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

NetPractice - 42 Network

NetPractice Grade

๐ŸŽฏ About

NetPractice is an introductory project to the world of networking. Through 10 progressive exercises, you'll learn fundamental concepts of TCP/IP addressing by configuring small-scale networks to enable communication between devices.

Skills Developed:

  • IP addressing and subnetting
  • Network configuration
  • Routing table management
  • Network troubleshooting
  • Understanding network topologies

๐ŸŒ What is a Network?

A computer network is a collection of interconnected devices that communicate by sending and receiving data packets.

Network Types

Types of Networks:

๐ŸŒ Public Networks (Internet)

  • Global connectivity
  • Managed by ISPs
  • Minimal access control
  • Examples: Internet, public Wi-Fi

๐Ÿ  Private Networks

  • Restricted access
  • Local connectivity
  • Enhanced security
  • Examples: Home networks, corporate LANs
Network Types

๐Ÿ“ก TCP/IP Protocol

The TCP/IP model consists of four layers working together to ensure reliable data transmission:

TCP/IP Model
Layer Protocols Function
Application HTTP, FTP, SMTP User services and interfaces
Transport TCP, UDP Reliable data delivery
Internet IP, ICMP Routing and addressing
Network Access Ethernet, Wi-Fi Physical data transmission

Key Concepts:

๐Ÿ”— TCP (Transmission Control Protocol)

  • Breaks data into packets
  • Ensures reliable delivery
  • Reassembles data at destination

๐Ÿ“ IP (Internet Protocol)

  • Provides unique addressing
  • Routes data across networks
  • Two versions: IPv4 and IPv6

๐Ÿ”ข IPv4 & Subnet Masks

IPv4 Address Structure

An IPv4 address is a 32-bit number divided into four 8-bit octets:

192.168.1.100
 โ”‚   โ”‚  โ”‚  โ”‚
 โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€ Each octet: 0-255 (8 bits)
IPv4 Structure

Binary Representation

Understanding binary is crucial for subnetting:

IP Address:    192.168.1.100
Binary:        11000000.10101000.00000001.01100100

Network vs Host Portions

Every IP address consists of:

  • Network portion: Identifies the network
  • Host portion: Identifies the device
Network vs Host

Subnet Masks

A subnet mask determines which bits represent the network vs host:

IP Address:     192.168.1.100
Subnet Mask:    255.255.255.0    (/24)
Network:        192.168.1.0
Host:           0.0.0.100

CIDR Notation

CIDR (Classless Inter-Domain Routing) uses slash notation:

CIDR Subnet Mask Available IPs Usable IPs Use Case
/30 255.255.255.252 4 2 Point-to-point
/29 255.255.255.248 8 6 Small office
/28 255.255.255.240 16 14 Department
/27 255.255.255.224 32 30 Floor network
/26 255.255.255.192 64 62 Building network
/25 255.255.255.128 128 126 Large department
/24 255.255.255.0 256 254 Standard LAN

Reserved IP Ranges

These ranges are reserved for private networks:

Range Class CIDR Usage
10.0.0.0 - 10.255.255.255 A /8 Large organizations
172.16.0.0 - 172.31.255.255 B /12 Medium networks
192.168.0.0 - 192.168.255.255 C /16 Small networks/homes
127.0.0.0 - 127.255.255.255 - /8 Loopback testing

๐Ÿ”Œ Network Devices

Switch

A switch connects devices within the same network (LAN):

Network Switch

Characteristics:

  • Operates at Layer 2 (Data Link)
  • No IP configuration required
  • Forwards traffic based on MAC addresses
  • Cannot communicate between different networks

Router

A router connects multiple networks together:

Network Router

Characteristics:

  • Operates at Layer 3 (Network)
  • Has IP interface for each connected network
  • Routes traffic between different networks
  • Maintains routing tables

Important: Router interfaces cannot have overlapping IP ranges!


๐ŸŽฎ Level Solutions

Below are all NetPractice levels with their topologies and a short note for each. Click each section to expand and view the image and summary.

Level 1: Basic Host Communication
Level 1

Goal: Make two pairs of hosts communicate directly.
Key: Both hosts in each pair must share the same network and subnet mask.

Level 2: Subnetting Practice
Level 2

Goal: Assign IPs with different subnet masks, ensuring all hosts in a network use the same mask and valid IP range.

Level 3: Switch Network
Level 3

Goal: All clients are connected through a switch.
Key: Every client must have an IP in the same network.

Level 4: Router Interfaces
Level 4

Goal: Assign IPs to routers and hosts without overlapping subnets for each router interface.

Level 5: Routing Tables
Level 5

Goal: Configure routing tables so clients in different networks can reach each other.

Level 6: Internet Access
Level 6

Goal: Connect a local client to the Internet via a router using default routes.

Level 7: Multi-Router Topology
Level 7

Goal: Configure multiple routers and subnets, planning address ranges to avoid overlap.

Level 8: Limited Address Space
Level 8

Goal: Provide Internet to multiple hosts within a constrained public range.

Level 9: Advanced Integration
Level 9

Goal: Combine subnetting, routing, and multi-network integration in a complex topology.

Level 10: Final Challenge
Level 10

Goal: Build a complete, efficient network with correct allocation, routing, and no waste.


๐Ÿ› ๏ธ Useful Tools & Commands

Network Commands

# IP Configuration
ip addr show              # Show IP addresses
ifconfig                  # Legacy IP configuration

# Connectivity Testing
ping 192.168.1.1         # Test connectivity
traceroute 8.8.8.8       # Trace network path

# Routing
ip route show            # Display routing table
route -n                 # Legacy routing table

# Network Analysis
netstat -rn              # Network statistics
ss -tuln                 # Socket statistics

Online Calculators


๐Ÿ“š Resources

๐Ÿ“– Documentation

๐ŸŽ“ Learning Materials

๐Ÿ“š Recommended Books

  • "Computer Networking: A Top-Down Approach" by Kurose & Ross
  • "TCP/IP Illustrated, Volume 1" by W. Richard Stevens
  • "Network+ Guide to Networks" by Tamara Dean

๐Ÿ”ง Tools

  • Wireshark - Network protocol analyzer
  • GNS3 - Network simulation platform
  • Packet Tracer - Cisco network simulator

"In networks, we trust the protocol."

โญ If this helped you, please give it a star! โญ

About

NetPractice is an introductory project to the world of networking. Through 10 progressive exercises, you'll learn fundamental concepts of TCP/IP addressing by configuring small-scale networks to enable communication between devices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published