Changes between Version 2 and Version 3 of NewDelayNodeNs


Ignore:
Timestamp:
Oct 13, 2011 2:27:31 PM (13 years ago)
Author:
alwabel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewDelayNodeNs

    v2 v3  
    1515        $ns run
    1616}}}
     17
     18make-new-lan receives the arguments in any order e.g you could provide delay parameters before loss one, however, nodelist should be the first. Note that bandwidth parameters have to be preceded by "bw", delay with "delay", and loss with "loss". The user only have to provide the nodelist, others are optional, but once she provide any it has to be provided in the correct format.The command is described by:
     19{{{
     20        make-new-lan <nodelist> [bw bandwidth ] [delay type mean [standard variation] ] [loss threshold dropmode rate]   
     21}}}
     22Examples:
     23{{{
     24        make-new-lan "$nodeA $nodeB " bw 1Gb delay static 100ms loss 0.01 static 1
     25        Example2 make-new-lan "$nodeA $nodeB " bw 1Gb delay normal 100ms 5 loss 0.01 poisson 5
     26}}}
     27Delay types are : static, normal , poisson and exponential. Note that normal requires standard variation, which is set to zero if not provided.
     28loss dropmodes are static and poisson. Also notice that the default bandwidth is 1Gb.
     29
     30By choosing a static delay with 100ms, the LAN would each packet by 100ms. Normal delays packets based on a normal distribution fashion, with a mean and a standard variation. Plotting the travel time of the packet you would get a bell-curved graph. Poisson delays packet based on a discrete poisson distribution with Lambda=mean, and so does the exponential.
     31The loss model is more sophisticated.It adds the ability to drop packets based on different parameters. The user can adjust the parameters to achieve any desirable pattern. Dropping packet is based on a threshold x; x ≥ 0.000001 and x ≤ 1 which is given by the user. For each received packet, if not in the dropping state, the element generates a uniform random number r ∈ [0.000001, 1] if r ≤ x then it enters the dropping mode. It has to drop σ packets to leave the dropping state. σ is either a static value given by the user or a random number belongs to a Poisson distribution. To set up a dropping mode with static dropping rate the dropmode should be set to "static".
     32
     33
    1734This is a placeholder