Skip to content

feat: implemented virtual subnet#74

Merged
prajwal3114 merged 1 commit intoOPCODE-Open-Spring-Fest:mainfrom
sharvil-lade:main
Nov 15, 2025
Merged

feat: implemented virtual subnet#74
prajwal3114 merged 1 commit intoOPCODE-Open-Spring-Fest:mainfrom
sharvil-lade:main

Conversation

@sharvil-lade
Copy link
Contributor

Description

  • Defined a main network (e.g., 192.168.1.0/24) and programmatically subnet it into smaller networks (like /26).

  • Created IPAddress, Subnet, NetworkDevice, and Network classes to handle parsing, subnet math, device creation, and overall management.

  • Assigned virtual devices valid IP addresses from these subnets.

  • Implemented a ping() method that checks whether two devices belong to the same subnet—ping succeeds only if they share a subnet, otherwise it fails (router needed).

Semver Changes

  • Patch (bug fix, no new features)
  • Minor (new features, no breaking changes)
  • Major (breaking changes)

Issues

  • No issues as of now

Checklist

@prajwal3114 prajwal3114 merged commit 54f8183 into OPCODE-Open-Spring-Fest:main Nov 15, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants