Name the parent network and count the VLAN tags #3
Reference in New Issue
Block a user
Delete Branch "development"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces the seed-based network selection with a directly named parent network, and stops deriving VLAN tags from the addressing.
Why
-NetworkSeedwas repeatable in the strict sense and unusable in the practical one:/20meant brute-forcing seeds until one landed on the right index.10.130.224.0/24, that removes one candidate, soNis4095rather than4096and every index above it shifts by one. Seed4249selects10.130.240.0/20there and10.130.224.0/20on a host with no network inside10.0.0.0/8— the adjacent, wrong block.What changed
-NetworkSeed 4249-ParentNetwork 10.130.240.0/20-NetworkCount 8-ParentNetworkMaskLength 21/24, not exposed)-ParentNetworkSubnetMaskLength 24-StartingVlanId 2,-VlanIdIncrement 1Leaving
-ParentNetworkunset still picks one at random, and the summary reports the argument that reproduces it:Counted VLAN tags
The derived tag read well while every network occupied a whole third octet, and broke the moment one did not — a
/25produced 32 networks carrying only 16 distinct tags. That had briefly forced a/24cap on the subnet mask length. Counting removes the constraint at its source, so the cap is lifted back to/30and/25and/26now yield 31 and 63 distinct tags.The trade: a tag no longer tells you the address. In exchange the two are independent, and
-VlanIdIncrement 10can express2, 12, 22 …, which a derived tag could not.Notes
-BaseNetworkis now aValidateSetof the three RFC 1918 ranges. It only bounds the random pick — an explicit-ParentNetworkis not required to sit inside it, or to avoid the host's networks. Both are warned about and then honoured.ParentNetworkcollided with the existing name for the first divided/24; that concept is nowIsUntaggedNetwork.ParentInterfaceDeviceis untouched.4094throws before any are assigned.Verification
/19–/22; subnet mask/22–/26; all three base networks; unaligned input; out-of-base and host-overlapping parents; both division guards; the4094ceiling.-ParentNetworkruns produce identical addressing across all 48 interface, VLAN and scope entries; documents differ only in UUIDs, which regenerate by design.vlan0.Ndevices;/22parent ÷/26at increment 10 gives 15 distinct tags from 2–142 — a combination the previous scheme could not express. Both exit 0.One bug caught in testing: the two paths read the subnet mask from different cmdlets (
Get-NetworkSummaryspells itMask,Get-Subnetspells itSubnetMask), so the host route command emitted an empty mask on the explicit path. Fixed.Not restaged
docs/screenshots/andsamples/…-Sample.logare real captures from runs under the old scheme. The screenshot caption is annotated to say so and gives the names today's run would produce; the sample log is left as a historical transcript.🤖 Generated with Claude Code