Giter Site home page Giter Site logo

vpc-free's Introduction

vpc-free

This script searches for the largest available IP subnets within the unallocated spaces between your VPC subnets, or between VPCs for a given CIDR block.

free address blocks in a VPC

Installation

Install vpc-free to /usr/local/bin with:

$ pip install vpc-free

The script uses the Amazon AWS SDK (boto3) to connect to AWS. The SDK must be configured with credentials to connect to the AWS APIs. Please see the Boto3 documentation for instruction.

Usage

$ vpc-free -h
usage: vpc-free [-h] TARGET

Find free IP blocks in AWS EC2.

positional arguments:
  TARGET      CIDR, VPC ID or VPC Name to search

optional arguments:
  -h, --help  show this help message and exit

Examples

# search for unallocated blocks between VPCs in 10.0.0.0/8
$ vpc-free 10.0.0.0/8
MIN IP    MAX IP         MASK SIZE     BEST         LABEL
10.0.0.0  10.63.255.255  /10  4194304  10.0.0.0/10  FREE
10.64.0.0 10.64.255.255  /16  65536                 vpc-c4871ca0 (Demo)
10.65.0.0 10.255.255.255      12517376 10.128.0.0/9 FREE

# search for unallocated blocks between subnets in a VPC
$ vpc-free vpc-c4671caf
10.64.0.0  10.64.15.255  /20  4096                 subnet-74247002 (Subnet 1)
10.64.16.0 10.64.31.255  /20  4096                 subnet-d32421a5 (Subnet 2)
10.64.32.0 10.64.47.255  /20  4096  10.64.32.0/20  FREE
10.64.48.0 10.64.63.255  /20  4096                 subnet-0a257077 (Subnet 4)
10.64.64.0 10.64.255.255      49152 10.64.128.0/17 FREE

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.