An IPv4 Subnet Calculator With Binary Visualization and /31 Handling IP address math is bitwise arithmetic on 32-bit unsigned integers. ipToInt('192.168.1.100') gives you 0xC0A80164. Anding with a mask gives the network. Oring with the wildcard gives the broadcast. Subnet splitting is bit shifts on the CIDR. It's satisfying to implement because it's mostly one-line functions. Subnet math is on

An IPv4 Subnet Calculator With Binary Visualization and /31 Handling
SEN LLC·Dev.to··1 min read
D
Continue reading on Dev.to
This article was sourced from Dev.to's RSS feed. Visit the original for the complete story.