This project has been created as part of the 42 curriculum by sarfreit.
Discover the basics of networking β configuring IP addresses, subnet masks, gateways, and routes across simulated small-scale networks.
NetPractice is a hands-on networking project from the 42 curriculum. Instead of writing code, the goal is to fix broken network configurations so that a set of simulated devices (hosts, switches, routers) can communicate as intended.
Each of the 10 levels presents a small, non-functioning network diagram along with one or more goals (e.g. "host A needs to communicate with host C"). Solving a level means filling in the missing or incorrect fields β IP addresses, subnet masks, gateways, and static routes β until every goal reports OK.
The exercises progress from simple addressing (two devices on the same network) to full multi-router topologies with static routing, default routes, and an upstream "Internet" node requiring specific return routes.
β οΈ The networks used in this project are simulated and entirely fictional β no real-world IP ranges or infrastructure are involved.
-
Download and extract the project files attached to the project page into any folder.
-
From that folder, run the provided script:
./run.sh
This launches a local web server and opens the training interface in your default browser.
-
If
run.shdoesn't work, start the server manually:python3 -m http.server 49242
Then open
http://localhost:49242in your browser (or whichever port you chose).This manual fallback exists because, due to browser security constraints, NetPractice's pages must be served locally rather than opened directly as files.
-
On the welcome screen, enter your intranet login (
sarfreitfor example) in the Training tab, and click Start! β this loads a configuration generated specifically for that login. The Evaluation tab instead generates a random configuration, also valid for practice.
- Each level shows a network diagram with one or more goals at the top, plus
Check againandGet my configbuttons. - Edit the unshaded (white) fields β shaded/greyed fields are fixed and cannot be changed.
- Click
Check againto validate your configuration against the goals; the log panel explains exactly where a packet fails (missing gateway, missing route, invalid IP, etc.). - Once every goal passes, a
Next levelbutton appears.
- Before moving to the next level, click
Get my configto download that level's configuration as a.jsonfile. - This repository's 10 exported files (
level1.jsonthroughlevel10.json) were generated this way, one per level, and are committed at the root of the repository.
- Only the files inside this Git repository are evaluated.
- Ten exported configuration files (one per level) are required at the repository root β see the
Levelssection below. β οΈ Note on evaluation: although this repository's levels are numbered 1 to 10 (as generated during training), the actual defense draws three random levels from the training platform, with a limited time to solve them. No external tools are allowed during evaluation, aside from a simple calculator such asbc.
| File | Level | Topic focus |
|---|---|---|
level1.json |
1 | Same-network addressing (IP + mask basics) |
level2.json |
2 | Addressing with tighter subnet masks |
level3.json |
3 | Multiple hosts on a shared switch |
level4.json |
4 | Larger subnets |
level5.json |
5 | Introducing routers, gateways, and static routes |
level6.json |
6 | Default route / "internet interface" |
level7.json |
7 | Multiple routers, non-overlapping networks |
level8.json |
8 | Static routes combined with an internet interface |
level9.json |
9 | Complex multi-router topology |
level10.json |
10 | Full topology combining all previous concepts |
- TCP/IP addressing β how IPv4 addresses are structured and how devices are identified on a network
- Subnet masks & CIDR notation β splitting an address into network and host portions, calculating valid ranges and block sizes
- Network & broadcast addresses β the two reserved addresses in every subnet block
- Default gateways β how a host reaches destinations outside its own network
- Static routes & the routing table β how a router decides where to forward a packet, hop by hop
- Default routes (
0.0.0.0/0) β the "catch-all" route, and when a specific route is required instead - Routers vs. switches β what each device does, and why only routers require IP/mask configuration
- Non-overlapping addressing β why every network segment needs a genuinely distinct address block
- Multi-router topologies β chaining and branching routers, and configuring return-path routes
- 42's official NetPractice subject PDF
- General TCP/IP and subnetting reference material (RFC 791, RFC 950)
- Community walkthroughs and calculators used to cross-check subnetting logic during practice
- NetPractice Guidelines β toufa7 (Medium)
- 42sp-cursus-netpractice β caroldaniel (GitHub)
- NetPractice walkthrough (YouTube)
- AI assistance (Claude) was used throughout this project strictly as a learning and verification tool, never to generate the final submitted configurations directly. This helped to create the docs folder with explanations of the NetPractice concepts
The docs/ folder contains a set of personal study notes written while working through this project β plain-language explanations of IP addressing, subnetting math, gateways, static routes, and multi-router topologies, along with a quick Q&A reference and a review of recurring mistakes. These are supplementary study material, not part of the graded deliverable.
