ns error models are described in Chapter 13. These error models can be set to cause packets to be errored according to various probability distributions. These error models are simple and don't necessarily correspond to what would be experienced on an actual satellite channel (particularly a LEO channel). Users are free to define more sophisticated error models that more closely match a particular satellite environment.
The following code provides an example of how to add an error model to a link:
set em_ [new ErrorModel] $em_ unit pkt $em_ set rate_ 0.02 $em_ ranvar [new RandomVariable/Uniform] $node interface-errormodel $em_This will add an error model to the receive path of the first interface created on node $node (specifically, between the MAC and link layer)- this first interface generally corresponds to the uplink and downlink interface for a satellite or a terminal (if only one uplink and/or downlink exists). To add the error model to a different stack (indexed by ), use the following code:
$node interface-errormodel $em_ $i