Skip to content

hyperpolymath/ipv6-only

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

76 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

IPv6-Only Tools

A comprehensive toolkit for IPv6-only networking, featuring utilities for address manipulation, network analysis, diagnostics, and testing.

🌟 Features

Python Library

  • IPv6 Address Manipulation: Validation, compression, expansion, and format conversion

  • Network Calculator: Subnet planning, CIDR calculations, and network analysis

  • Address Generation: Link-local, ULA, random addresses, and MAC-to-IPv6 (EUI-64)

  • Utilities: Reverse DNS, subnet masks, address type detection

Command-Line Tools

  • ipv6-calc - Network subnet calculator

  • ipv6-validate - Address and network validator

  • ipv6-gen - Address generator (link-local, ULA, random, from MAC)

  • ipv6-convert - Format converter (compress, expand, binary, hex, reverse DNS)

Shell Scripts

  • ipv6-diag.sh - Comprehensive IPv6 diagnostics tool

  • ipv6-config.sh - IPv6 configuration helper

Web Application

Modern, responsive web interface featuring: - Address validator with type detection - Network calculator with CIDR analysis - Format converter - Address generator - Subnet planner

Go Tools

  • ipv6-ping - High-performance IPv6 ping utility

  • ipv6-scan - Fast IPv6 network scanner

πŸ“¦ Installation

Python Package

= Clone the repository
git clone https://github.com/Hyperpolymath/ipv6-only.git
cd ipv6-only

= Install the package
pip install -e .

= Or install with development dependencies
pip install -e ".[dev]"

Go Tools

cd src/go

= Build ping tool
go build -o ../../bin/ipv6-ping ./cmd/ipv6-ping

= Build scanner
go build -o ../../bin/ipv6-scan ./cmd/ipv6-scan

Shell Scripts

