Skip to content

Latest commit

Β 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

This project has been created as part of the 42 curriculum by sarfreit.

🌐 NetPractice

Discover the basics of networking β€” configuring IP addresses, subnet masks, gateways, and routes across simulated small-scale networks.

Project Status Levels


πŸ“– Description

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.


πŸ“š Concepts

Networking Basics β€” Quick Visual Guide


πŸš€ Instructions

Running the training interface

  1. Download and extract the project files attached to the project page into any folder.

  2. From that folder, run the provided script:

    ./run.sh

    This launches a local web server and opens the training interface in your default browser.

  3. If run.sh doesn't work, start the server manually:

    python3 -m http.server 49242

    Then open http://localhost:49242 in 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.

  4. On the welcome screen, enter your intranet login (sarfreit for 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.

Solving a level

  • Each level shows a network diagram with one or more goals at the top, plus Check again and Get my config buttons.
  • Edit the unshaded (white) fields β€” shaded/greyed fields are fixed and cannot be changed.
  • Click Check again to 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 level button appears.

Exporting configurations

  • Before moving to the next level, click Get my config to download that level's configuration as a .json file.
  • This repository's 10 exported files (level1.json through level10.json) were generated this way, one per level, and are committed at the root of the repository.

Submission

  • Only the files inside this Git repository are evaluated.
  • Ten exported configuration files (one per level) are required at the repository root β€” see the Levels section 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 as bc.

πŸ“‚ Levels

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

πŸ“š Resources

Networking concepts studied

  • 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

References


πŸ—‚οΈ Docs / study notes

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.

About

[ πŸ›œ 42-School-Project] This activity is a general practical exercise designed to introduce you to the basics of computer networking. You will learn how to configure IP addresses, connect devices through a router, and understand the role of a gateway within a network.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages