Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

115 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

fromipv6toolsimportIPv6Address, IPv6Network, IPv6SubnetCalculator=Createandmanipulateaddressesaddr=IPv6Address("2001:db8::1")
print(addr.compressed) # 2001:db8::1print(addr.exploded) # 2001:0db8:0000:0000:0000:0000:0000:0001print(addr.get_address_type()) # Global Unicast=Networkoperationsnet=IPv6Network("2001:db8::/32")
print(net.contains("2001:db8::1")) # True=Subnetcalculationscalc=IPv6SubnetCalculator("2001:db8::/32")
subnets=calc.divide_into_subnets(4)
forsubnetinsubnets:
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")
=DivideintoNsubnetssubnets=calc.divide_into_subnets(4)
=Dividebyspecificprefixsubnets=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")) # Trueprint(net.overlaps(IPv6Network("2001:db8:1::/48"))) # True

Address Generation

fromipv6tools.utilsimportgenerate_link_local=Randomlink-localaddr=generate_link_local()
=WithspecificinterfaceIDaddr=generate_link_local("0000000000000001")

Unique Local Addresses (ULA)

fromipv6tools.utilsimportgenerate_unique_local=RandomULAaddr=generate_unique_local()
=Withspecificparametersaddr=generate_unique_local(
global_id="0123456789",
subnet_id="abcd",
interface_id="0000000000000001"
)

MAC to IPv6 (EUI-64)

fromipv6tools.utilsimportmac_to_ipv6_link_localaddr=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

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages