Netpractice: 42 Tutorial
NetPractice - Complete Survival Guide
NetPractice is a small, private network administration exercise designed to introduce students to TCP/IP addressing and subnetting. It consists of 10 levels of increasing difficulty. The goal is to fix broken networks by configuring IP addresses, subnet masks, and routing tables.
This guide covers the core concepts you need to understand to solve all 10 levels.
Level 2 – Add a Router (Default Gateway)
Scenario: Two networks separated by one router. Task: PC1 on Network A to PC2 on Network B. Solution:
- Configure router interfaces:
- Interface 1:
192.168.1.254/24 - Interface 2:
10.0.0.254/24
- Interface 1:
- On PC1: IP
192.168.1.1/24, Gateway =192.168.1.254 - On PC2: IP
10.0.0.1/24, Gateway =10.0.0.254
Key insight: The gateway IP must be on the same subnet as the PC.
Valid Host Range
Between network ID (+1) and broadcast (-1): 10.0.0.33 to 10.0.0.46
Why this matters in NetPractice: If you assign a host IP that equals the network ID or broadcast, the exercise will fail.
Conclusion
NetPractice is not about memorizing Cisco commands or complex routing protocols. It is about logical separation of networks and explicit routing. Once you internalize that every hop needs a valid subnet and every router needs a path, the project becomes almost easy. netpractice 42 tutorial
Take your time, draw diagrams, and remember: even the hardest level is just multiple small, simple networks chained together.
Good luck, 42 student. You’ve got this.
Did this tutorial help? Share it with your fellow cadets. And if you find an even trickier level, drop a comment below—let’s debug together.
Here’s a step-by-step write-up / tutorial for NetPractice (the 42 network configuration exercise).
NetPractice is a web-based mini-game where you fix broken TCP/IP networks by configuring IP addresses, subnet masks, and routes.
3. Choose Non-Overlapping Subnets
Different links must use different subnets. If two links use 192.168.1.0/24, packets will get confused. Keep them separate.
Practical Example: Level 4 (Typical Trouble Spot)
Let’s solve a common intermediate level. NetPractice - Complete Survival Guide NetPractice is a
Topology:
PC A (192.168.1.2/24) -- Switch1 -- Router1 (int1: 192.168.1.1/24)
(int2: 10.0.0.1/24) -- Switch2 -- Router2 (int1: 10.0.0.2/24)
(int2: 172.16.1.1/24) -- Switch3 -- Server B (172.16.1.10/24)
Goal: PC A pings Server B.
Why it fails initially: Router1 doesn’t know about 172.16.1.0/24. Router2 doesn’t know about 192.168.1.0/24.
Solution:
- On Router1: Add route → Destination:
172.16.1.0/24, Next hop:10.0.0.2 - On Router2: Add route → Destination:
192.168.1.0/24, Next hop:10.0.0.1
Now packets can go both ways.
Step 2: Routing Decisions
A split-path appeared: one route through a Content Delivery Node, another via a direct VPN tunnel. The tutorial introduced latency as a character—impatient, sneaky, and cumulative. Lena built a simple route policy: prefer CDN for static assets, VPN for secure API calls. Each choice painted a latency graph that rose and dipped like breathing. Level 2 – Add a Router (Default Gateway)
2.2 The Subnet Mask
The mask determines which part of the IP is the network and which is the host.
- Example mask:
255.255.255.0(also written as/24) - This means the first 24 bits are the network. The last 8 bits are the host.
- Result:
192.168.1.0/24is the network.192.168.1.1is a host.
Level 3 – Multiple Routers & Routing Tables
Scenario: Non-directly connected networks. Routers need static routes.
Rule: A router must know where to send packets for a destination network (next-hop IP).
Example:
R1 wants to reach 192.168.2.0/24 via R2:
⇒ Add route on R1: 192.168.2.0/24 via 10.0.0.2
Routing table syntax in NetPractice:
Destination network → Next hop IP
💡 Debug tip: If ping fails from Client to Server, check every router’s routing table step-by-step.