Skip to main content

The main task of this daemon is to interact with the gobgp and ovs to provide a connection using the EVPN protocol

Project description

evpn-connector

Python Version License

A service for automating the management distributed switch or router based on EVPN standards

Key Features

  • EVPN Standards Support:
    • RFC 7432: BGP MPLS-Based Ethernet VPN
    • RFC 8365: Network Virtualization Overlay
    • RFC 7988: Ingress Replication Tunnels in Multicast VPN
    • RFC 9135: Integrated Routing and Bridging in Ethernet VPN
    • RFC 9136: IP Prefix Advertisement in Ethernet VPN
  • Hardware Integration: Interaction with the hardware switch and routers via EVPN
  • GoBGP Integration: Interaction with the gobgpd daemon to pull or push EVPN annouces
  • OpenvSwitch Management: Direct management of bridges and flows within the OpenvSwitch system
  • Reconciliation Loop Design: Built on a closed-loop control architecture to ensure fault tolerance and reduce the impact of external factors
  • Configurability: Flexible setup via INI daemon configuration files and JSON clients configuration files

Documentation

The details of the EVPN's operation and evpn-connector daemon workflow are described in the presentation (in Russian only).

Installation & Quick Start

Prerequisites

  • **Python 3.8
  • System Dependencies:
    • gobgp (for interaction via BGP within the EVPN control plane)
    • openvswitch-switch (for interaction via VXLAN within the EVPN data plane)
  • Permissions: Requires root privileges for interaction with OpenvSwitch
  1. Install dependencies:

    On Ubuntu/Debian:

    sudo apt update
    sudo apt install openvswitch-switch openvswitch-common gobgpd
    

    On CentOS/RHEL:

    sudo yum install gobgp openvswitch
    # or for newer versions:
    # sudo dnf install gobgp openvswitch
    
  2. (Optional) Install latest GoBGP from binary release:

    wget https://github.com/osrg/gobgp/releases/download/v3.34.0/gobgp_3.34.0_linux_amd64.tar.gz
    mkdir gobgp
    tar -xf gobgp_3.34.0_linux_amd64.tar.gz -C gobgp/
    
  3. (Recommended) Create a virtual environment: Recommended installation gobgp versions >= v3.34

    python3 -m venv evpn
    source evpn/bin/activate
    pip install --upgrade pip setuptools
    
  4. Install evpn-connector:

    pip install evpn-connector
    

Configuration

Before the first run, you need to create a configuration file.

  1. GoBGP config: Copy the example configuration file and adapt it to your environment.

    cp etc/gobgpd/gobgp.conf.sample /etc/gobgpd/gobgp.conf
    

    It is necessary to configure gobgp so that all nodes can exchange announces with afi-safi "l2evpn-evpn"

  2. evpn-connector config: Copy the example configuration file and adapt it to your environment.

    mkdir /etc/evpn_connector/
    cp etc/evpn_connector/logging.yaml /etc/evpn_connector/logging.yaml
    cp etc/evpn_connector/evpn_connector.cfg.sample /etc/evpn_connector/evpn_connector.conf
    
  3. Edit /etc/evpn_connector/evpn_connector.conf: Specify the necessary parameters:

    • [gobgp] section: Settings for connecting to the GoBGP daemon
      • [gobgp] source_ip: Source IP address for all VXLAN packets
    • [ovs] section: Settings for OpenvSwitch dataplane parameters
      • [ovs] switch_name: Name of switch created in OvS
    • [daemon] section: Settings for evpn_connector daemon
      • [daemon] configs_dir: Path to client configs
  4. Client configs: Create clients configs. Example config:

    • For L2 connectivity
      {
      "cfg_type": "l2",           // Config type for L2 connectivity use "l2"
      "mac": "36:e7:a5:7e:0c:81", // MAC address of client
      "ip": "10.0.0.1",           // IP address of client
      "vni": 10,                  // VXLAN segment identifier
      "ofport": 1000,             // OpenFlow port number in current OpenvSwitch switch
      "type": "flat",             // OpenvSwitch port type. May be "flat" and "vlan"
      "tag": 0,                   // OpenvSwitch port segment identifier. Ignored on "flat"
      "imp_rt": ["65000:10"],     // List of imported BGP Route Targets
      "exp_rt": ["65000:10"]      // List of exported BGP Route Targets
      }
      
    • For L3 connectivity
      {
      "cfg_type": "l3",           // Config type for L3 connectivity use "l3"
      "mac": "36:e7:a5:7e:0c:81", // MAC address of client
      "routes": ["10.0.0.1/32"],  // List of CIDR prefixes for this client
      "vni": 10,                  // VXLAN segment identifier
      "ofport": 1000,             // OpenFlow port number in current OpenvSwitch switch
      "type": "flat",             // OpenvSwitch port type. May be "flat" and "vlan"
      "tag": 0,                   // OpenvSwitch port segment identifier. Ignored on "flat"
      "imp_rt": ["65000:10"],     // List of imported BGP Route Targets
      "exp_rt": ["65000:10"]      // List of exported BGP Route Targets
      }
      

    Need create json config for all clients in configs_dir

    mkdir /var/lib/evpn_connector/client_configs/
    vim /var/lib/evpn_connector/client_configs/vm1.json
    

Running the Service

Start the service by specifying the path to your configuration file:

  1. Run GoBGP:
    sudo gobgpd -f /etc/gobgpd/gobgp.conf
    
  2. Run evpn-connector
    source evpn/bin/activate
    evpn-connector --config-file ~/evpn/config/evpn_connector.cfg --daemon-configs_dir "/var/lib/evpn_connector/client_configs/"
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evpn_connector-2.2.1.tar.gz (84.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evpn_connector-2.2.1-py3-none-any.whl (81.8 kB view details)

Uploaded Python 3

File details

Details for the file evpn_connector-2.2.1.tar.gz.

File metadata

  • Download URL: evpn_connector-2.2.1.tar.gz
  • Upload date:
  • Size: 84.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for evpn_connector-2.2.1.tar.gz
Algorithm Hash digest
SHA256 e46ad4e61d907a1638214190210758cc8949f3842110a76be023849a1a72b3bb
MD5 39e10f1ba03a929da69623cd84182282
BLAKE2b-256 bb66060d0627473e047437d037c66ff99af004b4a04bb060bd6498f899a7eb47

See more details on using hashes here.

Provenance

The following attestation bundles were made for evpn_connector-2.2.1.tar.gz:

Publisher: publish-to-pypi.yml on vktechdev/evpn_connector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file evpn_connector-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: evpn_connector-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 81.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for evpn_connector-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac838b08e9d33d028a0a2ad73bed51da61395b157884bc4b8a184bb0bc459561
MD5 0f9be1b0235f85c99e925c14f1249bd2
BLAKE2b-256 edad75b4a6f1a049405573b84f4b5c437bb84b3d050e2da1400e18ab34dafe9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for evpn_connector-2.2.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on vktechdev/evpn_connector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page