Giter Club home page Giter Club logo

oferchen / tunnel_manager Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 89 KB

Tunnel Manager is a Python/Golang script that allows you to create and manage tunnels between two network bridges. It simplifies the process of setting up VXLAN/GENEVE tunnels for virtual network overlays.

License: GNU General Public License v3.0

Python 82.39% Go 17.61%
bridges linux networking vxlan configuration management geneve cli-app interface python3 tunnel tunneling brctl ip ipv4 ipv6

tunnel_manager's Introduction

Tunnel Manager

Tunnel Manager is a Python/Golang script for managing VXLAN and GENEVE tunnel interfaces between bridges.

Features

  • Create and manage VXLAN and GENEVE tunnel interfaces.
  • Validate connectivity between tunnel endpoints.
  • List all tunnel interfaces with various output formats.

Prerequisites

Before using Tunnel Manager, ensure you have the following prerequisites installed and available on your system:

  • Python 3.x
  • The ip command-line tool (for creating and managing tunnel interfaces)
  • The brctl command-line tool (optional, for managing bridges)

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/yourusername/tunnel-manager.git
    cd tunnel-manager

Tunnel Manager

The Tunnel Manager is a Python script for managing VXLAN and GENEVE tunnels between bridges. It provides functionality for creating, cleaning up, validating, and listing tunnel interfaces.

Features

  • Supports both VXLAN and GENEVE tunnel types.
  • Create and manage tunnel interfaces between bridges.
  • Validate connectivity between source and destination hosts.
  • List existing tunnel interfaces.

Prerequisites

Before using the Tunnel Manager, ensure you have the following prerequisites installed:

  • Python 3
  • Required Python packages (can be installed via pip):
    • argparse
    • csv
    • io
    • json
    • logging
    • re
    • shutil
    • socket
    • subprocess
    • sys
    • enum
    • typing
    • xml.etree.ElementTree (standard library)
    • yaml

Usage

python tunnel_manager.py [OPTIONS] COMMAND [ARGS]...

Options:
  --tunnel-type [vxlan|geneve]
                                  Type of tunnel to create (default: vxlan)
  -h, --help                      Show this message and exit

Commands:
  create    Create a tunnel interface
  cleanup   Cleanup a tunnel interface
  validate  Validate connectivity of a tunnel interface
  list      List all tunnel interfaces

Actions

  • create Create a tunnel interface
  • cleanup Cleanup a tunnel interface
  • validate Validate connectivity of a tunnel interface
  • list List all tunnel interfaces

Examples

Create a VXLAN tunnel interface:

python tunnel_manager.py --tunnel-type vxlan create --vni 100 --src-host 10.0.0.1 --dst-host 10.0.0.2 --bridge-name br0

Cleanup a VXLAN tunnel interface:

python tunnel_manager.py --tunnel-type vxlan cleanup --vni 100 --bridge-name br0

Validate connectivity of a GENEVE tunnel interface:

python tunnel_manager.py --tunnel-type geneve validate --src-host 10.0.0.1 --dst-host 10.0.0.2 --vni 200 --port 6081

List all tunnel interfaces in JSON format:

python tunnel_manager.py --tunnel-type vxlan list --format json

Contributing

Contributions are welcome! If you have suggestions, feature requests, or want to report issues, please create an issue or submit a pull request.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Author

Ofer Chen

tunnel_manager's People

Contributors

oferchen avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.