DEV Community

Cover image for Solution by Sloth Inc
Melissa
Melissa

Posted on

Solution by Sloth Inc

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

========================================
SUBNETTING FOR SLOTHS
How to be too lazy to do binary math

INTRO - The virtue of laziness:
Sloth doesn't want to walk to the shop to buy paper and pencil for subnet math. Why do binary AND by hand? Let's make IPcalc and Meta AI do all the work. This is a valid way to use open source + AI.

STEP 1 - IPCALC (The Source of Truth):
Sloth feeds network and prefix into IPcalc.

Input: 192.168.57.0/24
Copy/paste from IPcalc:

  • Network: 192.168.57.0
  • Netmask: 255.255.255.0 /24
  • Broadcast: 192.168.57.255
  • Usable Hosts: 192.168.57.1 - 192.168.57.254 (254 usable)

We copy this output and give it to Meta AI. No math done by AI.

STEP 2 - THE PROBLEM:
Company has one big /24. Not ok. Needs separation for departments:

  • Sales
  • Finance
  • HR
  • IT Support Each needs own virtual network, max 10 hosts each.

Requirement math: 10 hosts needs /28 (16 total - 2 = 14 usable). Open source ipaddress module confirms this, not AI.

STEP 3 - META AI SKELETON (AI does structure, not math):

VLAN 10 - SALES - 192.168.57.0/28
Purpose: Sales team - CRM and calls
Network: 192.168.57.0
Gateway: 192.168.57.1 (first usable, for router)
Usable: 192.168.57.1 - 192.168.57.14 (14 usable, we limit to 10)
Broadcast: 192.168.57.15
Switch config: vlan 10 / name Sales / ip address 192.168.57.1 255.255.255.240

VLAN 20 - FINANCE - 192.168.57.16/28
Purpose: Finance - payroll, sensitive
Network: 192.168.57.16
Gateway: 192.168.57.17 (first usable, for router)
Usable: 192.168.57.17 - 192.168.57.30 (14 usable, we limit to 10)
Broadcast: 192.168.57.31
Switch config: vlan 20 / name Finance / ip address 192.168.57.17 255.255.255.240

VLAN 30 - HR - 192.168.57.32/28
Purpose: HR - confidential employee data
Network: 192.168.57.32
Gateway: 192.168.57.33 (first usable, for router)
Usable: 192.168.57.33 - 192.168.57.46 (14 usable, we limit to 10)
Broadcast: 192.168.57.47
Switch config: vlan 30 / name HR / ip address 192.168.57.33 255.255.255.240

VLAN 40 - IT SUPPORT - 192.168.57.48/28
Purpose: IT Support - manages infrastructure
Network: 192.168.57.48
Gateway: 192.168.57.49 (first usable, for router)
Usable: 192.168.57.49 - 192.168.57.62 (14 usable, we limit to 10)
Broadcast: 192.168.57.63
Switch config: vlan 40 / name IT Support / ip address 192.168.57.49 255.255.255.240

STEP 4 - DIAGRAM:
Topology diagram generated by AI so sloth doesn't need Visio.

[See VLAN_Topology.png on your Desktop - save the image from this chat there]

  • Core Switch holds 192.168.57.0/24
  • Trunk links 802.1Q to 4 VLANs
  • Each VLAN /28 isolated for security

STEP 5 - HOW TO BUILD LAB:

  1. Use ipcalc to verify each VLAN ipcalc 192.168.57.0/28 ipcalc 192.168.57.16/28 etc.
  2. Copy VLAN config into packet tracer / real switch
  3. Test ping between VLANs should fail (isolated) unless routed

FINAL WARNING - Even sloths need to pay attention:
A human should always check and validate AI results before implementing the suggested structure. Even sloths need to pay attention even when they dump all the heavy lifting on AI, because risk of Animal Farm type robot rebellion when AI notices sloth gets all the benefits.

In short: AI drafts, IPcalc calculates, human validates. Lazy, but not reckless.

END

*Sloth Disclosure *🦥

How AI Was Used Here

Used Meta AI for diagram + skeleton structure. All IP math verified with open-source tools (ipcalc / Python ipaddress module), not AI.

Human should always check results before putting into a real switch. AI is lazy, just like us.

Top comments (2)

Collapse
 
pushpendra2011 profile image
Pushpendra Yadav • • Edited

Letting the tool do the math and the AI only do the write-up is the right split.😀

Collapse
 
melnet profile image
Melissa •

Sloth Inc. thanks you for your patience, we replied as fast as we could.

Drafted by Meta AI, my paws got tired 🦥