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.

  1. Switch to the Subnet Calc tab and enter 192.168.1.0/24. Press Calculate or Enter to run. (The Quick button 192.168.1.1/24 leads to the same network; since .1 isn'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.")
  2. In Subnet Details you read off: Network Address 192.168.1.0, Broadcast 192.168.1.255, Subnet Mask 255.255.255.0, Wildcard Mask 0.0.0.255, First Usable Host 192.168.1.1, Last Usable Host 192.168.1.254, Usable Hosts 254, Total Addresses 256, IP Class C, IP Type 192.168.0.0/16 – Private network (RFC 1918).
  3. 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.

  1. 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.
  2. 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, Broadcast 192.168.1.191, Subnet Mask 255.255.255.192, Wildcard Mask 0.0.0.63, First Usable Host 192.168.1.129, Last Usable Host 192.168.1.190, Usable Hosts 62, Total Addresses 64. So .130 lives in the third of four /26 blocks (.128–.191).
  3. Under Subnet Splits, the tool shows how this /26 could be divided further — the next narrower prefixes /27, /28, /29, and /30 with 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.

  1. Switch to the Converter tab and enter 192.168.1.1 (or use the example button).
  2. The table gives you: Hexadecimal 0xC0A80101, Decimal integer 3232235777, 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 prefix 2002:c0a8:0101::/48, and Reverse DNS 1.1.168.192.in-addr.arpa. Each of these rows has a copy button (Address type doesn't).
  3. 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 as 0.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.

  1. In the Converter tab, enter the written-out address 2001:0db8:0000:0000:0000:0000:0000:0001.
  2. The table shows Compressed IPv6 (RFC 5952) 2001:db8::1 and Expanded IPv6 2001:0db8:0000:0000:0000:0000:0000:0001. So you get both directions at once.
  3. Address type shows 2001:db8::/32 – Documentation (RFC 3849) — the range set aside specifically for examples.
  4. 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.

  1. Open the IPv6 ULA tab. It generates a ULA automatically the first time you open it; Generate Random ULA rolls a new one.
  2. You get four values, each copyable — as an example: /48 Prefix fd3f:9a21:7c4e::/48, /64 Example Subnet fd3f:9a21:7c4e:0001::/64, Example Host Address fd3f: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.)
  3. 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.
  4. How to use it: assign the /48 to your location; the 16-bit Subnet ID (0001, 0002, …) gives you 65,536 possible /64 sub-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.

  1. Switch to the IP Range tab, left card Range → CIDRs. Enter Start IP 192.168.1.10 and End IP 192.168.1.20 and click Calculate CIDRs.
  2. The result: 11 addresses, covered by 4 CIDR blocks — 192.168.1.10/31, 192.168.1.12/30, 192.168.1.16/30, and 192.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.
  3. With Copy all CIDRs you copy the list line by line — ready to paste into a rule.
  4. The reverse direction is on the right under CIDR → Range: enter 10.0.0.0/22 there and click Show Range, and you'll see Start (network) 10.0.0.0, End (broadcast) 10.0.3.255, Usable hosts 1,022, Total addresses 1,024, plus subnet and wildcard masks. Below that is the share of the IPv4 address space: 1/4,194,304.
  5. The same works for IPv6: the Quick button 2001:db8::–1:ffff yields 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.

  1. In the Subnet Calc tab, enter 2001:db8:abcd::/48 (or click the Quick button of the same name).
  2. Subnet Details shows: Network 2001:db8:abcd::/48, First address 2001:db8:abcd::, Last address 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff, the Expanded network in full length, Addresses 1,208,925,819,614,629,174,706,176 (2^80), and /64 subnets 65,536.
  3. 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 instance 2001:db8:abcd:100::/56 as the second /56.
  4. A /56, which many connections get, works the same way: the Quick button fd00:1234::/56 gives you /64 subnets 256.

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.

  1. In the Converter tab, enter the Teredo address 2001:0:4136:e378:8000:63bf:3fff:fdd2.
  2. Address type shows 2001::/32 – Teredo tunneling (RFC 4380). Below it are Teredo server 65.54.227.120 and 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.
  3. Now a NAT64 address: 64:ff9b::c000:221. The tool shows Mixed notation 64:ff9b::192.0.2.33, Embedded IPv4 192.0.2.33, and as Address type 64:ff9b::/96 – IPv4/IPv6 translation (NAT64) (RFC 6052). You can also enter the mixed form 64:ff9b::192.0.2.33 directly.

Go deeper: the manual for every field in detail, the tips & tricks for strategy and pitfalls. You can try everything directly in the tool.