Git Product home page Git Product logo

dpdk-ddos's Introduction

DPDK-DDoS

simplified DDoS prototype using DPDK application model.

Motivation

to leverage DPDK libraries and PMD feature to build line rate processing for

  • zero buffer copy
  • reduce failover on faulty cases
  • de-centralized telemetry
  • in bound no Relational Data Base

Design

To Do

  • Primary configruation and Secodnary
  • Failure of secodnary, Primary pass through
  • Flow calssification based on destination IP
  • Inbound IP reassembly with ACL filtering
  • service core based telemetry and data base update.
  • eBPF inspired flow distribution to multiple workers

How to Build?

EBPF
  1. drop: clang-9 -O2 -emit-llvm -I /usr/include/linux -c drop.c -o - `| llc -march=bpf -mcpu=probe -filetype=obj -o drop.o
  2. pass: clang-9 -O2 -emit-llvm -I /usr/include/linux -c pass.c -o - `| llc -march=bpf -mcpu=probe -filetype=obj -o pass.o
  3. port_forward: clang-9 -O2 -emit-llvm -I /usr/include/linux -c port_forwad.c -o - `| llc -march=bpf -mcpu=probe -filetype=obj -o pass.o

dependency

  • DPDK
  • libnuma-dev

version:

software release
DPDK dpdk-stable-18.11.4

Run

  • EBPF

pass|drop

  • ip -force link set dev interfacename xdp off
  • ip -force link set dev interfacename xdp object binaryname section "prog"

port_forward

  • ip -force link set dev interfacename1 xdp off; ip -force link set dev interfacename2 xdp off
  • ip -force link set dev interfacename1 xdp object binaryname section "prog"; ip -force link set dev interfacename2 xdp object binaryname section "prog"
  • bpftool map update id mapid1 key interfacename1_ifindex 0x0 0x0 0x0 value interfacename2_ifindex 0x0 0x0 0x0
  • bpftool map update id mapid2 key interfacename2_ifindex 0x0 0x0 0x0 value interfacename1_ifindex 0x0 0x0 0x0

DPDK 18.11.4

  • Download DPDK from dpdk.org.
  • Untar DPDK tar file.
  • Execute the following commands
 cd <to unatar dpdk folder>
 make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc
 export RTE_SDK=$PWD
 export RTE_TARGET=x86_64-native-linuxapp-gcc
 cd x86_64-native-linuxapp-gcc
 make -j 4
  • Test the custom build by cross checking examples like helloworld & l2fwd.

application

  • meson <build directory>
  • ninja -C <build directory>

dpdk-ddos's People

Contributors

vipinpv85 avatar vvarghes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zhaoruixbj

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.