Subnet calculator
Examples:
The table is copied tab-separated: it pastes straight into a spreadsheet.
Still free
Nothing: the network is fully allocated.
Transparency
Everything is computed in your browser, by the scripts listed below. What you type never leaves this page.
- Enforced by your browser
- This page's Content Security Policy allows a single destination, the site's audience measurement (
connect-src https://stats.r-no.fr, see below), and forbids any form submission (form-action 'none'). You can read the policy at the top of the page source. - Audience measurement
- Like every page of the site, this one counts its visit with Umami, installed on R-no’s own server (
stats.r-no.fr). It receives the address of the page, without parameters or anchor, the site you came from (its domain only), your browser, system, language and screen size, and the country, region and city deduced from your IP address, which is not kept. It never receives what you type, nor the result of the tool. No cookie, nothing stored in your browser; if your browser asks not to be tracked (Do Not Track), nothing is measured. The data is erased after 25 months.- /commun/mesure.js: the filter applied before each sending, written for R-no Toolbox. 1.4 kB
SHA-256225eec74fd12623d82fc05ee7d222be629ce454d081c129e8d1e249ed37ee716 - https://stats.r-no.fr/m.js: Umami’s tracker, open source (MIT), served by the measurement server. Its fingerprint is not shown here: it changes with each version of Umami, and you cannot check from your browser that it is the published code. For that part, you have to trust R-no.
- /commun/mesure.js: the filter applied before each sending, written for R-no Toolbox. 1.4 kB
- What is stored
- No cookie, and nothing in the address. What you type is not kept. Your language is given by the address itself (
/en/or/fr/): nothing is stored to remember it. Like any website, the server records the download of the page and its files in its access logs (IP address, date and time, address requested, browser name). It never receives what you type. - Code that runs here
-
- app.js: the subnet calculator, written for R-no Toolbox. Not minified, no third-party library. IPv4 and IPv6 use the same arithmetic on 32- and 128-bit integers (BigInt). 26.8 kB
SHA-256651f8d0835ec88d1d51ab8b29cccab166ebf1033eb1f0c7753a3700a98417cb8 - textes.js: the French messages of the tool, shown by its script (the rest of the French page is written into its HTML when the site is built). It only defines texts, with no logic. 7.8 kB
SHA-256e70c1d63cacb4ccac67931829f0602e5999aef0840b317e043fc98a779b00de1 - /commun/langue.js: the language helper, the same on every page of the site. It reads the language of the page and gives the tool its messages in that language. It stores nothing. 1.6 kB
SHA-25680f76f69773ef628d36d09bf8387cfedebda4529210d7120649b6f5603310631
- app.js: the subnet calculator, written for R-no Toolbox. Not minified, no third-party library. IPv4 and IPv6 use the same arithmetic on 32- and 128-bit integers (BigInt). 26.8 kB
- How it works
- Equal subnets: the number you ask for is rounded up to a power of 2, since a network can only be halved. By needs (VLSM): each line gets the smallest block with enough usable hosts, and the blocks are placed one after the other, largest first. That way each block starts on a properly aligned address and no space is lost between them; what is left at the end is given as CIDR blocks.
- Tested
- The arithmetic is covered by automated tests, run on every deployment: rounding, /31 and /32, networks too small, IPv6, reading the needs, and the rejection of malformed input. The tests also check, on thousands of random cases, that the subnets are aligned, never overlap, stay inside the network, and that together with the free blocks they cover it exactly.
- Check it yourself
- Download a script and compare its fingerprint with the one above:
curl -s https://r-no.fr/ip/split/app.js | shasum -a 256 - Limits
- Up to 65,536 subnets (an IPv6 /48 into /64s) and 256 lines of needs; the table shows the first 256 subnets, the copy buttons all of them. The needs are placed largest first, not in the order you typed them. The tool does not keep room for growth: if a subnet may grow, ask for more hosts. In IPv4, usable hosts exclude the network and broadcast addresses, except for /31 and /32 (RFC 3021).