= Scripts are in src/scripts/
= Make them executable
chmod +x src/scripts/*.sh

= Add to PATH or run directly
./src/scripts/ipv6-diag.sh

πŸš€ Quick Start

Python Library

from ipv6tools import IPv6Address, IPv6Network, IPv6SubnetCalculator

= Create and manipulate addresses
addr = IPv6Address("2001:db8::1")
print(addr.compressed)  # 2001:db8::1
print(addr.exploded)    # 2001:0db8:0000:0000:0000:0000:0000:0001
print(addr.get_address_type())  # Global Unicast

= Network operations
net = IPv6Network("2001:db8::/32")
print(net.contains("2001:db8::1"))  # True

= Subnet calculations
calc = IPv6SubnetCalculator("2001:db8::/32")
subnets = calc.divide_into_subnets(4)
for subnet in subnets:
    print(subnet.network)

Command-Line Tools

= Validate an address
ipv6-validate 2001:db8::1 fe80::1%eth0

= Calculate network information
ipv6-calc 2001:db8::/32 --info

= Divide network into subnets
ipv6-calc 2001:db8::/32 --divide 16

= Generate link-local address
ipv6-gen link-local

= Convert MAC to IPv6
ipv6-gen from-mac 00:11:22:33:44:55

= Compress address
ipv6-convert 2001:0db8:0000:0000:0000:0000:0000:0001 --compress

Shell Scripts

= Run diagnostics
sudo ./src/scripts/ipv6-diag.sh

= Quick connectivity check
./src/scripts/ipv6-diag.sh --quick

= Show current IPv6 configuration
sudo ./src/scripts/ipv6-config.sh show

= Enable privacy extensions
sudo ./src/scripts/ipv6-config.sh enable-privacy

= Configure static address
sudo ./src/scripts/ipv6-config.sh static eth0 2001:db8::10 64

Go Tools

= Ping an IPv6 address
./bin/ipv6-ping -c 4 2001:4860:4860::8888

= Scan a network
./bin/ipv6-scan -n 2001:db8::/120 -p 80,443,22

= Scan with more workers
./bin/ipv6-scan -n 2001:db8::/64 -w 200 -v

Web Application

Simply open src/web/index.html in your browser. All tools run locally with no server required.

πŸ“š Documentation

Address Types

The library recognizes these IPv6 address types: - Loopback (::1) - Local loopback - Unspecified (::) - Unspecified address - Link-Local (fe80::/10) - Local network communication - Unique Local (fc00::/7) - Private addresses - Multicast (ff00::/8) - Group communication - Global Unicast (2000::/3) - Public routable addresses

Network Operations

Subnet Division

calc = IPv6SubnetCalculator("2001:db8::/32")

= Divide into N subnets
subnets = calc.divide_into_subnets(4)

= Divide by specific prefix
subnets = calc.divide_by_prefix(34)

Supernet Calculation

calc = IPv6SubnetCalculator("2001:db8::/32")
supernet = calc.get_supernet(24)

Address Testing

net = IPv6Network("2001:db8::/32")
print(net.contains("2001:db8::1"))  # True
print(net.overlaps(IPv6Network("2001:db8:1::/48")))  # True

Address Generation

from ipv6tools.utils import generate_link_local

= Random link-local
addr = generate_link_local()

= With specific interface ID
addr = generate_link_local("0000000000000001")

Unique Local Addresses (ULA)

from ipv6tools.utils import generate_unique_local

= Random ULA
addr = generate_unique_local()

= With specific parameters
addr = generate_unique_local(
    global_id="0123456789",
    subnet_id="abcd",
    interface_id="0000000000000001"
)

MAC to IPv6 (EUI-64)

from ipv6tools.utils import mac_to_ipv6_link_local

addr = mac_to_ipv6_link_local("00:11:22:33:44:55")
= Returns: fe80::211:22ff:fe33:4455

πŸ§ͺ Testing

Run Python Tests

= Install test dependencies
pip install -e ".[dev]"

= Run all tests
pytest tests/

= Run with coverage
pytest --cov=ipv6tools tests/

= Run specific test file
pytest tests/python/test_address.py -v

Test Web Tools

Open src/web/index.html in a browser and test each tab: 1. Validator - Try various IPv6 addresses 2. Calculator - Calculate network information 3. Converter - Convert between formats 4. Generator - Generate different address types 5. Subnet Planner - Plan subnet allocations

🐳 Docker

Build and run in Docker:

= Build image
docker build -t ipv6-only .

= Run interactively
docker run -it --rm ipv6-only

= Run specific tool
docker run --rm ipv6-only ipv6-validate 2001:db8::1

πŸ”§ Development

Setup Development Environment

= Clone repository
git clone https://github.com/Hyperpolymath/ipv6-only.git
cd ipv6-only

= Install in development mode
pip install -e ".[dev]"

= Run tests
pytest

= Format code
black src/python/ipv6tools/

= Lint
flake8 src/python/ipv6tools/

Project Structure

ipv6-only/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ python/          # Python library
β”‚   β”‚   └── ipv6tools/   # Main package
β”‚   β”œβ”€β”€ go/              # Go tools
β”‚   β”‚   └── cmd/         # Command-line tools
β”‚   β”œβ”€β”€ web/             # Web application
β”‚   └── scripts/         # Shell scripts
β”œβ”€β”€ tests/               # Test suites
β”‚   β”œβ”€β”€ python/          # Python tests
β”‚   └── go/              # Go tests
β”œβ”€β”€ docs/                # Documentation
β”œβ”€β”€ examples/            # Usage examples
└── docker/              # Docker configurations

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository

  2. Create a feature branch

  3. Add tests for new functionality

  4. Ensure all tests pass

  5. Submit a pull request

πŸ“ License

MIT License - see LICENSE file for details

πŸ”— Resources

RFCs

Tools

  • iproute2 - Modern Linux networking tools

  • nmap - Network scanning with IPv6 support

  • wireshark - Packet analysis

πŸ“Š Examples

See the examples/ directory for: - Network planning scripts - Address management examples - Integration examples - Testing scenarios

⚑ Performance

The Go tools are optimized for performance: - ipv6-ping: Concurrent pinging with configurable workers - ipv6-scan: Fast network scanning with worker pools

Python library uses pure Python with no external dependencies for core functionality.

πŸ›‘οΈ Security

When using security scanning tools: - Only scan networks you own or have permission to scan - Be aware of rate limiting and network policies - Use responsibly for authorized testing only

πŸ’¬ Support

About

IPv6-only network profile tool (aerie/network). Dual-use with ambientops subset.

Topics

Resources

License

MPL-2.0 and 2 other licenses found

Licenses found

MPL-2.0
LICENSE
Unknown
LICENSE.txt
MIT
licence.txt

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

 
 
 

Contributors