Frequently Asked Questions (FAQs) about the AQM&DoS Simulation Platform

Post date: Jun 27, 2011 10:41:0 AM

Back to the homepage of AQM&DoS Simulation Platform

Question1: How to run the simulations?

There are a variety of ways to run the simulation on the AQM&DoS simulation platform, but the recommended way is to use the leodos.sh to launch the simulation rather than execute "ns leodos.tcl" directly (this is relevant to your second question as well). To execute the leodos.sh you need to change its mode to be executable by using the following command:

chmod +x leodos.sh

and run it using:

./leodos.sh

Question2: When I tried to change queue type by changing the value of bn_qm in leodosh.sh to 2, 3, 4, it show me bn_qms DropTail for every change while executing.

The parameters in the head of the leodos.sh file are only the default parameters to run the simulation. These parameters could be modified by following lines of code. In the original leodos.sh file, these two lines of code

task_aqm_ldos 2; #RED

task_aqm_ldos 15; #Roubust RED

rum a batch of simulations on RED and RRED queuing scheme. task_aqm_ldos is a function, in which the default parameters of the simulation are modified. If you just want to conduct one simulation using the parameters specified in the head of this file "leodos.sh", you can use the following line of code:

dosim 0;

and add a # before task_aqm_ldos 2; and task_aqm_ldos 15; to inactive these two batch of simulations. You can learn to modify the code of the function task_aqm_ldos to run your own batch of simulations in the future as this will save you lots of time.

Question 3:How to change TCP data of legitimate user to UDP?

Normally the AQM&DoS simulation platform experiments on legitimate users using TCP protocol as TCP is more likely to be affected by DoS attacks and queuing schemes (AQM) rather than UDP. But if you do want to simulate UDP users, you can modify the file "leodos.tcl" in the following ways:

1. Replace "set agUsrSend($i) [new Agent/TCP/Newreno]" with "set agUsrSend($i) [new Agent/UDP]"

2. Replace "set apUsrSend($i) [new Application/FTP]" with "set apUsrSend($i) [new Application/Traffic/CBR]"

3. Replace "set apUsrSend($i) [new Application/Telnet]" with "set apUsrSend($i) [new Application/Traffic/Exponential]"

4. Add the following lines of code after "$agUsrSend($i) set packetSize_ $pam(ur_ps)":

if { $pam(ur_app)==0} {

$apUsrSend($i) set burst_time_ 500ms

$apUsrSend($i) set idle_time_ 500ms

$apUsrSend($i) set rate_ 100k

}

if { $pam(ur_app)==1} {

$apUsrSend($i) set rate_ 64Kb

$apUsrSend($i) set random_ 1

}

The above code is setting parameters for UDP traffic applications (CBR/Exponential). If you have no idea of CBR/Exponential, please refer to the following links:

CBR: http://www.isi.edu/nsnam/ns/doc/node508.html

Exponential: http://www.isi.edu/nsnam/ns/doc/node506.html

When you want to simulate TCP users again, you will need to reverse the above changes.

Question 4: How to get nam and trace file

The parameter ns_of in "leodos.sh" is about the output files.

When ns_of:

>=3 output leodos.nam (used for nsnam to figure the simulation topology)

>=2 output leodos.tr leodos_tcp.tr leodos_queue_monitor.tr

>=1 output leodos_queue.tr (The data trace of the bottleneck queue. It is the primary analysis data source for this simulation platform)

The default value of ns_of is 2, so that it only output trace files (leodos.tr, leodos_tcp.tr, leodos_queue_monitor.tr, leodos_queue.tr). If you want to output the nam file "leodos.nam", you need to change ns_of to 3 in "leodos.sh".

These output files are located in the sub-directory "result" under "aqm-dos-sim-plat".

Question 5: When I integrated Robust RED it worked correctly. But when I integrated IP Spoofing it shows me warning as shown below. It dose not generate any nam or trace file for me.

---------------------------------------------------------------------------------------

ak_spf_mx 100

nt_dl 2

ur_sp 120

ak_st 60

ur_cr 10

ur_n 2

li 0

ns_of 3

ak_spf_lv 0

ak_bp 500

ak_pr 0.5

bn_qm 1

ur_st 20

ak_spf_mn 1

ak_ps 200

tm_fi 120

ak_tp 2

ur_app 0

ak_rs 0

ak_ng 1

bn_bw 1

ak_n 2

ur_ps 1000

ur_pt 1

nt_bw 10

ur_rs 0

bn_qs 100

ak_ap 1000

hp_n 25

ns_db 0

ak_cp 10

ak_sp 100

ak_tg 0

ak_mw 5

bn_dl 5

bn_qms DropTail

warning: no class variable Agent/TCP/Newreno::saddr_min

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/TCP/Newreno::saddr_max

warning: no class variable Agent/TCP/Newreno::spoof_level

