subnet-calc

CIDR and subnet calculator for network engineers. Calculate network address, broadcast, host range, subnet mask, wildcard mask, and more from CIDR notation. Supports IPv4 and IPv6, containment checks, and subnet splitting. Use when working with IP addresses, subnets, network planning, CIDR calculations, or checking if an IP is within a range.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "subnet-calc" with this command: npx skills add johnnywang2001/subnet-calc

Subnet Calc

CIDR/subnet calculator CLI. IPv4 and IPv6 support with no external dependencies.

Quick Start

# Basic subnet calculation
python3 scripts/subnet_calc.py 192.168.1.0/24

# JSON output
python3 scripts/subnet_calc.py 10.0.0.0/8 -f json

# Check if IP is in a network
python3 scripts/subnet_calc.py 172.16.0.0/16 --contains 172.16.5.10

# Split into smaller subnets
python3 scripts/subnet_calc.py 192.168.0.0/22 --split 24

# IPv6
python3 scripts/subnet_calc.py 2001:db8::/32

Output Fields (IPv4)

  • CIDR — Normalized CIDR notation
  • Network/Broadcast Address — First and last address in the range
  • Subnet Mask / Wildcard Mask — Standard and inverted masks
  • Total Addresses / Usable Hosts — Address count minus network and broadcast
  • First/Last Host — Usable host range
  • Binary representations — Network and mask in binary
  • Flags — Private, loopback, multicast, link-local detection

Options

FlagDescription
-f, --formatplain or json output
--contains IPCheck if IP is within the network
--split PREFIXSplit into subnets with given prefix (IPv4)

Notes

  • Python 3 stdlib only (uses ipaddress module)
  • Handles /31 (RFC 3021 point-to-point) and /32 correctly
  • Input is normalized with strict=False (host bits are masked)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

GigaChat (Sber AI) Proxy

Integrate GigaChat (Sber AI) with OpenClaw via gpt2giga proxy

Registry SourceRecently Updated
3600smvlx
General

TencentCloud Video Face Fusion

通过提取两张人脸核心特征并实现自然融合,支持多种风格适配,提升创意互动性和内容传播力,广泛应用于创意营销、娱乐互动和社交分享场景。

Registry SourceRecently Updated
General

TencentCloud Image Face Fusion

图片人脸融合(专业版)为同步接口,支持自定义美颜、人脸增强、牙齿增强、拉脸等参数,最高支持8K分辨率,有多个模型类型供选择。

Registry SourceRecently Updated
General

YoudaoNote News

有道云笔记资讯推送:基于收藏笔记分析关注话题,推送最新相关资讯。支持对话触发与每日定时推送(如早上9点)。触发词:资讯推送、设置资讯推送、生成资讯推送。

Registry SourceRecently Updated
1.5K1lephix