Quote:
Originally Posted by mujtiba
@ mleoking
When I tried to change queue type by changeing the value of bn_qm in leodosh.sh to 2, 3, 4, it show me bn_qms DropTail for every change while executing.
|
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
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 add the following line of code to the end of leodos.sh:
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.
Quote:
Originally Posted by mujtiba
@ mleoking
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
Quote:
Originally Posted by mujtiba
@ mleoking
How to find nam and trace file
|
The parameter
ns_of in leodos.sh is about the out 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.
These output files are located in the sub-directory "result" under "aqm-dos-sim-plat"
Quote:
Originally Posted by mujtiba
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.
[mujtiba@ddos aqm-dos-sim-plat]$ ns leodos.tcl
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
[mujtiba@ddos aqm-dos-sim-plat]$
|
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/TCP set saddr_min 1
Agent/TCP set saddr_max 100
Agent/TCP set spoof_level 0
Agent/UDP set saddr_min 1
Agent/UDP set saddr_max 100
Agent/UDP set spoof_level 0
# Added by leoking spoof config 1
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 thread)
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, 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.