IP Tools — Examples
Hands-on runs with the IP Tools: a /24 and a /26, IPv4 conversions, shortening IPv6, splitting a /48, decoding Teredo, a ULA, and ranges turned into CIDRs.
Back to the overview: IP Tools · Open the tool live: www.jpkc.com/tools/ip/
The manual explains every tab and output field in detail. This page adds concrete calculations, played through step by step. Every address shown is an example value — put your own in its place.
Example 1: Break a /24 down in full
The classic — you want the network and broadcast address plus the host range of a typical LAN.
- Switch to the Subnet Calc tab and enter
192.168.1.0/24. Press Calculate or Enter to run. (The Quick button192.168.1.1/24leads to the same network; since.1isn't the start of the network, the table then opens with the note "Host bits are set — the network is 192.168.1.0/24.") - In Subnet Details you read off: Network Address
192.168.1.0, Broadcast192.168.1.255, Subnet Mask255.255.255.0, Wildcard Mask0.0.0.255, First Usable Host192.168.1.1, Last Usable Host192.168.1.254, Usable Hosts254, Total Addresses256, IP ClassC, IP Type192.168.0.0/16 – Private network (RFC 1918). - In the Binary Breakdown you can see that the first 24 bits (the prefix) are colored as network bits and the last 8 as host bits — exactly the eight bits that give you the 256 addresses.
That's the standard starting point for any home or office network. If you need it smaller, see Example 2.
Example 2: Calculate a /26 and split it into subnets
You want to divide a /24 into four equal parts (/26) and know which one a given address falls into.
- In the Subnet Calc tab, enter
192.168.1.130/26. Always include the prefix — the calculator rejects an address without/…and tells you what's missing. - The table opens with "Host bits are set — the network is 192.168.1.128/26." Subnet Details shows: Network Address
192.168.1.128, Broadcast192.168.1.191, Subnet Mask255.255.255.192, Wildcard Mask0.0.0.63, First Usable Host192.168.1.129, Last Usable Host192.168.1.190, Usable Hosts62, Total Addresses64. So.130lives in the third of four /26 blocks (.128–.191). - Under Subnet Splits, the tool shows how this /26 could be divided further — the next narrower prefixes
/27,/28,/29, and/30with the host count per sub-network and concrete example subnets. You see at once: a/30(4 addresses, 2 hosts) suits point-to-point links, a/27(32 addresses, 30 hosts) small departments.
Example 3: Convert IPv4 to integer, hex, and binary
You need 192.168.1.1 as an integer — for a database column, a comparison, or a firewall rule.
- Switch to the Converter tab and enter
192.168.1.1(or use the example button). - The table gives you: Hexadecimal
0xC0A80101, Decimal integer3232235777, Binary (octets)11000000.10101000.00000001.00000001, IPv4-mapped IPv6::ffff:192.168.1.1, IPv4-mapped IPv6 (hex)::ffff:c0a8:0101, NAT64 (64:ff9b::/96)64:ff9b::192.168.1.1, 6to4 prefix2002:c0a8:0101::/48, and Reverse DNS1.1.168.192.in-addr.arpa. Each of these rows has a copy button (Address type doesn't). - Address type shows
192.168.0.0/16 – Private network (RFC 1918)— useful for a quick check of whether an address is routable at all. For comparison,8.8.8.8(example button) comes out as0.0.0.0/0 – Public (globally routable), with no RFC.
A note on input: the converter accepts only a dotted IPv4 address (192.168.1.1) or an IPv6 address. Anything else gets "Invalid IP address: …" plus the reason. The decimal and hexadecimal forms are output-only; a bare integer like 3232235777 can't be fed back in directly, so convert it to dotted notation by hand first. 010.1.1.1 is rejected as well: leading zeros are ambiguous, because some programs read them as octal.
Example 4: Shorten and expand an IPv6 address
IPv6 addresses are usually written compactly, but sometimes you need the full form (for exact string matching, say) or the name for the reverse zone.
- In the Converter tab, enter the written-out address
2001:0db8:0000:0000:0000:0000:0000:0001. - The table shows Compressed IPv6 (RFC 5952)
2001:db8::1and Expanded IPv62001:0db8:0000:0000:0000:0000:0000:0001. So you get both directions at once. - Address type shows
2001:db8::/32 – Documentation (RFC 3849)— the range set aside specifically for examples. - At the very bottom is Reverse DNS:
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa— all 32 hex digits in reverse, exactly the name you need for a PTR record.
If you enter ::ffff:192.168.1.1 instead (example button), the table adds Mixed notation, Embedded IPv4 192.168.1.1, and IPv4 decimal 3232235777.
Example 5: Generate a private IPv6 address (ULA)
You're building an IPv6 home or lab network and need a stable, ISP-independent prefix.
- Open the IPv6 ULA tab. It generates a ULA automatically the first time you open it; Generate Random ULA rolls a new one.
- You get four values, each copyable — as an example: /48 Prefix
fd3f:9a21:7c4e::/48, /64 Example Subnetfd3f:9a21:7c4e:0001::/64, Example Host Addressfd3f:9a21:7c4e:0001::1, and the Global ID (random, 40 bits) as hex. (Your values will differ — the 40-bit Global ID comes from your browser's crypto randomness.) - The Address Structure graphic shows by color how the 128 bits split:
fd(8-bit prefix), 40-bit Global ID, 16-bit Subnet ID, 64-bit Interface ID. - How to use it: assign the
/48to your location; the 16-bit Subnet ID (0001,0002, …) gives you 65,536 possible/64sub-networks — one per LAN segment. Generate the prefix once and keep it, and your internal addresses stay stable no matter what your provider assigns.
Example 6: Translate an address range into CIDR blocks
You have an IP range (for a firewall or routing rule, say) and need it as a clean CIDR list.
- Switch to the IP Range tab, left card Range → CIDRs. Enter Start IP
192.168.1.10and End IP192.168.1.20and click Calculate CIDRs. - The result: 11 addresses, covered by 4 CIDR blocks —
192.168.1.10/31,192.168.1.12/30,192.168.1.16/30, and192.168.1.20/32. That illustrates nicely why a range whose size isn't a power of two always needs several blocks: the greedy algorithm lays the largest aligned block at each start address. - With Copy all CIDRs you copy the list line by line — ready to paste into a rule.
- The reverse direction is on the right under CIDR → Range: enter
10.0.0.0/22there and click Show Range, and you'll see Start (network)10.0.0.0, End (broadcast)10.0.3.255, Usable hosts1,022, Total addresses1,024, plus subnet and wildcard masks. Below that is the share of the IPv4 address space:1/4,194,304. - The same works for IPv6: the Quick button
2001:db8::–1:ffffyields 131,072 addresses in exactly one block,2001:db8::/111— this range happens to be an aligned power of two.
Example 7: Split an IPv6 /48 into site networks
Your provider has assigned you a /48, and you want to know how many /56 and /64 networks it holds.
- In the Subnet Calc tab, enter
2001:db8:abcd::/48(or click the Quick button of the same name). - Subnet Details shows: Network
2001:db8:abcd::/48, First address2001:db8:abcd::, Last address2001:db8:abcd:ffff:ffff:ffff:ffff:ffff, the Expanded network in full length, Addresses1,208,925,819,614,629,174,706,176 (2^80), and /64 subnets65,536. - Under Subnet Splits you see the split at the usual boundaries:
/52(16 sub-networks),/56(256),/60(4,096), and/64(65,536), each with its first four prefixes — for instance2001:db8:abcd:100::/56as the second/56. - A
/56, which many connections get, works the same way: the Quick buttonfd00:1234::/56gives you /64 subnets256.
There's no Binary Breakdown for IPv6; the tool says so in that box.
Example 8: Decode Teredo and NAT64 addresses
Logs sometimes contain IPv6 addresses with an IPv4 address hidden inside. The converter pulls it out.
- In the Converter tab, enter the Teredo address
2001:0:4136:e378:8000:63bf:3fff:fdd2. - Address type shows
2001::/32 – Teredo tunneling (RFC 4380). Below it are Teredo server65.54.227.120and Teredo client (public IPv4:port)192.0.2.45:40000— Teredo stores the client's public address and port inverted, and the tool flips the bits back. - Now a NAT64 address:
64:ff9b::c000:221. The tool shows Mixed notation64:ff9b::192.0.2.33, Embedded IPv4192.0.2.33, and as Address type64:ff9b::/96 – IPv4/IPv6 translation (NAT64) (RFC 6052). You can also enter the mixed form64:ff9b::192.0.2.33directly.
Go deeper: the manual for every field in detail, the tips & tricks for strategy and pitfalls. You can try everything directly in the tool.