Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Demonstration 3

Steven Galgano edited this page Apr 10, 2017 · 4 revisions

Purpose

This demonstration introduces the IEEE 802.11abg radio model and expands upon emulator physical layer concepts.

Background

Background information for this demonstration includes:

Activity 1 - Examining an IEEE 802.11abg emulation

This activity will introduce the IEEE 802.11abg radio model and show how to use available statistic tables to gain insight into network performance

  1. Change directory into the Demonstration 3 directory

    [me@host emane-tutorial]$ cd 3
    
  2. Take a look at the EMANE application configuration files

    Let's start with platform1.xml.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE platform SYSTEM "file:///usr/share/emane/dtd/platform.dtd">
    <platform>
      <param name="otamanagerchannelenable" value="on"/>
      <param name="otamanagerdevice" value="eth1"/>
      <param name="otamanagergroup" value="224.1.2.8:45702"/>
      <param name="eventservicegroup" value="224.1.2.8:45703"/>
      <param name="eventservicedevice" value="eth1"/>
      <param name="controlportendpoint" value="0.0.0.0:47000"/>
    
      <nem id="1" definition="ieee80211abgnem.xml">
        <transport definition="transvirtual.xml">
          <param name="address" value="10.100.0.1"/>
          <param name="mask" value="255.255.255.0"/>
        </transport>
        </nem>
    </platform>

    This should be looking very familiar by now. The important item to highlight is the NEM definition ieee80211abgnem.xml.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE nem SYSTEM "file:///usr/share/emane/dtd/nem.dtd">
    <nem>
      <transport definition="transvirtual.xml"/>
      <mac definition="ieee80211abgmac.xml"/>
      <phy>
        <param name="fixedantennagain"         value="0.0"/>
        <param name="fixedantennagainenable"   value="on"/>
        <param name="bandwidth"                value="20M"/>
        <param name="noisemode"                value="outofband"/>
        <param name="propagationmodel"         value="freespace"/>
        <param name="systemnoisefigure"        value="4.0"/>
        <param name="txpower"                  value="0.0"/>
        <param name="subid"                    value="1"/>
      </phy>
    </nem>

    The radio model definition is ieee80211abgmac.xml. From the physical layer configuration section, we can see that the propagationmodel configuration parameter is set to freespace. This means that unlike the previous demonstrations where precomputed pathloss was sent into the emulation, the emulator will be using a freespace propagation model to determine pathloss between NEMs based on location events.

    Also worth noting in the subid parameter. You can divide up all OTA packets received by an NEM into two categories: in-band and out-of-band. An in-band packet is for the the same waveform as the NEM. An out-of-band packet is for a different waveform and is treated as noise.

    To be considered the same waveform, an OTA packet must match the physical layer registration id, the physical layer sub id, and all of the frequency segments used within the OTA packet must match frequencies in the physical layer's frequency of interest list. If you want to create two networks using the same radio model and frequency set and have them interfere with each other to emulate something like different TRANSECs you can simply change the subid associated with each network.

    Lets take a look at ieee80211abgmac.xml.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mac SYSTEM "file:///usr/share/emane/dtd/mac.dtd">
    <mac library="ieee80211abgmaclayer">
      <param name="mode"                  value="0"/>
      <param name="enablepromiscuousmode" value="off"/>
      <param name="distance"              value="1000"/>
      <param name="unicastrate"           value="4"/>
      <param name="multicastrate"         value="1"/>
      <param name="rtsthreshold"          value="0"/>
      <param name="pcrcurveuri"
             value="file:///usr/share/emane/xml/models/mac/ieee80211abg/ieee80211pcr.xml"/>
      <param name="flowcontrolenable"     value="off"/>
      <param name="flowcontroltokens"     value="10"/>
      <param name="radiometricenable"     value="on"/>
    </mac>

    For the IEEE 802.11abg radio model the most commonly used configuration parameters are:

    1. mode
    2. unicastrate
    3. multicastrate
  3. Start the demonstration with demo-start.

    [me@host 3]$ sudo ./demo-start
    
  4. Start up the OLSR topology viewer

    [me@host 3]$ ../scripts/olsrlinkview.py &
    

    After a few seconds you should see the familiar split network topology. The location events being sent into the emulation during this demonstration correspond to the pathloss values sent in the previous demonstrations.

  5. Using emanesh take a look at the NeighborMetricTable and NeighborStatusTable statistic tables

    [me@host ~]$ emanesh node-1
    [emanesh (node-1:47000)] ## get table 1 mac NeighborMetricTable NeighborStatusTable
    nem 1   mac NeighborMetricTable
    | NEM   | Rx Pkts | Tx Pkts | Missed Pkts | BW Util  | Last Rx       | Last Tx       | SINR Avg      | SINR Stdv | NF Avg         | NF Stdv | Rx Rate Avg | Tx Rate Avg |
    | 2     | 4031    | 0       | 0           | 13036051 | 1395322999.43 | 0.0           | 33.8894805908 | 0.0       | -96.9916229248 | 0.0     | 1000000     | 0.0         |
    | 3     | 4018    | 0       | 1           | 12955292 | 1395322999.5  | 0.0           | 27.7000026703 | 0.0       | -96.9915924072 | 0.0     | 1000000     | 0.0         |
    | 4     | 4023    | 0       | 2           | 12952502 | 1395322999.21 | 0.0           | 24.0556774139 | 0.0       | -96.9916000366 | 0.0     | 1000000     | 0.0         |
    | 5     | 4015    | 0       | 1           | 12930369 | 1395322999.0  | 0.0           | 21.6548595428 | 0.0       | -96.9856338501 | 0.0     | 1000000     | 0.0         |
    | 6     | 4004    | 0       | 1           | 12871626 | 1395322999.1  | 0.0           | 19.9468250275 | 0.0       | -96.9915618896 | 0.0     | 1000000     | 0.0         |
    | 7     | 129     | 0       | 0           | 424652   | 1395321178.85 | 0.0           | 7.4460515976  | 0.0       | -96.9895706177 | 0.0     | 1000000     | 0.0         |
    | 8     | 133     | 0       | 0           | 445738   | 1395321180.85 | 0.0           | 7.67672967911 | 0.0       | -96.9895553589 | 0.0     | 1000000     | 0.0         |
    | 9     | 137     | 0       | 0           | 460231   | 1395321181.87 | 0.0           | 7.97823858261 | 0.0       | -96.9895477295 | 0.0     | 1000000     | 0.0         |
    | 10    | 140     | 0       | 0           | 468387   | 1395321182.85 | 0.0           | 8.09443950653 | 0.0       | -96.9895401001 | 0.0     | 1000000     | 0.0         |
    | 65535 | 0       | 4091    | 0           | 0        | 0.0           | 1395322999.34 | 0.0           | 0.0       | 0.0            | 0.0     | 0.0         | 1000000     |
    .
    nem 1   mac NeighborStatusTable
    | NEM   | Rx Pkts | Tx Pkts | Missed Pkts | BW Util Ratio    | SINR Avg      | NF Avg         | Rx Age         |
    | 2     | 2       | 0       | 0           | 0.0064938236028  | 33.9202156067 | -96.9897003174 | 0.340973466635 |
    | 3     | 2       | 0       | 0           | 0.00694281142205 | 27.6930160522 | -96.9897003174 | 0.343368172646 |
    | 4     | 2       | 0       | 0           | 0.0064938236028  | 24.0249729156 | -96.9897003174 | 0.360833585262 |
    | 5     | 3       | 0       | 0           | 0.00825377553701 | 21.6443119049 | -96.9897079468 | 0.132260620594 |
    | 6     | 3       | 0       | 0           | 0.00825377553701 | 19.9655857086 | -96.9897079468 | 0.030955966562 |
    | 7     | 0       | 0       | 0           | 0.0              | 0.0           | 0.0            | 1820.28515625  |
    | 8     | 0       | 0       | 0           | 0.0              | 0.0           | 0.0            | 1818.27929688  |
    | 9     | 0       | 0       | 0           | 0.0              | 0.0           | 0.0            | 1817.25708008  |
    | 10    | 0       | 0       | 0           | 0.0              | 0.0           | 0.0            | 1816.27941895  |
    | 65535 | 0       | 2       | 0           | 0.0              | 0.0           | 0.0            | 0.0            |
    

    The NeighborMetricTable and NeighborStatusTable show similar information. The difference between the two tables is the time window used to average the data. The NeighborMetricTable tracks information on every packet received from every in-band IEEE 802.11abg radio model instance or sent from this NEM over the entire running time of the emulator instance. The NeighborStatusTable tracks only those packets sent or received over the metric report interval.

    Looking at the NeighborMetricTable, we see very low SINR values for packets received from NEMs 7, 8, 9 and 10. This shows us why our network is segmented. If you query the two tables again, you will see that node-1 is not receiving any more packets from those nodes. That is because once the txPower of an OTA message falls below the rxSensativity, the physical layer will no longer forward those message to the radio model.

    We can see this by querying the physical layer BroadcastPacketDropTable0 and UnicastPacketDropTable0 tables.

    [emanesh (node-1:47000)] ## get table 1 phy BroadcastPacketDropTable0 UnicastPacketDropTable0
    nem 1   phy BroadcastPacketDropTable0
    | NEM | Out-of-Band | Rx Sensitivity | Propagation Model | Gain Location | Gain Horizon | Gain Profile | Not FOI | Spectrum Clamp |
    | 2   | 0           | 0              | 46                | 0             | 0            | 0            | 0       | 0              |
    | 3   | 0           | 0              | 48                | 0             | 0            | 0            | 0       | 0              |
    | 4   | 0           | 0              | 44                | 0             | 0            | 0            | 0       | 0              |
    | 5   | 0           | 0              | 42                | 0             | 0            | 0            | 0       | 0              |
    | 6   | 0           | 0              | 41                | 0             | 0            | 0            | 0       | 0              |
    | 7   | 0           | 23221          | 41                | 0             | 0            | 0            | 0       | 0              |
    | 8   | 0           | 23224          | 39                | 0             | 0            | 0            | 0       | 0              |
    | 9   | 0           | 23207          | 39                | 0             | 0            | 0            | 0       | 0              |
    | 10  | 0           | 23195          | 37                | 0             | 0            | 0            | 0       | 0              |
    .
    nem 1   phy UnicastPacketDropTable0
    | NEM | Out-of-Band | Rx Sensitivity | Propagation Model | Gain Location | Gain Horizon | Gain Profile | Not FOI | Spectrum Clamp |
    

    All the drops in the Propagation Model category occurred at initial startup prior to the physical layer propagation model receiving location information for the NEMs. Notice all the drops in the Rx Sensitivity category. Those are the OTA messages being transmitted by NEMs 7, 8, 9 and 10.

  6. We can also determine why packets are being dropped by looking at log messages. A word of caution here, logs will always affect the fidelity of your emulation. You should only engage a log level above 3 when you are trying to debug a problem.

    Let's take a look at some logs. Open a terminal window and change directories into the Demonstration 3 directory. Then tail the log file for node-1.

    [me@host 3]$ tail -f persist/1/var/log/emane.log 
    09:11:17.994978  INFO NEM  001 NEMImpl::configure transportendpoint: 127.0.0.1/8301
    09:11:17.995052  INFO NEMManagerImpl::configure controlportendpoint: 0.0.0.0/47000
    09:11:17.995065  INFO NEMManagerImpl::configure eventservicedevice: eth1
    09:11:17.995075  INFO NEMManagerImpl::configure eventservicegroup: 224.1.2.8/45703
    09:11:17.995083  INFO NEMManagerImpl::configure otamanagerchannelenable: on
    09:11:17.995090  INFO NEMManagerImpl::configure otamanagerdevice: eth1
    09:11:17.995099  INFO NEMManagerImpl::configure OTA Manager Channel Group: 224.1.2.8/45702
    09:11:17.995108  INFO NEMManagerImpl::configure eventservicettl: 1
    09:11:17.995129  INFO NEMManagerImpl::configure otamanagerloopback: off
    09:11:17.995137  INFO NEMManagerImpl::configure otamanagerttl: 1
    

    The tutorial test flow starts all EMANE applications at log level 3, INFO_LEVEL. Log levels allow the reporting of all levels lower as well as those logs emitted at the current level.

    Log Level Value Description
    NONE_LEVEL 0 Do not emit logs
    ABORT_LEVEL 1 Logs that report fatal errors
    ERROR_LEVEL 2 Logs that report recoverable errors
    INFO_LEVEL 3 Logs that report configuration items
    DEBUG_LEVEL 4 Logs that report the kitchen sink

    From your existing emanesh session, dynamically change the log level of the emulator.

    [emanesh (node-1:47000)] ## loglevel 4
    log level updated

    You should now see a very high volume of log messages scrolling your terminal window that is tailing the log file. If you are just interested in drops, you can add a grep to the end of your tail.

    [me@host 3]$ tail -f persist/1/var/log/emane.log  | grep drop
    15:51:58.081252 DEBUG PHYI 001 FrameworkPHY::processUpstreamPacket_i src 7, dst 65535, drop below receiver sensitivity
    15:51:58.300681 DEBUG PHYI 001 FrameworkPHY::processUpstreamPacket_i src 10, dst 65535, drop below receiver sensitivity
    15:51:58.356954 DEBUG PHYI 001 FrameworkPHY::processUpstreamPacket_i src 8, dst 65535, drop below receiver sensitivity
    15:51:58.659035 DEBUG PHYI 001 FrameworkPHY::processUpstreamPacket_i src 9, dst 65535, drop below receiver sensitivity
    15:51:58.845653 DEBUG PHYI 001 FrameworkPHY::processUpstreamPacket_i src 7, dst 65535, drop below receiver sensitivity
    15:51:58.873281 DEBUG PHYI 001 FrameworkPHY::processUpstreamPacket_i src 9, dst 65535, drop below receiver sensitivity
    15:51:58.907506 DEBUG PHYI 001 FrameworkPHY::processUpstreamPacket_i src 10, dst 65535, drop below receiver sensitivity
    

    Remember that 65535 (0xFFFF) is the NEM broadcast address.

    When you are ready, you can use emanesh to restore the log level.

    [emanesh (node-1:47000)] ## loglevel 3
    log level updated
  7. Once you are finished, stop the demonstration with demo-stop.

    [me@host 3]$ sudo ./demo-stop
    
Clone this wiki locally