Coder Social home page Coder Social logo

dvb_gse_tunnel's Introduction

dvb_gse_tunnel

A tunnel that connects two tap interfaces through udp using the gse protocol.

Directory Description
c Source code written in C to perform a GSE tunnel
rust Source code written in Rust to perform a GSE tunnel
rust_testimonial Source code written in Rust to perform a transparent tunnel, to measure the TUNTAP impact

Requirements

Before using this software, ensure you have the following prerequisites installed on your system:

  • Cargo and Rust: Ensure you have Cargo, the Rust package manager, and the Rust compiler installed. You can install them by following the instructions on the official Rust website.

  • GCC: Ensure you have GCC (GNU Compiler Collection) installed on your system. You can typically install GCC through your system's package manager.

  • aclocal: This software requires aclocal to be installed on your system. You can typically install aclocal as part of the GNU Autoconf package. On Debian-based systems, you can install it by running

    • sudo apt-get install autoconf
  • libgse (language C): You also need the C libgse. Follow these instructions to install it.

    • First, you need to add the Net4Sat repository GPG Key:
      • sudo mkdir /etc/apt/keyrings
      • curl -sS https://raw.githubusercontent.com/CNES/net4sat-packages/master/gpg/net4sat.gpg.key | gpg --dearmor | sudo dd of=/etc/apt/keyrings/net4sat.gpg
    • Then, update sources.list with net4sat opensand repository
      • cat << EOF | sudo tee /etc/apt/sources.list.d/github.net4sat.sources
        Types: deb
        URIs: https://raw.githubusercontent.com/CNES/net4sat-packages/master/jammy/
        Suites: jammy
        Components: stable
        Signed-By: /etc/apt/keyrings/net4sat.gpg
        EOF
    • Then you can install the libgse using :
      • sudo apt update
        
      • sudo apt install libgse-dev
        
  • iperf3: iperf3 is a tool for measuring the maximum TCP and UDP bandwidth performance. You can typically install iperf3 through your system's package manager

    • sudo apt install iperf3

Compile

C

host$ cd c
host$ ./autogen.sh
host$ make

Rust

host$ cd rust
host$ cargo build --release

Testbed

The scripts to handle the testbed are stored in the testbed directory.

Using network namespaces

This testbed uses 2 network namespaces on a host, connected by 2 veth pairs of interfaces:

  • one for the forward link (the encapsulated one);
  • one for the return link.

To set up this testbed:

host$ sudo ./testbed/testbed-netns.sh setup

To clean up this testbed:

host$ sudo ./testbed/testbed-netns.sh cleanup

To start the encapsulation binaries of this testbed:

host$ sudo ./testbed/testbed-netns.sh start BIN_DIR

where BIN_DIR can be:

  • c/src/tap_udp
  • rust/target/release
  • rust_testimonial/target/release
  • other...

To stop the encapsulation binaries of this testbed:

host$ sudo ./testbed/testbed-netns.sh stop

Once the testbed is set up and started, tests can be performed:

  • ping
host$ sudo ip netns exec encap_tx ping -I 10.0.0.254 -c 4 10.0.0.1
host$ sudo ip netns exec encap_rx ping -I 10.0.0.1 -c 4 10.0.0.254
  • iperf3
host$ sudo ip netns exec encap_rx iperf3 -B 10.0.0.1 -s
host$ sudo ip netns exec encap_tx iperf3 -B 10.0.0.254 -c 10.0.0.1 -ub 500M

Using hosts

This testbed uses 2 hosts, connected on the same network.

To set up this testbed:

host1$ sudo ./testbed/testbed-host-encap.sh setup IFACE1
host2$ sudo ./testbed/testbed-host-decap.sh setup IFACE2

where IFACE1 is the network interface of the host 1 and IFACE2 is the one of the host 2 used to connect them together.

To clean up this testbed:

host1$ sudo ./testbed/testbed-host-encap.sh cleanup
host2$ sudo ./testbed/testbed-host-decap.sh cleanup

To start the encapsulation binaries of this testbed:

host1$ sudo ./testbed/testbed-host-encap.sh start BIN_DIR
host2$ sudo ./testbed/testbed-host-decap.sh start BIN_DIR

where BIN_DIR can be:

  • c/src/tap_udp
  • rust/target/release
  • rust_testimonial/target/release
  • other...

To stop the encapsulation binaries of this testbed:

host1$ sudo ./testbed/testbed-host-encap.sh stop
host2$ sudo ./testbed/testbed-host-decap.sh stop

Once the testbed is set up and started, tests can be performed:

  • ping
host1$ ping -I 10.0.0.254 -c 4 10.0.0.1
host2$ ping -I 10.0.0.1 -c 4 10.0.0.254
  • iperf3
host2$ iperf3 -B 10.0.0.1 -s
host1$ iperf3 -B 10.0.0.254 -c 10.0.0.1 -ub 500M

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.