返回顶部
s

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
104
下载量
0
收藏
概述
安装方式
版本历史

subnet-calc

# Subnet Calc CIDR/subnet calculator CLI. IPv4 and IPv6 support with no external dependencies. ## Quick Start ```bash # 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 | Flag | Description | |------|-------------| | `-f, --format` | `plain` or `json` output | | `--contains IP` | Check if IP is within the network | | `--split PREFIX` | Split 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)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 subnet-calc-1776121220 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 subnet-calc-1776121220 技能

通过命令行安装

skillhub install subnet-calc-1776121220

下载 Zip 包

⬇ 下载 subnet-calc v1.0.0

文件大小: 3.64 KB | 发布时间: 2026-4-14 11:46

v1.0.0 最新 2026-4-14 11:46
Initial release of subnet-calc.

- Calculate network address, broadcast, first/last host, subnet mask, wildcard mask, and address counts from CIDR.
- Supports both IPv4 and IPv6.
- Check if an IP is within a given network.
- Split a network into smaller subnets by prefix length.
- Outputs in plain text or JSON formats.
- Includes detection for private, loopback, multicast, and link-local ranges.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部