Git Product home page Git Product logo

ipconflict's Introduction

ipconflict

Downloads ipconflict Python version

Check if two or more network subnets are overlapping.

Install

pip install ipconflict

Quick Start

  • ipconflict 10.0.0.0/22 10.0.1.0/24
  • ipconflict 10.0.0.0/22 10.0.1.1-10.0.1.5
  • ipconflict 172.16.0.0/22 172.16.1.0/24 172.16.3.0/27

Print overlapping IP addresses

  • ipconflict -p 10.0.0.0/24 10.0.0.100-10.0.0.105

Subnets from file

  • ipconflict -f /path/to/subnets

Subnets from stdin

  • echo "10.0.1.0/24 10.0.0.0/22" | ipconflict -i

Subnets from everywhere

  • echo "10.0.0.0/16" | ipconflict -i -f /path/to/subnets 192.168.0.0/24 172.25.1.17

Subnet Definition

A subnet can be specified in several ways:

  • CIDR notation 192.168.0.0/24
  • Single IP address 10.0.1.2
  • IP range 10.0.0.5-10.0.0.20

This tool works both with IPv4 and IPv6.

Exit Status

  • 0, one or more conflicts found
  • 1, no conflict found
  • 2, aborted or invalid input

ipconflict's People

Contributors

fgiuba avatar sryabkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ipconflict's Issues

does it work in 3.96 version

I get the below error when the version was updated

ERROR: Could not find a version that satisfies the requirement ipconflict (from versions: none)
ERROR: No matching distribution found for ipconflict

exit code

Would it be possible to add exit codes to be able to evaluate the outcome using scripts?. Right now, conflict or not, the exit code is always 0

nas02:/tmp/ip-test # ipconflict 10.0.0.0/22 10.0.1.0/24
100%|█████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 5275.85subnet/s]
conflict found: 10.0.0.0/22 <-> 10.0.1.0/24

nas02:/tmp/ip-test # echo $?
0
nas02:/tmp/ip-test # ipconflict 10.0.0.0/22 11.0.1.0/24
100%|█████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 5457.78subnet/s]
no conflict found
nas02:/tmp/ip-test # echo $?
0

Slow performance for large input set

I have enterprise IP subnet entry for about 13k subnets in a text file.
The command takes too long to generate output list. I guess the complexity is n-squared. Is there more efficient way to get output?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.