NetPractice is a practical networking exercise designed to teach you the fundamentals of computer networking. Through 10 interactive levels, you'll learn how to configure IP addresses, understand subnetting, set up routing tables, and connect devices through routers and switches.
This project provides hands-on experience with TCP/IP addressing, subnet masks and CIDR notation, default gateways and routing, network topology design, IP address allocation, and network troubleshooting. The training interface simulates network configurations where you must fix non-functioning networks by correctly configuring IP addresses, subnet masks, and routing information.
• 10 Interactive Levels: Progressive difficulty from basic IP addressing to complex multi-router topologies
• Hands-on Configuration: Configure IP addresses, subnet masks, gateways, and routing tables
• Real-world Scenarios: Practice with switches, routers, and network segmentation
• Instant Feedback: Test your configurations and receive immediate validation
• Export Configurations: Save your solutions as JSON files for submission
Download the NetPractice training interface from the 42 intranet and extract the files:
# Extract the archive
unzip netpractice.zip
# or
tar -xvf netpractice.tar
# Open the interface
open index.html- Enter your 42 login when prompted (required for configuration persistence)
- Complete each level by configuring the editable fields (unshaded areas)
- Click "Check again" to verify your solution
- Export your configuration with "Get my config" button
- Save all 10 configuration files for submission
IP addresses uniquely identify devices on a network. IPv4 addresses consist of four octets (0-255) divided into network and host portions.
Private IP Ranges (RFC 1918): • Class A: 10.0.0.0/8 (10.0.0.0 - 10.255.255.255) • Class B: 172.16.0.0/12 (172.16.0.0 - 172.31.255.255) • Class C: 192.168.0.0/16 (192.168.0.0 - 192.168.255.255)
Subnet masks determine which portion of an IP address represents the network versus the host.
Common Subnet Masks:
/24 = 255.255.255.0 (254 hosts)
/25 = 255.255.255.128 (126 hosts)
/26 = 255.255.255.192 (62 hosts)
/27 = 255.255.255.224 (30 hosts)
/28 = 255.255.255.240 (14 hosts)
/29 = 255.255.255.248 (6 hosts)
/30 = 255.255.255.252 (2 hosts - ideal for point-to-point)
Gateway: Router interface that connects your local network to other networks. Must be in the same subnet as the device.
Switch: Layer 2 device that connects devices within the same network. Does not have an IP address.
Router: Layer 3 device that connects different networks. Each interface has its own IP address in a different subnet.
• All devices in the same network must be in the same subnet • Each device must have a unique IP address • Gateway must be in the same subnet as the device • Cannot use network address (first) or broadcast address (last) • Networks cannot overlap
- Identify the topology: Count networks, locate routers and switches
- Check what's editable: Focus on unshaded (editable) fields
- Assign IP addresses: Keep devices in same network in same subnet
- Configure gateways: Must be in same subnet as devices
- Set up routing: Use 0.0.0.0/0 for default routes
- Test and verify: Click "Check again" and adjust based on errors
Level 1-3: Basic IP addressing and gateway configuration
Level 4-6: Multiple networks, router interfaces, subnet planning
Level 7-10: Complex topologies, routing tables, efficient IP allocation
• Using different subnet masks for devices in the same network
• Gateway IP outside the client's subnet
• Assigning network or broadcast addresses to devices
• Creating overlapping networks
• Duplicate IP addresses
• Incorrect next hop in routing tables
• TCP/IP Guide
• RFC 791 - Internet Protocol
• RFC 1918 - Private Address Space
• Subnetting Practice
Place all 10 configuration files at the root of your repository:
netpractice/
├── level1.json
├── level2.json
├── level3.json
├── level4.json
├── level5.json
├── level6.json
├── level7.json
├── level8.json
├── level9.json
├── level10.json
└── README.md
This repository is for educational purposes only, documenting my work on the 42 curriculum. These solutions are intended as a reference for students who have already completed or are actively working on the project.