asilha / ddosm-p4 Goto Github PK
View Code? Open in Web Editor NEWOffloading Real-time DDoS Attack Mitigation to Programmable Data Planes
License: GNU General Public License v3.0
Offloading Real-time DDoS Attack Mitigation to Programmable Data Planes
License: GNU General Public License v3.0
To install P4c compiler on ubuntu16.04, i have followed the instructions given in https://github.com/asilha/p4lang-p4c/tree/euclid., but i got this error while running "make -j2" command. please help me to resolve this issue.
I have git your project and get errors when make it!
At first, I think I should re build a new p4c, but the same error come out again after I git and make a new p4c.
How could I fix this bug?
what like bellow:
p4@p4:~/ddosm-p4$ make /usr/local/bin/p4c -b bmv2 -Isrc -o build src/ddosm.p4 src/ddosm.p4(132): [--Wwarn=deprecated] warning: mark_to_drop: Using deprecated feature mark_to_ndard_metadata) instead. mark_to_drop(); ^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(415) extern void mark_to_drop(); ^^^^^^^^^^^^ src/ddosm.p4(191): [--Werror=type-error] error: HashAlgorithm.h1: Invalid enum tag hash(h1, HashAlgorithm.h1, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^ src/ddosm.p4(191): [--Werror=type-error] error: hash: Cannot unify Type(HashAlgorithm) to HashAl hash(h1, HashAlgorithm.h1, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(403) enum HashAlgorithm { ^^^^^^^^^^^^^ src/ddosm.p4(192): [--Werror=type-error] error: HashAlgorithm.h2: Invalid enum tag hash(h2, HashAlgorithm.h2, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^ src/ddosm.p4(192): [--Werror=type-error] error: hash: Cannot unify Type(HashAlgorithm) to HashAl hash(h2, HashAlgorithm.h2, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(403) enum HashAlgorithm { ^^^^^^^^^^^^^ src/ddosm.p4(193): [--Werror=type-error] error: HashAlgorithm.h3: Invalid enum tag hash(h3, HashAlgorithm.h3, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^ src/ddosm.p4(193): [--Werror=type-error] error: hash: Cannot unify Type(HashAlgorithm) to HashAl hash(h3, HashAlgorithm.h3, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(403) enum HashAlgorithm { ^^^^^^^^^^^^^ src/ddosm.p4(194): [--Werror=type-error] error: HashAlgorithm.h4: Invalid enum tag hash(h4, HashAlgorithm.h4, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^ src/ddosm.p4(194): [--Werror=type-error] error: hash: Cannot unify Type(HashAlgorithm) to HashAl hash(h4, HashAlgorithm.h4, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(403) enum HashAlgorithm { ^^^^^^^^^^^^^ src/ddosm.p4(198): [--Werror=type-error] error: HashAlgorithm.g1: Invalid enum tag hash(g1, HashAlgorithm.g1, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^ src/ddosm.p4(198): [--Werror=type-error] error: hash: Cannot unify Type(HashAlgorithm) to HashAl hash(g1, HashAlgorithm.g1, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(403) enum HashAlgorithm { ^^^^^^^^^^^^^ src/ddosm.p4(199): [--Werror=type-error] error: HashAlgorithm.g2: Invalid enum tag hash(g2, HashAlgorithm.g2, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^ src/ddosm.p4(199): [--Werror=type-error] error: hash: Cannot unify Type(HashAlgorithm) to HashAl hash(g2, HashAlgorithm.g2, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(403) enum HashAlgorithm { ^^^^^^^^^^^^^ src/ddosm.p4(200): [--Werror=type-error] error: HashAlgorithm.g3: Invalid enum tag hash(g3, HashAlgorithm.g3, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^ src/ddosm.p4(200): [--Werror=type-error] error: hash: Cannot unify Type(HashAlgorithm) to HashAl hash(g3, HashAlgorithm.g3, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(403) enum HashAlgorithm { ^^^^^^^^^^^^^ src/ddosm.p4(201): [--Werror=type-error] error: HashAlgorithm.g4: Invalid enum tag hash(g4, HashAlgorithm.g4, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^ src/ddosm.p4(201): [--Werror=type-error] error: hash: Cannot unify Type(HashAlgorithm) to HashAl hash(g4, HashAlgorithm.g4, 32w0, {ipv4_addr}, 32w0xffffffff); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/local/share/p4c/p4include/v1model.p4(403) enum HashAlgorithm { ^^^^^^^^^^^^^ Makefile:14: recipe for target 'ddosm' failed make: *** [ddosm] Error 1 p4@p4:~/ddosm-p4$
hello, to use ddosm-p4 on ubuntu 16.04, i have followed the instructions given in #7 ,but i got this error while run docker run -it --rm -v "<your_working_directory>:/workdir" --workdir /workdir asilha/p4lang-p4c:euclid
command. please help me to resolve this issue.
so, i try to visit https://production.cloudflare.docker.com . there some issues:
It would be helpful to generate logs with:
Hello @asilha,
Hope your graduation thesis went well!
First of all, I would like to thank you for creating the ddosm-p4 project. I have successfully installed the project and have the simple_switch running with the following configuration:
simple_switch -i 1@veth0 -i 2@veth2 -i 3@veth4 -i 4@veth6 build/ddosm.json &
Now, I am looking for guidance on how to run experiments using this setup. Specifically, I want to simulate a DDoS attack and legitimate traffic together on the veth0 interface and monitor the output on the other interfaces. I have already attempted sending packets using Scapy but would like to know the recommended approach to run such experiments using ddosm-p4. I am running the project on an Ubuntu 16.04 host, and I have access to the CAIDA datasets mentioned in the paper.
It would be really helpful if you could provide some examples or point me to any documentation on how to run these experiments. Any advice or suggestions would be greatly appreciated.
Thank you in advance for your assistance!
Best regards,
Madhav Rajesh
Prepare a guide to help developers get started with this project.
Requested by @greetew in #4 (comment)
Hello author, I am a graduate student. I tried to reproduce your experiment but something went wrong. Can you help me and tell me where the problem is?
The picture below is the error I encountered.
My level is not very good
But according to my interpretation and understanding
The enum in "v1model.p4" does not contain h1....h4 g1...g4.
But the "ddosm.p4"needs to use h1...h4
I hope you can answer it for me.
My English is not very good. I'm from Asia. Please don't mind if I use inappropriate words. Thank you.
Hello, I compiled the ddosm.p4 file into the ddosm.json file. Execute: "simple_switch ./build/ddsm. json "This command reports an error:" Unknown hash algorithm: h1 ". What's the reason? I'm very worried.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.