Skip to main content

Distributed Software Defined Network Emulation

Project description

Clusternet

This project extends the Containernet emulation environment to span the emulation across several physical machines.

Dependencies

Install

sudo pip install -U git+https://github.com/EsauM10/clusternet.git

Usage

Run a Worker in a machine with:

sudo RunWorker -p=5000

Choose a machine to run an Openflow Controller with:

controller -v ptcp=6633

And then, create a topoly and save to a file.

from clusternet.client import RemoteWorker

worker = RemoteWorker(ip='192.168.0.152', port=5000)

try:
    worker.add_controller('c0', ip='192.168.0.152', port=6633)
    worker.add_switch('s1')
    d1 = worker.add_docker(name='d1', ip='10.0.0.1', dimage='ubuntu:trusty')
    d2 = worker.add_docker(name='d2', ip='10.0.0.2', dimage='ubuntu:trusty')

    worker.add_link('d1', 's1')
    worker.add_link('d2', 's1')

    worker.start()
    worker.run_pingall()
    
    print(d1.cmd('ifconfig'))
    print(d2.cmd(f'ping -c 4 {d1.get_ip()}'))

except Exception as ex:
    print(ex)
finally:
    worker.stop()

This example runs one worker and the Openflow Controller in the same machine, make sure the IP addresses and ports are configured correctly and run it with:

sudo python3 topology.py

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

clusternet-0.9.3.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

clusternet-0.9.3-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file clusternet-0.9.3.tar.gz.

File metadata

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

File hashes

Hashes for clusternet-0.9.3.tar.gz
Algorithm Hash digest
SHA256 70bd3279af6f50fd77f7ed152059787280283fea254e814aece551e19ec35f3d
MD5 0aecf402eacbe2435a21ee176890260e
BLAKE2b-256 ec88a7d4adfdcdc746edfb2ea31833959649c6336a688e0a8cfbc88c5b69cac5

See more details on using hashes here.

Provenance

The following attestation bundles were made for clusternet-0.9.3.tar.gz:

Publisher: python-publish.yml on EsauM10/clusternet

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

File details

Details for the file clusternet-0.9.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for clusternet-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 598f38d8e4b9c8a11ae2bb26e401a680f3c28ea6e19e5100674673bbc3ed57e6
MD5 d0537625c4087bee6bcc021ce105e836
BLAKE2b-256 a5f34201855db77bb1a62e6cd4fe870b73a74a887581ce00f4258f1f6a0f9491

See more details on using hashes here.

Provenance

The following attestation bundles were made for clusternet-0.9.3-py3-none-any.whl:

Publisher: python-publish.yml on EsauM10/clusternet

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