Difference between revisions of "Wireless jamming model"

From Nsnam
Jump to: navigation, search
(Jammer (Base) Class Public APIs)
(Jammer (Base) Class Protected APIs)
Line 111: Line 111:
 
==== Jammer (Base) Class Protected APIs ====
 
==== Jammer (Base) Class Protected APIs ====
  
* IsJammerOn
+
* '''IsJammerOn'''
* GetEnergyFraction
+
* '''GetEnergyFraction'''
* GetNodeId
+
* '''GetNodeId'''
  
 
== Jamming Detection/Mitigation Intelligence ==
 
== Jamming Detection/Mitigation Intelligence ==

Revision as of 20:11, 18 May 2010

General

Network Security Lab, University of Washington, Seattle has begun work on a wireless interference (jamming) model for ns3. The goal is to to enable researchers to use ns3 to study jamming and its mitigation methods.

Project Background

Interference (Jamming) in wireless networks is an important example of malicious attacks in wireless networks. It is achieved by deliberate transmission of radio signals to disrupt the communication in a wireless network by decreasing the signal-to-interference-noise ratio (SINR). Jamming leads to corrupted packets at the receiver, which results a lowered throughput.

Project Goals

To provide a simulation toolkit that allows researchers to easily implement and simulate a wireless jamming strategy and jamming detection/mitigation strategy. To enable researchers to evaluate the performances of jamming and jamming detection/mitigation strategies.

This model focuses on modeling the intelligence layer (eg. deciding when and what packets to jam/interfere, deciding whether a node is being jammed/interfered, deciding how to mitigate jamming/interference). It uses existing channel (interference) to simulate interference/noise in the channel, and existing PHY models to send packets. Our design goal is to abstract the underlying wireless PHY layer protocol from the intelligence layer. Such that the same strategy (jamming or jamming detection/mitigation) can be applied to any existing/developing ns-3 wireless PHY layer protocols without any change.

Schedule

Jammer

Jammer is one of the key elements in the jamming model. It includes the following primitives to enable implementation of different jamming strategies:

  • Transmit jamming signal.
  • Adjust jamming power & duration.
  • Extract packet headers.
  • Scan, hop channels (for a multi-channel wireless protocol).
  • etc.

Honest Nodes

A set of primitives is added to honest nodes to enable implementation jamming detection/mitigation strategies:

  • Measure Packet Delivery Ratio (PDR).
  • Measure Received Signal Strength (RSS).
  • Scan, hop channels (for a multi-channel wireless protocol).
  • etc.

Jamming Model Hierarchy

Jamming model hierarchy

The jamming model is designed to minimize its dependency on the physical (PHY) layer of the wireless protocol. It consists of the following components:

  • Jamming intelligence (jammer).
    • This base class provides interfaces to wireless module utility.
    • Detailed jamming strategies such as constant jammer, reactive jammer etc. are implemented in child classes.
    • This class depends on the wireless module utility class.
  • Jamming detection/mitigation intelligence (mitigation).
    • This base class provides interfaces to wireless module utility.
    • Detailed jamming detection/mitigation strategies such as mitigate by channel hop, are implemented in child classes.
    • This class depends on the wireless module utility class.
  • Wireless module utility (utility).
    • This class provides a set of functions for jammer and jamming mitigation classes to utilize for implementing their strategies.
    • This class acts as a bridge between the intelligence layer and the PHY layer, separating the intelligence from PHY layer details.
  • PHY layer driver (driver).
    • Modification to PHY layer classes are required to provide interface to the utility.
    • The modifications are specific to the PHY layer class one wants to study on.
    • Driver also provides an interface to the energy model.

Jamming Intelligence (Jammer)

Overview

Jammer class structure

The following types of jammers are provided by the jamming model:

  • Eavesdropper jammer.
    • Listens and records wireless traffic in channel(s).
  • Constant jammer.
    • Sends jamming signal of certain duration at a constant interval.
  • Random jammer.
    • Sends jamming signal of certain duration at a randomly chosen interval.
  • Reactive jammer.
    • Sends jamming signal of certain duration only when communication is present in the channel.

Users can easily define their own jamming strategies (classes) following the format in provided classes. The jamming intelligence class is designed to abstract the detail of sending jamming signals and extracting information from the channel.

List of APIs

