Giter Club home page Giter Club logo

appnetlab's Introduction

NetLab README

Overview

NetLab is a Go-based program designed to create isolated network environments using network namespaces. It provides the capability to limit bandwidth and monitor traffic within these environments. This tool is particularly useful for network engineers and developers who need to test applications or services in a controlled network setting.

Features

Isolated Network Namespaces: Create separate network namespaces to simulate different network environments. Bandwidth Limitation: Specify upload and download bandwidth limits for each namespace. Internet Connectivity: Option to set up NAT for external internet access from within the namespace.

Traffic Monitoring: Keep an eye on the network traffic that flows through the namespace. Installation

Before you can use NetLab, you need to have Go installed on your system. You can download and install Go from the official website: https://golang.org/dl/.

Once Go is installed, you can install NetLab by cloning the repository and building the program:

git clone https://github.com/yourusername/netlab.git
cd netlab
go build

Usage

To create a new network Lab, use the following command:

sudo ./netlab create --ip 192.168.137.5 --name test02 --int true -u 100 -d 100

Command-Line Arguments --ip: Assign an IP address to the namespace. --name: Set a name for the namespace. --int: Enable NAT for internet access (set to true or false). -u: Set the upload bandwidth limit in kbps (Kilobits per second). -d: Set the download bandwidth limit in kbps (Kilobits per second). Example The following example command creates Terminal inside of network namespace named net-lab-test02 with an IP address of 192.168.137.5, NAT enabled for internet access, and bandwidth limits of 100 kbps for both upload and download.

This will create a new bash terminal inside a namespace with a limited speed, to exit the terminal inside the namespace just run "exit".

monitor network traffic

open other new terminal (no inside of bash namespace) and run:

sudo ./netlab  monitor --name test02

Dependencies

NetLab requires the following dependencies to be installed on your system:

iproute2: For network namespace and traffic control. iptables: For setting up NAT if internet access is required.

Limitations

NetLab must be run with superuser privileges to manage network namespaces and iptables. Bandwidth limits are approximate and depend on the underlying traffic control system.

Contributing

Contributions to NetLab are welcome! Please submit pull requests to the repository or report any issues you encounter.

License

NetLab is licensed under the MIT License. See the LICENSE file for more details.

Please note that this README assumes that the NetLab program and its features are already implemented. If you are still in the development phase, you will need to adjust the installation and usage instructions accordingly.

appnetlab's People

Contributors

fdiaz-ac avatar franklin83diaz 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.