ianyang66 / NTU-SDN-2024

GNU Affero General Public License v3.0
0 stars 0 forks source link

Problem1 by ilpsekai #1

Open ianyang66 opened 6 months ago

ianyang66 commented 6 months ago

i am confuse how to use sudo bash gen_traffic.sh because of using in localhost, the ipv4 address of h2 is 10.0.0.2 and need to add the method "UDP". so the total command will like this

sudo bash gen_traffic.sh 10.0.0.2 "UDP" then i get the response like "Cannot open network namespace "3077": No such file or directory" what is that mean let's put it aside because it's still running then i get image what happened

ilpsekai

ianyang66 commented 6 months ago
  1. Change the TARGET_IP in both network/topologies/mn_ddos_topology.py and app/training/collect_data.py to the desired target you wish to attack.
  2. Then, rerun the program. Start from sudo mn ....

Ian Yang

ilpsekai commented 6 months ago

i find out that '--topo ddostopo' was missing when running 'sudo mn'. this will cause mininet using default setting 1 switch and 2 host. so changing the TARGET_IP is not a problem. i want to ask where should i run 'sudo bash gen_traffic.sh 172.30.211.200 "UDP"`. when i ran the code, the result always looks like below image was it a correct result

ianyang66 commented 6 months ago

Well~You have solved the problem yourself. For the new question, simply execute the script from the directory where gen_traffic.sh is located. Here's an example of my execution result, which should be similar to yours. image So, I assume you should be correct.

Furthermore, you can change ./traffic_ddos.sh to ./traffic_benign.sh in gen_traffic.sh. Then, running sudo bash gen_traffic.sh 172.30.211.200 ICMP should yield the following results. 螢幕擷取畫面 2024-04-26 160722

If the results are consistent, and you receive data by running python collect_data.py in another terminal, then you should be correct.

Note that the IP address 172.30.211.200 must be your TARGET_IP.

Ian Yang