Jammer (Base) Class Public APIs

  • StartJammer:
    • Starts the jammer. This function is scheduled to start the jammer (start sending jamming signal) at specified time.
  • Stop Jammer:
    • Stops the jammer. Thus function is scheduled to stop the jammer (stop sending jamming signal) at specified time.
  • StartRxHandler:
    • Callback function invoked at the beginning of Rx by WirelessModuleUtility to decided whether a packet is to be received.
    • A jammer can decide whether it wants to receive the incoming packet.
  • HandleIncomingPacket (EndRxhandler):
    • Callback function invoked at the end of Rx by WirelessModuleUtility.
    • This callback is used to pass the received packet to the jammer intelligence.
  • EndTxHandler:
    • Callback function invoked at the end of Tx by WirelessModuleUtility.
  • SetUtilityModule:
    • Sets pointer to WirelessUtilityModule installed on node, called by JammerHelper during installation.
    • Jammer class cannot operate without support of WirelessUtilityModule.
  • SetEnergySource:
    • Sets pointer to EnergySource installed on node, called by JammerHelper during installation.
  • SetNodeId:
    • Records current node ID, called by JammerHelper during installation.

Jammer (Base) Class Protected APIs

  • IsJammerOn
  • GetEnergyFraction
  • GetNodeId

Jamming Detection/Mitigation Intelligence

Jamming mitigation class structure. Classes in dotted boxes are not included in initial release.

The following jamming detection strategies are provided by the jamming model:

  • Detect jamming by RSS.
  • Detect jamming by PDR.
  • Detect jamming by RSS & PDR.

The following jamming mitigation strategies are provided by the jamming model:

  • Mitigate by channel hop.
    • When jamming is detected, honest nodes hop onto a different channel (given a multi-channel wireless protocol) to avoid being jammed.

Users can easily define their own jamming detection/mitigation strategies (classes) following the format in provided classes. The jamming detection/mitigation class is designed to abstract the detail of extracting information from the channel.

Wireless Module Utility

This class provides essential functions for jamming intelligence and jamming detection/mitigation intelligence to operate. It can also be installed separately for monitoring network performance such as throughput.

PHY Layer Driver

Modifications of the PHY layer is required to pass information to the wireless module utility. Currently, only driver for the Wifi class is provided.

Usage

A complete sample simulation script using all components for the Wireless Jamming Model is available here.

Jammer

The following code snippet installs a reactive jammer onto a node with modified wifi PHY (NslWifiPhy) already installed.

 /* create some nodes */ 
 NodeContainer c;
 c.Create(5);
 
 /* use NslWifiPhyHelper to install NslWifiPhy. Similar to installing the regular YansWifiPhy */
 
 /* install jammer */
 JammerHelper jammerHelper;
 // configure jammer type
 jammerHelper.SetJammerType ("ns3::ReactiveJammer");
 // set jammer parameters
 jammerHelper.Set ("ReactiveJammerRxTimeout", TimeValue (Seconds (2.0)));
 // install jammer
 jammerHelper.Install (c.Get (4)); // installing on a specific node

Note that the jammer class cannot operate without installing the WirelessModuleUtility class, thus it is automatically installed by the JammerHelper. We recommend to install the WirelessModuleUtility class separately before installing the Jammer classes if one wants to modify attributes of WirelessModuleUtility before simulation starts.

Jammers are turned off by default when simulation starts, one should schedule an event to start the jammer after simulation starts.

 /* obtain pointer to jammer object */
 Ptr<Jammer> jammerPtr = c.Get (4)->GetObject<Jammer> ();
 /* schedule jammer to start at 7.0 seconds */
 Simulator::Schedule (Seconds (7.0), &ns3::Jammer::StartJammer, jammerPtr);

Jamming Mitigation

The following code snippet installs a jamming mitigation object (mitigate by channel hop) onto a node with modified wifi PHY (NslWifiPhy) already installed.

 /* create some nodes */ 
 NodeContainer c;
 c.Create(5);
 
 /* use NslWifiPhyHelper to install NslWifiPhy. Similar to installing the regular YansWifiPhy */
 
 /* install jamming mitigation objects */
 JammingMitigationHelper mitigationHelper;
 // configure mitigation type
 mitigationHelper.SetJammingMitigationType ("ns3::MitigateByChannelHop");
 // configure mitigation parameters
 mitigationHelper.Set ("MitigateByChannelHopDetectionThreshold", DoubleValue (0.5));
 // install mitigation on nodes
 mitigationHelper.Install (c);

Wireless Module Utility

The following code snippet installs a wireless module utility object onto a node with modified wifi PHY (NslWifiPhy) object already installed.

 /* create some nodes */ 
 NodeContainer c;
 c.Create(5);
 
 /* use NslWifiPhyHelper to install NslWifiPhy. Similar to installing the regular YansWifiPhy */
 
 /* install wireless module utility objects */
 WirelessModuleUtilityHelper utilityHelper;
 // set attributes
 utilityHelper.Set ("ThroughputUpdateInterval", TimeValue (Seconds (1.0)));
 // install on all nodes
 utilityHelper.Install (c);