The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ... The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

nmlab.korea.ac.kr
from nmlab.korea.ac.kr More from this publisher
12.07.2015 Views

40.2 ConfigurationTo set up simulation scenario, we first build the detailed network. We also need to create one extra node to represent theabstract network, and connect it to the detailed network.For nodes in the detailed network, we first attach a MessagePassing agent to each node:set a [new Agent/MessagePassing]$n attach $a $probing_portIf the node represents a vulnerable host, we use class DnhWormAppset w [new Application/Worm/Dnh]$w attach-agent $aOtherwise, we configure the node as invulnerable:set w [new Application/Worm]$w attach-agent $aWe configure the abstract network as:set a [new Agent/MessagePassing]$na attach $a $probing_portset w [new Application/Worm/An]$w attach-agent $aIn order for the abstract network to receive probing packets generated by nodes within the detailed networks, we need to usemanual routing. There are some extra configuration for the abstract-network node:set p [$na set dmux_]$p defaulttarget $a[$na entry] defaulttarget $p40.3 Commands at a glanceSome common parameters can be configured through TCL script:ScanRate # the rate that a compromised host sends probing packetsScanPort # the vulnerable service port numberScanPacketSize # the size of worm probing packetsBy default, compromised hosts scan the Internet randomly. We can also simulate local-scanning worm by setting the localscanningprobability:361

$w local-p 0.5Following are some commands to configure parameters for the abstract network:$w beta 0.1 # infection parameter$w gamma 0 # removal parameter$w addr-range 2000 200000 # the address space of the abstract network$w dn-range 0 1999 # the address space of the detailed network$w v_percent 0.01 # the percentage of vulnerable hosts in the abstract network362

40.2 Configur<strong>at</strong>ionTo set up simul<strong>at</strong>ion scenario, we first build the detailed network. We also need to cre<strong>at</strong>e one extra node to represent theabstract network, <strong>and</strong> connect it to the detailed network.For nodes in the detailed network, we first <strong>at</strong>tach a MessagePassing agent to each node:set a [new Agent/MessagePassing]$n <strong>at</strong>tach $a $probing_portIf the node represents a vulnerable host, we use class DnhWormAppset w [new Applic<strong>at</strong>ion/Worm/Dnh]$w <strong>at</strong>tach-agent $aOtherwise, we configure the node as invulnerable:set w [new Applic<strong>at</strong>ion/Worm]$w <strong>at</strong>tach-agent $aWe configure the abstract network as:set a [new Agent/MessagePassing]$na <strong>at</strong>tach $a $probing_portset w [new Applic<strong>at</strong>ion/Worm/An]$w <strong>at</strong>tach-agent $aIn order for the abstract network to receive probing packets gener<strong>at</strong>ed by nodes within the detailed networks, we need to usemanual routing. <strong>The</strong>re are some extra configur<strong>at</strong>ion for the abstract-network node:set p [$na set dmux_]$p defaulttarget $a[$na entry] defaulttarget $p40.3 Comm<strong>and</strong>s <strong>at</strong> a glanceSome common parameters can be configured through TCL script:ScanR<strong>at</strong>e # the r<strong>at</strong>e th<strong>at</strong> a compromised host sends probing packetsScanPort # the vulnerable service port numberScanPacketSize # the size of worm probing packetsBy default, compromised hosts scan the Internet r<strong>and</strong>omly. We can also simul<strong>at</strong>e local-scanning worm by setting the localscanningprobability:361

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!