Networking & Infrastructure
Topical Authority Guide & Developer Workspace
Runs entirely in your browser
This tool executes locally using standard browser APIs (for example window.crypto.getRandomValues or crypto.subtle where applicable). Your input is not transmitted to or stored on a ScriptPulse server. See How Calculations Work.
Computer networks route data packets using logical IP boundaries and physical MAC hardware identifiers. Configuring subnets and constructing magic packets is core to operations.
Topic Overview
Networking spans physical layers (represented by MAC hardware addresses) to logical routing layers (represented by IPv4 and IPv6 subnets).
Configuring network nodes requires calculating subnets, defining hosts, and routing broadcast payloads across domains.
Real infrastructure work rarely stops at calculating a single subnet — it typically involves aggregating existing allocations into cleaner summary routes, splitting a newly-assigned block into right-sized segments for different device classes, and cross-referencing addresses in both IPv4 and IPv6 as networks run dual-stack rather than one or the other.
This hub's tools cover that full workflow: subnet and CIDR math for both IP versions, aggregation and splitting for address planning, MAC-layer identification and Wake-on-LAN packet construction for device-level operations, and ASN and port lookups for documenting how a network's addressing maps onto real routing and services.
This hub focuses on addressing and routing once a hostname has already resolved to an IP address. For the resolution step itself — turning a domain name into the address this hub then routes — see the Domain Name System (DNS) hub.
Core Concepts: IPv4/IPv6 Addressing and CIDR Notation
CIDR (Classless Inter-Domain Routing) notation specifies IP network blocks using a slash suffix, such as /24, indicating that the first 24 bits of the address form the network portion and the remaining bits identify hosts within that network. A /24 network has 256 total addresses, of which 254 are usable host addresses once the network and broadcast addresses are subtracted.
Subnet calculators compute four values from a CIDR block: the network address (all host bits zero), the broadcast address (all host bits one), the usable host range, and the subnet mask in dotted-decimal form. Getting any of these wrong when provisioning infrastructure causes routing failures or address overlap between segments.
Beyond single-subnet math, real network planning frequently requires aggregating multiple contiguous subnets into the smallest possible supernet (CIDR aggregation, sometimes called route summarization) to reduce the number of routes a router must hold, or splitting one larger block into several smaller subnets sized to specific host-count requirements (CIDR splitting). Both operations depend on the same bitwise arithmetic as basic subnetting, just applied in the opposite direction.
IPv6 addresses use 128 bits instead of IPv4's 32, written as eight groups of four hexadecimal digits. Because the full form is long, RFC 5952 defines a canonical compressed text representation that collapses the longest run of consecutive all-zero groups to a double colon (::) and removes leading zeros in each group. Expanding a compressed address back to its full form, or compressing a full address to its canonical short form, is a mechanical but error-prone conversion when done by hand.
Practical Application: Planning a Multi-Segment Network
A typical infrastructure planning task looks like this: you've been allocated the block 10.20.0.0/16 for a new site and need to carve it into separate subnets for servers, workstations, and IoT devices, each sized differently. Start with the CIDR Split Calculator to divide the block into right-sized ranges — for example a /24 for 250 servers, a /23 for 500 workstations, and a /26 for 60 IoT devices — and confirm none of the resulting ranges overlap.
Once the individual subnets are assigned, use the IPv4 Subnet Calculator to double-check each block's network address, broadcast address, and usable host range before entering it into router or DHCP configuration. If several allocated blocks are later found to be contiguous and no longer need to be routed separately, the CIDR Aggregator can collapse them back into a single summary route to keep the routing table small.
For IPv6 deployments, the same planning exercise uses the IPv6 Subnet Calculator to work out prefix boundaries, and the IPv6 Expansion and Compression tools to move between the full and canonical-compressed address forms when cross-referencing configuration files, DNS records, and firewall rules that may use either representation.
When a device needs to be identified at the link layer rather than the network layer — for asset inventory, DHCP reservations, or Wake-on-LAN — the MAC Address Generator produces correctly formatted addresses for lab and test environments, and the ASN Lookup and Port Number Reference tools help confirm routing ownership and standard service ports when documenting the resulting network design.
Common Mistakes and Troubleshooting
Mistake: treating the broadcast address as an assignable host address. In a /24 network like 192.168.1.0/24, 192.168.1.255 is reserved as the broadcast address and cannot be assigned to a device — a device misconfigured with this address will appear to have connectivity but will disrupt broadcast traffic for the whole segment. Fix: always calculate the usable host range explicitly (network address plus one, through broadcast address minus one) rather than assuming the full block is assignable.
Mistake: overlapping subnet allocations across sites connected by VPN or routing. Two sites independently choosing 192.168.1.0/24 will create unreachable or ambiguous routes once connected. Fix: maintain a single source of truth for allocated CIDR blocks across all connected sites before assigning a new one, and use the CIDR Split Calculator's output as documentation, not just a one-time calculation.
Troubleshooting: if a device can reach hosts inside its own subnet but not outside it, check whether its configured subnet mask matches what the network actually uses — a host configured with a /24 mask on a network actually segmented as /25 will incorrectly believe some remote hosts are local, and requests to those addresses will silently fail with no explicit error.
Troubleshooting: if an IPv6 address in a configuration file does not match what a tool or log shows, check whether one representation is compressed (using ::) and the other is fully expanded — they can be the identical address written two different ways. Normalize to one form, using RFC 5952 canonical compression as the safest default, before comparing addresses as strings.
Standards and Specifications
CIDR itself is defined by RFC 4632, and was originally introduced in RFC 1519, replacing the older classful A/B/C network system with variable-length subnet masking.
IPv6 address text representation, including the canonical compression rules referenced throughout this hub, is defined by RFC 5952. The underlying IPv6 addressing architecture is defined by RFC 4291.
Private IPv4 address ranges, used in the planning example above, are reserved by RFC 1918: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
Wake-on-LAN is not an IETF standard — it originated as AMD and HP's Magic Packet Technology specification in 1995 and was adopted as a de facto industry convention. The magic packet format (6 bytes of 0xFF followed by 16 repetitions of the target MAC address) is fixed by that original specification, not by an RFC.
Decision Guidance: Choosing the Right Addressing Approach
If you need to route traffic across networks or the public internet, address by IP — IP addresses are hierarchical and routable, while MAC addresses are only meaningful on the local link and are not routed. If you need to uniquely identify a specific physical network interface regardless of what IP it has currently been assigned, for DHCP reservations, Wake-on-LAN, or asset tracking, address by MAC. See the MAC vs IP comparison for the full tradeoff breakdown.
If your network needs more than roughly 4 billion addressable devices, needs to eliminate NAT for peer-to-peer applications, or must comply with a mandate requiring IPv6 support, plan for IPv6 alongside IPv4 rather than IPv4 alone — most production networks today run both simultaneously (dual-stack) rather than migrating outright. See the IPv4 vs IPv6 comparison for a deeper look at when each is the better fit for a specific workload.
Wake-on-LAN Magic Packets
Wake-on-LAN (WOL) allows administrators to awaken devices remotely. It relies on a "magic packet" containing 6 bytes of 0xFF followed by 16 repetitions of the target MAC address.
Because this packet is broadcast as a raw UDP frame, routers must be configured to allow directed broadcasts for cross-subnet wake triggers. Use the Wake-on-LAN Packet Generator to build the correct packet payload, and the MAC Address Generator when you need a placeholder address for testing wake configurations before pointing them at a real device.
Launch Interactive Developer Tools
Put these concepts into practice. Access, test, convert, or format your data locally in your browser memory:
IPv4 Subnet Calculator
Calculate subnet masks, host ranges, and broadcast addresses for IPv4.
IPv6 Subnet Calculator
Calculate IPv6 subnet CIDRs, host address ranges, first/last bits, and prefix binary layouts.
MAC Address Generator
Generate randomized MAC addresses with optional unicast/local bits.
Wake-on-LAN Packet Generator
Generate Wake-on-LAN magic packets in hexadecimal and binary forms.
CIDR Aggregator
Aggregate a list of IP addresses or subnets into minimal CIDR blocks.
CIDR Split Calculator
Split larger CIDR blocks into smaller subnets with custom host counts.
IP Range Calculator
Determine all IP addresses contained within an IP start and end range.
IPv6 Expansion Tool
Expand compressed IPv6 addresses into their full 32-character form.
IPv6 Compression Tool
Compress fully expanded IPv6 addresses using RFC 5952 rules.
Network Broadcast Calculator
Calculate broadcast addresses and networks for custom IP classes.
ASN Lookup
Query autonomous system details and IP ranges for a given ASN.
Port Number Reference
Search and inspect common UDP/TCP ports and their standards.
Comparative Guides & Technology Appraisals
Evaluate differences between specifications, formats, and cryptographic standards to pick the right architecture:
Related Developer Hubs
Explore neighboring topics that connect to this one.
Frequently Asked Questions
- What is a subnet mask?
- A subnet mask is a 32-bit filter that separates an IP address into network and host portions, defining the boundaries of a network segment.
- Why does Wake-on-LAN require MAC addresses?
- Because when a machine is turned off, its IP address configuration is lost. The network card only listens for its hardcoded physical MAC address.
- What is the difference between CIDR aggregation and CIDR splitting?
- Aggregation combines multiple contiguous smaller subnets into one larger summary route to reduce routing table size; splitting does the reverse, dividing one larger block into smaller subnets sized to specific host-count needs. Both use the same bitwise CIDR math, just applied in opposite directions.
- How many usable hosts are in a /24, /25, and /26 network?
- A /24 has 256 total addresses (254 usable), a /25 has 128 total (126 usable), and a /26 has 64 total (62 usable) — each additional bit borrowed for the network portion halves the number of available host addresses.
- Why does my IPv6 address look different in two different tools?
- IPv6 addresses can be written in a fully expanded form (all 8 groups, all digits shown) or a compressed canonical form, per RFC 5952, that collapses the longest run of zero groups to ::. Both represent the same address; use the Expansion or Compression tool to normalize before comparing.
- What is an ASN and why does it matter for networking?
- An Autonomous System Number (ASN) identifies a network or group of networks under single administrative control on the internet, used in BGP routing to determine how traffic is exchanged between providers. Looking up an IP's ASN tells you which organization or ISP actually operates that address range.
- Do I need to memorize common port numbers?
- No — reference them instead of memorizing. The Port Number Reference tool covers the standard well-known ports (0-1023) and commonly used registered ports, which is faster and less error-prone than relying on memory during troubleshooting or firewall configuration.
- Is Wake-on-LAN secure?
- Not inherently — a standard magic packet has no authentication, so anyone who can reach the local broadcast domain, or has it forwarded, can wake a configured device. Treat WOL as a convenience feature for trusted local networks, not a mechanism to expose across the open internet.