Code Monkey home page Code Monkey logo

findint's Introduction

[WARNING] This project was integrated into LossSight, Please see https://github.com/lzhtan/LossSight.

Demo Video: https://www.bilibili.com/video/BV1yv411t7G1

FindINT

A packet loss detection and location solution based on AM-PM and INT, suitable for Mininet environment, written in P4 language.

FindINT supports two encoding methods of Loss_Bit:

(1)SAM, Single-Bit Alternate Marking

For example, when the alternate period is 6, the INT Source Node marks the arriving telemetry data packets according to the rule of "0 0 0 1 1 1 0 0 0 1 1 1 ...".

(2)MCM, multi-bit cycle mark

For example, when the length of Loss_Bit is 2, INT Source Node marks the arriving telemetry data packets according to the rule of "00 01 10 11 00 01 10 11 ...".

By marking point by point, FindINT supports packet loss location.

result

How to use FindINT:

  1. Install P4-Tutorial mirror, recommend https://github.com/p4lang/tutorials/

  2. Find the /usr/local/share/p4c/p4include/v1model.p4 file and find:

    void read(out T result, in bit<32> index);

Add a line before this line:

 register(bit<32> size, T initial_value);

The effect is as follows:

 *              ignored by the caller.
 */
register(bit<32> size, T initial_value);
void read(out T result, in bit<32> index);
/***
 * write() writes the state of the register array at the specified
 * index, with the value provided by the value parameter.
  1. Unzip FindINT into the exercises folder and enter FindINT.

  2. Execute Make in the terminal.

  3. Test h1 ping h2 And successfully pinged.

  4. Open the terminal

    xterm h1 h2

  5. Execute in H2

    ./receive.py

  6. Execute in H1

    ./send.py 10.0.2.2 "123" 100000

100000 is the number of INT packets.

  1. The packet loss rate measurement result is observed in H2.

中文简介

FindINT支持两种丢包位(Loss_Bit)编码方式: (1)SAM,单Bit交替标记 例如,交替周期为6时,INT Source Node 按照“0 0 0 1 1 1 0 0 0 1 1 1 ...”的规律标记到达的遥测数据包。 (2)MCM,多Bit循环标记 例如,Loss_Bit长度为2时,INT Source Node 按照“00 01 10 11 00 01 10 11 ...”的规律标记到达的遥测数据包。 通过逐点标记,FindINT支持丢包定位。

使用方式:

1.安装P4-Tutorial镜像,推荐https://github.com/p4lang/tutorials/

2.找到/usr/local/share/p4c/p4include/v1model.p4文件,找到:

 void read(out T result, in bit<32> index);

在该行前面添加一行:

 register(bit<32> size, T initial_value);

效果如下:

 *              ignored by the caller.
 */
register(bit<32> size, T initial_value);
void read(out T result, in bit<32> index);
/***
 * write() writes the state of the register array at the specified
 * index, with the value provided by the value parameter.

3.将FindINT解压到exercises文件夹中,并进入FindINT。

4.在终端中执行Make。

5.测试

 h1 ping h2

并成功ping通。

6.打开终端

 xterm h1 h2

7.在H2中执行

 ./receive.py

8.在H1中执行

 ./send.py 10.0.2.2 "123" 100000

其中100000是INT数据包数量。

9.在H2中观察到丢包率测量结果。

findint's People

Contributors

lzhtan 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.