warning: no class variable Agent/TCP/Newreno::saddr_min

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/TCP/Newreno::saddr_max

warning: no class variable Agent/TCP/Newreno::spoof_level

warning: no class variable Agent/UDP::saddr_min

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/UDP::saddr_max

warning: no class variable Agent/UDP::spoof_level

warning: no class variable Agent/UDP::saddr_min

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/UDP::saddr_max

warning: no class variable Agent/UDP::spoof_level

---------------------------------------------------------------------------------------

To solve the warning:

Add the following lines to the end of ns-default.tcl ("ns-allinone-2.33\ns-2.33\tcl\lib\ns-default.tcl").

# Added by leoking spoof config 0 Agent set saddr_min_ 1 Agent set saddr_max_ 100 Agent set spoof_level_ 0 # Added by leoking spoof config 1

And recompile the ns-allinone-2.33 system by using the following commands (you should execute these commands in the ns-2.33 directory "ns-allinone-2.33\ns-2.33"):

make clean

make depend

make

You need to modify the parameters in "leodos.sh" and use it to launch the simulation rather than execute "ns leodos.tcl" directly. (There are detailed explanations for how to run "leodos.sh" in the beginning of this page)

According to the warnings, you also need to double check whether you have strictly followed the instructions in "integration-of-ip-spoofing.txt".

Another thing you need to check is whether you have installed AWK properly, which is a part of the ns-allinone distribution. You can check this using the command: awk

If there the following message appears:

awk: command not found

it means that you have not installed AWK. Otherwise, you have already installed it.

Question 6: What if I get the message "awk: command not found" when executing the command awk.

AWK is also required to run the platform. But most users do not need to manually install it as it is already included in most Linux distributions. If it is not included in your Linux system, you can refer to the following link to install it.

AWK: http://www.gnu.org/software/gawk/

Or if you are using Debian or Ubuntu Linux, you can use the following two commands to install AWK:

1. sudo apt-get install gawk

2. cd /usr/bin/ && sudo ln -s gawk awk

If you can successfully run the command gawk but not awk, you need to create a soft link between them using the following command:

cd /usr/bin/ && sudo ln -s gawk awk

Question 7: I have finished all the steps in integration-of-ip-spoofing.txt. Why I still get the following warning:

---------------------------------------------------------------------------------------

warning: no class variable Agent/TCP/Newreno::saddr_min

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/TCP/Newreno::saddr_max

warning: no class variable Agent/TCP/Newreno::spoof_level

warning: no class variable Agent/TCP/Newreno::saddr_min

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/TCP/Newreno::saddr_max

warning: no class variable Agent/TCP/Newreno::spoof_level

warning: no class variable Agent/UDP::saddr_min

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/UDP::saddr_max

warning: no class variable Agent/UDP::spoof_level

warning: no class variable Agent/UDP::saddr_min

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/UDP::saddr_max

warning: no class variable Agent/UDP::spoof_level

---------------------------------------------------------------------------------------

The recompiling step is essential for the spoofing function to work. Although you have finished the corresponding compiling step in integration-of-ip-spoofing.txt, the ns system might not be really recompiled. Sometimes, you have to delete all the *.o files and synchronize the time mark of all the files using these two commands:

rm *.o

touch *

under these directories:

ns-allinone-2.33\ns-2.33\common

ns-allinone-2.33\ns-2.33\tcp

ns-allinone-2.33\ns-2.33\apps

and do the following step again to force the ns system to be recompiled:

Recompile the ns-allinone-2.33 system by using the following commands (you should execute these commands in the ns-2.33 directory "ns-allinone-2.33\ns-2.33"):

make clean

make depend

make

Question 8: when we run the tool using a patch mode "task_aqm_ldos x;", should we comment the line "dosim 0"?

Yes

Question 9: what does mean if we change "dosim 0" ----> "dosim x"? where x =1, 2, ....?

x = 1 gives you extra analysis. But, I do not encourage you to use it. Please just stick to 0.

Question 10: how do we choose between performing DoS, or DDoS or LDoS, ...? what are the parameters that we should change and how (i mean what are the possible value of those parameters)?

ak_n

The number of attackers

If ak_n > 1, it is a DDoS otherwise it is a DoS (ak_n = 1).

If ak_bp equals ak_ap, it is DoS or DDoS depending on the value of ak_n.

If ak_bp is smaller than ak_ap, it is LDoS or DLDoS again depending on the value of ak_n.

LDoS repesents Low-rate DoS, DLDoS is Distributed Low-rate DoS. You can read this to find out what is an LDoS or DLDoS.

ak_spf_lv

Whether attackers use spoofing IP address.

0: attackers use real IP addresses

1: attackers use spoofing IP addresses

ak_spf_mn and ak_spf_mn are two integers. The spoofing address range is from ak_spf_mn to ak_spf_mn.

---|--|--|--|--|---