8000 GitHub - adaraiseh/p4_qos_int
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

adaraiseh/p4_qos_int

Repository files navigation

P4-INT

Implementation In­Band Network Telemetry in P4

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

environment

  • win10
  • vm-ubuntu20.04

Installation

  1. install Mininet

      git clone https://github.com/mininet/mininet
      cd mininet
    
      sudo PYTHON=python3 mininet/util/install.sh -n
    
  2. install P4

    For Ubuntu 20.04 and Ubuntu 21.04 it can be installed as follows:

      . /etc/os-release
      echo "deb http://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/home:p4lang.list
      curl -L "http://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add -
      sudo apt-get update
      sudo apt install p4lang-p4c
    
  3. python3 Dependency package

    sudo pip3 install psutil networkx
    
  4. Influxdb

    sudo apt-get install influxdb
    sudo service influxdb start
    sudo pip3 install influxdb

Usage

  1. Clone the repo
    git clone https://github.com/adaraiseh/p4_qos_int.git
  2. run the network
    make
    
  3. start the influxdb collector:
    sudo python3 report_collector/influxdb_export.py
    
  4. start RL_Agent:
    python3 rl_agent_3.py
    

Hosts terminal tests:

  1. in mininet terminal
    xterm h1 h2
  2. in xterm h2
    python3 ./receive.py
  3. in xterm h1
    python3 ./send.py --ip 10.0.1.1 --l4 udp --port 8080 --m "hello world !" --c 1    

influxdb operation

INSERT flow_latency,src_ip="10.0.1.1",dst_ip="10.0.3.2",src_port=1234,dst_port=1234,protocol=17 value=0.64
INSERT switch_latency,switch_id=1 value=0.64
INSERT queue_occupancy,switch_id=1,queue_id=1 value=0.1
INSERT link_latency,ingress_switch_id=2,ingress_port_id=1,egress_switch_id=1,egress_port_id=2 value=

SELECT * FROM flow_latency
drop measurement flow_latency

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0