Working scripts and plots for 4 devices (smart plugs)
authorrtrimana <rtrimana@uci.edu>
Wed, 14 Feb 2018 19:45:27 +0000 (11:45 -0800)
committerrtrimana <rtrimana@uci.edu>
Wed, 14 Feb 2018 19:45:27 +0000 (11:45 -0800)
13 files changed:
base_gexf_generator.py
devicelist.dat
exclusion.dat
main_flow.sh
plot_scripts/plot_ts_graph_dlink [new file with mode: 0644]
plot_scripts/plot_ts_graph_dlink_combined [new file with mode: 0644]
plot_scripts/plot_ts_graph_tplink [new file with mode: 0644]
plot_scripts/plot_ts_graph_tplink_combined [new file with mode: 0644]
plot_scripts/plot_ts_graph_wemo
plot_scripts/plot_ts_graph_wemo-insight [new file with mode: 0644]
plot_scripts/plot_ts_graph_wemo-insight_combined [new file with mode: 0644]
plot_scripts/plot_ts_graph_wemo_combined [new file with mode: 0644]
run.sh

index a85184a..5353912 100644 (file)
@@ -170,10 +170,18 @@ def place_in_graph(G, eth_src, eth_dst, device_dns_mappings, dev_list, layers,
     else:
         protocol = split_protocol[3] + ":" + split_protocol[4]
     #print "timestamp: ", timestamp, " - new protocol added: ", protocol, "\n"
+    # And source and destination IPs
+    ip_src = layers[JSON_KEY_IP][JSON_KEY_IP_SRC]
+    ip_dst = layers[JSON_KEY_IP][JSON_KEY_IP_DST]
+    # Categorize source and destination IP addresses: local vs. non-local
+    ip_re = re.compile(r'\b192.168.[0-9.]+')
+    src_is_local = ip_re.search(ip_src) 
+    dst_is_local = ip_re.search(ip_dst)
     # Store protocol into the set (source)
     protocols = None
     # Key to search in the dictionary is <src-mac-address>-<dst-mac_address>
-    dict_key = eth_src + "-" + eth_dst
+    dict_key = ip_src + "-" + ip_dst
+    #print "Key: ", dict_key
     if dict_key not in edge_to_prot:
         edge_to_prot[dict_key] = set()
     protocols = edge_to_prot[dict_key]
@@ -185,13 +193,6 @@ def place_in_graph(G, eth_src, eth_dst, device_dns_mappings, dev_list, layers,
         edge_to_vol[dict_key] = 0;
     edge_to_vol[dict_key] = edge_to_vol[dict_key] + packet_len
     volume = str(edge_to_vol[dict_key])
-    # And source and destination IPs
-    ip_src = layers[JSON_KEY_IP][JSON_KEY_IP_SRC]
-    ip_dst = layers[JSON_KEY_IP][JSON_KEY_IP_DST]
-    # Categorize source and destination IP addresses: local vs. non-local
-    ip_re = re.compile(r'\b192.168.[0-9.]+')
-    src_is_local = ip_re.search(ip_src) 
-    dst_is_local = ip_re.search(ip_dst)
 
     # Skip device to cloud communication if we are interested in the local graph.
     # TODO should this go before the protocol dict is changed?
index b94652c..a645060 100644 (file)
@@ -18,6 +18,7 @@ c4:12:f5:e3:dc:17, MotionSensor_D-Link
 d0:52:a8:a3:60:0f, ZigBeeHub_Samsung_SmartThings
 64:bc:0c:43:3f:40, Smartphone_Nexus_5_White
 64:89:9a:86:a9:7d, Smartphone_Nexus_5_Black
+a8:96:75:2f:0c:9c, Smartphone_Motorola
 60:f1:89:96:45:f6, Samsung_S7_Edge
 60:57:18:8e:aa:94, Laptop_PC_HP
 b0:b9:8a:73:69:8e, RouterPort_Bridge-LAN
@@ -27,4 +28,5 @@ b0:b9:8a:73:69:91, RouterPort_WLAN1
 74:da:38:0d:05:55, RaspberryPi_Controller
 d4:6a:6a:4f:e2:33, Dell_laptop
 80:e6:50:25:70:72, Apple_MAC
+68:a8:6d:06:e5:5e, Apple_MAC_PLRG
 ff:ff:ff:ff:ff:ff, Broadcast_MAC
index 8a22869..1aaad65 100644 (file)
@@ -3,4 +3,7 @@ MAC_address, device_name
 60:57:18:8e:aa:94, Laptop_PC_HP
 74:da:38:0d:05:55, RaspberryPi_Controller
 80:e6:50:25:70:72, Apple_MAC
+68:a8:6d:06:e5:5e, Apple_MAC_PLRG
 d4:6a:6a:4f:e2:33, Dell_laptop
+40:5d:82:2f:50:2a, WebCam_Netgear_Arlo
+18:b4:30:bf:34:7e, Thermostat_Nest
index 7150ed3..cbc97fb 100755 (executable)
@@ -18,4 +18,3 @@ fi
 python ./base_gexf_generator.py $1 $2.gexf
 python ./parser/parse_packet_frequency.py $1 $2 $3 $4
 
-
diff --git a/plot_scripts/plot_ts_graph_dlink b/plot_scripts/plot_ts_graph_dlink
new file mode 100644 (file)
index 0000000..b79406c
--- /dev/null
@@ -0,0 +1,68 @@
+# Script to plot time series graphs for network traffic analysis
+#
+# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
+# Programming Language Research Group @ University of California, Irvine
+# Winter 2018
+
+# ************ #
+# BASIC SETUP  #
+# ************ #
+set terminal pngcairo enhanced font 'Verdana,10'
+set autoscale
+unset key
+unset log
+unset label
+set xtics 50
+set xtics rotate by 60 right
+set ytics auto
+set xlabel "Packet Timestamp (hh:mm:ss)"
+set ylabel "Packet Size (bytes)"
+set xdata time
+set timefmt "%H:%M:%S"
+set xrange [:]
+set yrange [0:]
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# DLink switch local
+# eth0
+set output './result/dlink_switch_eth_timestamp_local_incoming.png'
+set title "DLink Switch Incoming Local Traffic (eth0)"
+plot "./result/dlink_switch_eth_local_incoming.dat" using 1:2 with lines
+set output './result/dlink_switch_eth_timestamp_local_outgoing.png'
+set title "DLink Switch Outgoing Local Traffic (eth0)"
+plot "./result/dlink_switch_eth_local_outgoing.dat" using 1:2 with lines
+# wlan1
+set output './result/dlink_switch_wlan_timestamp_local_incoming.png'
+set title "DLink Switch Incoming Local Traffic (wlan1)"
+plot "./result/dlink_switch_wlan_local_incoming.dat" using 1:2 with lines
+set output './result/dlink_switch_wlan_timestamp_local_outgoing.png'
+set title "DLink Switch Outgoing Local Traffic (wlan1)"
+plot "./result/dlink_switch_wlan_local_outgoing.dat" using 1:2 with lines
+
+# DLink switch remote
+# eth0
+set output './result/dlink_switch_eth_timestamp_remote_incoming.png'
+set title "DLink Switch Incoming Remote Traffic (eth0)"
+plot "./result/dlink_switch_eth_remote_incoming.dat" using 1:2 with lines
+set output './result/dlink_switch_eth_timestamp_remote_outgoing.png'
+set title "DLink Switch Outgoing Remote Traffic (eth0)"
+plot "./result/dlink_switch_eth_remote_outgoing.dat" using 1:2 with lines
+# wlan1
+set output './result/dlink_switch_wlan_timestamp_remote_incoming.png'
+set title "DLink Switch Incoming Remote Traffic (wlan1)"
+plot "./result/dlink_switch_wlan_remote_incoming.dat" using 1:2 with lines
+set output './result/dlink_switch_wlan_timestamp_remote_outgoing.png'
+set title "DLink Switch Outgoing Remote Traffic (wlan1)"
+plot "./result/dlink_switch_wlan_remote_outgoing.dat" using 1:2 with lines
+
+# DLink phone local
+# wlan1
+set output './result/dlink_phone_wlan_timestamp_local_incoming.png'
+set title "DLink Phone Incoming Local Traffic (wlan1)"
+plot "./result/dlink_phone_wlan_local_incoming.dat" using 1:2 with lines
+set output './result/dlink_phone_wlan_timestamp_local_outgoing.png'
+set title "DLink Phone Outgoing Local Traffic (wlan1)"
+plot "./result/dlink_phone_wlan_local_outgoing.dat" using 1:2 with lines
+
diff --git a/plot_scripts/plot_ts_graph_dlink_combined b/plot_scripts/plot_ts_graph_dlink_combined
new file mode 100644 (file)
index 0000000..5e8c800
--- /dev/null
@@ -0,0 +1,44 @@
+# Script to plot time series graphs for network traffic analysis
+#
+# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
+# Programming Language Research Group @ University of California, Irvine
+# Winter 2018
+
+# ************ #
+# BASIC SETUP  #
+# ************ #
+set terminal pngcairo enhanced font 'Verdana,10'
+set autoscale
+set key
+unset log
+unset label
+set xtics 50
+set xtics rotate by 60 right
+set ytics auto
+set xlabel "Packet Timestamp (hh:mm:ss)"
+set ylabel "Packet Size (bytes)"
+set xdata time
+set timefmt "%H:%M:%S"
+set xrange [:]
+set yrange [0:]
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# DLink switch local
+# wlan1 / eth0
+set output './result/dlink_switch_wlan_timestamp_local_incoming.png'
+set title "DLink Switch Incoming Local Traffic (wlan1/eth0)"
+plot "./result/dlink_switch_wlan_local_incoming.dat" using 1:2 with lines title "wlan1", "./result/dlink_switch_eth_local_incoming.dat" using 1:2 with lines title "eth0", "./result/dlink_phone_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/dlink_phone_wlan_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming"
+set output './result/dlink_switch_wlan_timestamp_local_outgoing.png'
+set title "DLink Switch Outgoing Local Traffic (wlan1/eth0)"
+plot "./result/dlink_switch_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1", "./result/dlink_switch_eth_local_outgoing.dat" using 1:2 with lines title "eth0", "./result/dlink_phone_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/dlink_phone_wlan_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming"
+
+# DLink switch remote
+# wlan1
+set output './result/dlink_switch_wlan_timestamp_remote_incoming.png'
+set title "DLink Switch Incoming Remote Traffic (wlan1/eth0)"
+plot "./result/dlink_switch_wlan_remote_incoming.dat" using 1:2 with lines title "wlan1", "./result/dlink_switch_eth_remote_incoming.dat" using 1:2 with lines title "eth0"
+set output './result/dlink_switch_wlan_timestamp_remote_outgoing.png'
+set title "DLink Switch Outgoing Remote Traffic (wlan1/eth0)"
+plot "./result/dlink_switch_wlan_remote_outgoing.dat" using 1:2 with lines title "wlan1", "./result/dlink_switch_eth_remote_outgoing.dat" using 1:2 with lines title "eth0"
diff --git a/plot_scripts/plot_ts_graph_tplink b/plot_scripts/plot_ts_graph_tplink
new file mode 100644 (file)
index 0000000..4f1fb35
--- /dev/null
@@ -0,0 +1,68 @@
+# Script to plot time series graphs for network traffic analysis
+#
+# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
+# Programming Language Research Group @ University of California, Irvine
+# Winter 2018
+
+# ************ #
+# BASIC SETUP  #
+# ************ #
+set terminal pngcairo enhanced font 'Verdana,10'
+set autoscale
+unset key
+unset log
+unset label
+set xtics 50
+set xtics rotate by 60 right
+set ytics auto
+set xlabel "Packet Timestamp (hh:mm:ss)"
+set ylabel "Packet Size (bytes)"
+set xdata time
+set timefmt "%H:%M:%S"
+set xrange [:]
+set yrange [0:]
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# TPLink switch local
+# eth0
+set output './result/tplink_switch_eth_timestamp_local_incoming.png'
+set title "TP-Link Switch Incoming Local Traffic (eth0)"
+plot "./result/tplink_switch_eth_local_incoming.dat" using 1:2 with lines
+set output './result/tplink_switch_eth_timestamp_local_outgoing.png'
+set title "TP-Link Switch Outgoing Local Traffic (eth0)"
+plot "./result/tplink_switch_eth_local_outgoing.dat" using 1:2 with lines
+# wlan1
+set output './result/tplink_switch_wlan_timestamp_local_incoming.png'
+set title "TP-Link Switch Incoming Local Traffic (wlan1)"
+plot "./result/tplink_switch_wlan_local_incoming.dat" using 1:2 with lines
+set output './result/tplink_switch_wlan_timestamp_local_outgoing.png'
+set title "TP-Link Switch Outgoing Local Traffic (wlan1)"
+plot "./result/tplink_switch_wlan_local_outgoing.dat" using 1:2 with lines
+
+# TPLink switch remote
+# eth0
+set output './result/tplink_switch_eth_timestamp_remote_incoming.png'
+set title "TP-Link Switch Incoming Remote Traffic (eth0)"
+plot "./result/tplink_switch_eth_remote_incoming.dat" using 1:2 with lines
+set output './result/tplink_switch_eth_timestamp_remote_outgoing.png'
+set title "TP-Link Switch Outgoing Remote Traffic (eth0)"
+plot "./result/tplink_switch_eth_remote_outgoing.dat" using 1:2 with lines
+# wlan1
+set output './result/tplink_switch_wlan_timestamp_remote_incoming.png'
+set title "TP-Link Switch Incoming Remote Traffic (wlan1)"
+plot "./result/tplink_switch_wlan_remote_incoming.dat" using 1:2 with lines
+set output './result/tplink_switch_wlan_timestamp_remote_outgoing.png'
+set title "TP-Link Switch Outgoing Remote Traffic (wlan1)"
+plot "./result/tplink_switch_wlan_remote_outgoing.dat" using 1:2 with lines
+
+# TPLink phone local
+# wlan1
+set output './result/tplink_phone_wlan_timestamp_local_incoming.png'
+set title "TP-Link Phone Incoming Local Traffic (wlan1)"
+plot "./result/tplink_phone_wlan_local_incoming.dat" using 1:2 with lines
+set output './result/tplink_phone_wlan_timestamp_local_outgoing.png'
+set title "TP-Link Phone Outgoing Local Traffic (wlan1)"
+plot "./result/tplink_phone_wlan_local_outgoing.dat" using 1:2 with lines
+
diff --git a/plot_scripts/plot_ts_graph_tplink_combined b/plot_scripts/plot_ts_graph_tplink_combined
new file mode 100644 (file)
index 0000000..7e3d82a
--- /dev/null
@@ -0,0 +1,45 @@
+# Script to plot time series graphs for network traffic analysis
+#
+# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
+# Programming Language Research Group @ University of California, Irvine
+# Winter 2018
+
+# ************ #
+# BASIC SETUP  #
+# ************ #
+set terminal pngcairo enhanced font 'Verdana,10'
+set autoscale
+set key
+unset log
+unset label
+set xtics 50
+set xtics rotate by 60 right
+set ytics auto
+set xlabel "Packet Timestamp (hh:mm:ss)"
+set ylabel "Packet Size (bytes)"
+set xdata time
+set timefmt "%H:%M:%S"
+set xrange [:]
+set yrange [0:]
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# TPLink switch local
+# wlan1 / eth0
+set output './result/tplink_switch_wlan_timestamp_local_incoming.png'
+set title "TP-Link Switch Incoming Local Traffic (wlan1/eth0)"
+plot "./result/tplink_switch_wlan_local_incoming.dat" using 1:2 with lines title "wlan1", "./result/tplink_switch_eth_local_incoming.dat" using 1:2 with lines title "eth0", "./result/tplink_phone_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/tplink_phone_wlan_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming"
+set output './result/tplink_switch_wlan_timestamp_local_outgoing.png'
+set title "TP-Link Switch Outgoing Local Traffic (wlan1/eth0)"
+plot "./result/tplink_switch_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1", "./result/tplink_switch_eth_local_outgoing.dat" using 1:2 with lines title "eth0", "./result/tplink_phone_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/tplink_phone_wlan_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming"
+
+# TPLink switch remote
+# wlan1 / eth0
+set output './result/tplink_switch_wlan_timestamp_remote_incoming.png'
+set title "TP-Link Switch Incoming Remote Traffic (wlan1/eth0)"
+plot "./result/tplink_switch_wlan_remote_incoming.dat" using 1:2 with lines title "wlan1", "./result/tplink_switch_eth_remote_incoming.dat" using 1:2 with lines title "eth0"
+set output './result/tplink_switch_wlan_timestamp_remote_outgoing.png'
+set title "TP-Link Switch Outgoing Remote Traffic (wlan1/eth0)"
+plot "./result/tplink_switch_wlan_remote_outgoing.dat" using 1:2 with lines title "wlan1", "./result/tplink_switch_eth_remote_outgoing.dat" using 1:2 with lines title "eth0"
+
index 23b286b..dfe1641 100644 (file)
@@ -41,21 +41,21 @@ set output './result/wemo_switch_wlan_timestamp_local_outgoing.png'
 set title "WeMo Switch Outgoing Local Traffic (wlan1)"
 plot "./result/wemo_switch_wlan_local_outgoing.dat" using 1:2 with lines
 
-# WeMo switch internet
+# WeMo switch remote
 # eth0
-set output './result/wemo_switch_eth_timestamp_internet_incoming.png'
-set title "WeMo Switch Incoming Internet Traffic (eth0)"
-plot "./result/wemo_switch_eth_internet_incoming.dat" using 1:2 with lines
-set output './result/wemo_switch_eth_timestamp_internet_outgoing.png'
-set title "WeMo Switch Outgoing Internet Traffic (eth0)"
-plot "./result/wemo_switch_eth_internet_outgoing.dat" using 1:2 with lines
+set output './result/wemo_switch_eth_timestamp_remote_incoming.png'
+set title "WeMo Switch Incoming Remote Traffic (eth0)"
+plot "./result/wemo_switch_eth_remote_incoming.dat" using 1:2 with lines
+set output './result/wemo_switch_eth_timestamp_remote_outgoing.png'
+set title "WeMo Switch Outgoing Remote Traffic (eth0)"
+plot "./result/wemo_switch_eth_remote_outgoing.dat" using 1:2 with lines
 # wlan1
-set output './result/wemo_switch_wlan_timestamp_internet_incoming.png'
-set title "WeMo Switch Incoming Internet Traffic (wlan1)"
-plot "./result/wemo_switch_wlan_internet_incoming.dat" using 1:2 with lines
-set output './result/wemo_switch_wlan_timestamp_internet_outgoing.png'
-set title "WeMo Switch Outgoing Internet Traffic (wlan1)"
-plot "./result/wemo_switch_wlan_internet_outgoing.dat" using 1:2 with lines
+set output './result/wemo_switch_wlan_timestamp_remote_incoming.png'
+set title "WeMo Switch Incoming Remote Traffic (wlan1)"
+plot "./result/wemo_switch_wlan_remote_incoming.dat" using 1:2 with lines
+set output './result/wemo_switch_wlan_timestamp_remote_outgoing.png'
+set title "WeMo Switch Outgoing Remote Traffic (wlan1)"
+plot "./result/wemo_switch_wlan_remote_outgoing.dat" using 1:2 with lines
 
 # WeMo phone local
 # wlan1
@@ -65,12 +65,4 @@ plot "./result/wemo_phone_wlan_local_incoming.dat" using 1:2 with lines
 set output './result/wemo_phone_wlan_timestamp_local_outgoing.png'
 set title "WeMo Phone Outgoing Local Traffic (wlan1)"
 plot "./result/wemo_phone_wlan_local_outgoing.dat" using 1:2 with lines
-# WeMo phone internet
-# wlan1
-set output './result/wemo_phone_wlan_timestamp_internet_incoming.png'
-set title "WeMo Phone Incoming Internet Traffic (wlan1)"
-plot "./result/wemo_phone_wlan_internet_incoming.dat" using 1:2 with lines
-set output './result/wemo_phone_wlan_timestamp_internet_outgoing.png'
-set title "WeMo Phone Outgoing Internet Traffic (wlan1)"
-plot "./result/wemo_phone_wlan_internet_outgoing.dat" using 1:2 with lines
 
diff --git a/plot_scripts/plot_ts_graph_wemo-insight b/plot_scripts/plot_ts_graph_wemo-insight
new file mode 100644 (file)
index 0000000..e4c245b
--- /dev/null
@@ -0,0 +1,68 @@
+# Script to plot time series graphs for network traffic analysis
+#
+# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
+# Programming Language Research Group @ University of California, Irvine
+# Winter 2018
+
+# ************ #
+# BASIC SETUP  #
+# ************ #
+set terminal pngcairo enhanced font 'Verdana,10'
+set autoscale
+unset key
+unset log
+unset label
+set xtics 50
+set xtics rotate by 60 right
+set ytics auto
+set xlabel "Packet Timestamp (hh:mm:ss)"
+set ylabel "Packet Size (bytes)"
+set xdata time
+set timefmt "%H:%M:%S"
+set xrange [:]
+set yrange [0:]
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# WeMo Insight switch local
+# eth0
+set output './result/wemo-insight_switch_eth_timestamp_local_incoming.png'
+set title "WeMo Insight Switch Incoming Local Traffic (eth0)"
+plot "./result/wemo-insight_switch_eth_local_incoming.dat" using 1:2 with lines
+set output './result/wemo-insight_switch_eth_timestamp_local_outgoing.png'
+set title "WeMo Insight Switch Outgoing Local Traffic (eth0)"
+plot "./result/wemo-insight_switch_eth_local_outgoing.dat" using 1:2 with lines
+# wlan1
+set output './result/wemo-insight_switch_wlan_timestamp_local_incoming.png'
+set title "WeMo Insight Switch Incoming Local Traffic (wlan1)"
+plot "./result/wemo-insight_switch_wlan_local_incoming.dat" using 1:2 with lines
+set output './result/wemo-insight_switch_wlan_timestamp_local_outgoing.png'
+set title "WeMo Insight Switch Outgoing Local Traffic (wlan1)"
+plot "./result/wemo-insight_switch_wlan_local_outgoing.dat" using 1:2 with lines
+
+# WeMo Insight switch remote
+# eth0
+set output './result/wemo-insight_switch_eth_timestamp_remote_incoming.png'
+set title "WeMo Insight Switch Incoming Remote Traffic (eth0)"
+plot "./result/wemo-insight_switch_eth_remote_incoming.dat" using 1:2 with lines
+set output './result/wemo-insight_switch_eth_timestamp_remote_outgoing.png'
+set title "WeMo Insight Switch Outgoing Remote Traffic (eth0)"
+plot "./result/wemo-insight_switch_eth_remote_outgoing.dat" using 1:2 with lines
+# wlan1
+set output './result/wemo-insight_switch_wlan_timestamp_remote_incoming.png'
+set title "WeMo Insight Switch Incoming Remote Traffic (wlan1)"
+plot "./result/wemo-insight_switch_wlan_remote_incoming.dat" using 1:2 with lines
+set output './result/wemo-insight_switch_wlan_timestamp_remote_outgoing.png'
+set title "WeMo Insight Switch Outgoing Remote Traffic (wlan1)"
+plot "./result/wemo-insight_switch_wlan_remote_outgoing.dat" using 1:2 with lines
+
+# WeMo Insight phone local
+# wlan1
+set output './result/wemo-insight_phone_wlan_timestamp_local_incoming.png'
+set title "WeMo Insight Phone Incoming Local Traffic (wlan1)"
+plot "./result/wemo-insight_phone_wlan_local_incoming.dat" using 1:2 with lines
+set output './result/wemo-insight_phone_wlan_timestamp_local_outgoing.png'
+set title "WeMo Insight Phone Outgoing Local Traffic (wlan1)"
+plot "./result/wemo-insight_phone_wlan_local_outgoing.dat" using 1:2 with lines
+
diff --git a/plot_scripts/plot_ts_graph_wemo-insight_combined b/plot_scripts/plot_ts_graph_wemo-insight_combined
new file mode 100644 (file)
index 0000000..c8eb1b4
--- /dev/null
@@ -0,0 +1,44 @@
+# Script to plot time series graphs for network traffic analysis
+#
+# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
+# Programming Language Research Group @ University of California, Irvine
+# Winter 2018
+
+# ************ #
+# BASIC SETUP  #
+# ************ #
+set terminal pngcairo enhanced font 'Verdana,10'
+set autoscale
+set key
+unset log
+unset label
+set xtics 50
+set xtics rotate by 60 right
+set ytics auto
+set xlabel "Packet Timestamp (hh:mm:ss)"
+set ylabel "Packet Size (bytes)"
+set xdata time
+set timefmt "%H:%M:%S"
+set xrange [:]
+set yrange [0:]
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# WeMo Insight switch local
+# wlan1 / eth0
+set output './result/wemo-insight_switch_wlan_timestamp_local_incoming.png'
+set title "WeMo Insight Switch Incoming Local Traffic (wlan1/eth0)"
+plot "./result/wemo-insight_switch_wlan_local_incoming.dat" using 1:2 with lines title "wlan1", "./result/wemo-insight_switch_eth_local_incoming.dat" using 1:2 with lines title "eth0", "./result/wemo-insight_phone_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/wemo-insight_phone_wlan_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming"
+set output './result/wemo-insight_switch_wlan_timestamp_local_outgoing.png'
+set title "WeMo Insight Switch Outgoing Local Traffic (wlan1/eth0)"
+plot "./result/wemo-insight_switch_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1", "./result/wemo-insight_switch_eth_local_outgoing.dat" using 1:2 with lines title "eth0", "./result/wemo-insight_phone_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/wemo-insight_phone_wlan_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming"
+
+# WeMo Insight switch remote
+# wlan1
+set output './result/wemo-insight_switch_wlan_timestamp_remote_incoming.png'
+set title "WeMo Insight Switch Incoming Remote Traffic (wlan1/eth0)"
+plot "./result/wemo-insight_switch_wlan_remote_incoming.dat" using 1:2 with lines title "wlan1", "./result/wemo-insight_switch_eth_remote_incoming.dat" using 1:2 with lines title "eth0"
+set output './result/wemo-insight_switch_wlan_timestamp_remote_outgoing.png'
+set title "WeMo Insight Switch Outgoing Remote Traffic (wlan1/eth0)"
+plot "./result/wemo-insight_switch_wlan_remote_outgoing.dat" using 1:2 with lines title "wlan1", "./result/wemo-insight_switch_eth_remote_outgoing.dat" using 1:2 with lines title "eth0"
diff --git a/plot_scripts/plot_ts_graph_wemo_combined b/plot_scripts/plot_ts_graph_wemo_combined
new file mode 100644 (file)
index 0000000..7b21215
--- /dev/null
@@ -0,0 +1,44 @@
+# Script to plot time series graphs for network traffic analysis
+#
+# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
+# Programming Language Research Group @ University of California, Irvine
+# Winter 2018
+
+# ************ #
+# BASIC SETUP  #
+# ************ #
+set terminal pngcairo enhanced font 'Verdana,10'
+set autoscale
+set key
+unset log
+unset label
+set xtics 50
+set xtics rotate by 60 right
+set ytics auto
+set xlabel "Packet Timestamp (hh:mm:ss)"
+set ylabel "Packet Size (bytes)"
+set xdata time
+set timefmt "%H:%M:%S"
+set xrange [:]
+set yrange [0:]
+
+# ***************** #
+# PER DEVICE SETUP  #
+# ***************** #
+# WeMo switch local
+# wlan1 / eth0
+set output './result/wemo_switch_wlan_timestamp_local_incoming.png'
+set title "WeMo Switch Incoming Local Traffic (wlan1/eth0)"
+plot "./result/wemo_switch_wlan_local_incoming.dat" using 1:2 with lines title "wlan1", "./result/wemo_switch_eth_local_incoming.dat" using 1:2 with lines title "eth0", "./result/wemo_phone_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/wemo_phone_wlan_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming"
+set output './result/wemo_switch_wlan_timestamp_local_outgoing.png'
+set title "WeMo Switch Outgoing Local Traffic (wlan1/eth0)"
+plot "./result/wemo_switch_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1", "./result/wemo_switch_eth_local_outgoing.dat" using 1:2 with lines title "eth0", "./result/wemo_phone_wlan_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/wemo_phone_wlan_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming"
+
+# WeMo switch remote
+# wlan1
+set output './result/wemo_switch_wlan_timestamp_remote_incoming.png'
+set title "WeMo Switch Incoming Remote Traffic (wlan1/eth0)"
+plot "./result/wemo_switch_wlan_remote_incoming.dat" using 1:2 with lines title "wlan1", "./result/wemo_switch_eth_remote_incoming.dat" using 1:2 with lines title "eth0"
+set output './result/wemo_switch_wlan_timestamp_remote_outgoing.png'
+set title "WeMo Switch Outgoing Remote Traffic (wlan1/eth0)"
+plot "./result/wemo_switch_wlan_remote_outgoing.dat" using 1:2 with lines title "wlan1", "./result/wemo_switch_eth_remote_outgoing.dat" using 1:2 with lines title "eth0"
diff --git a/run.sh b/run.sh
index e7c08bb..15f46d8 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -2,33 +2,66 @@
 
 # This lists down all the calls to the main_flow.sh script.
 # Basically, we make one call per one device that we want to analyze.
-PREFIX=wemo
-DEVICE=WeMo_Switch
-DEVICE_MAC=94:10:3e:36:60:09
 ROUTER=Router
 ROUTER_MAC=b0:b9:8a:73:69:8f
-PHONE=Nexus_5_Black
-PHONE_MAC=64:89:9a:86:a9:7d
-PATH_LOCAL=/scratch/traffic_measurements/WeMo-February-2018/wemo-local
-PATH_INTERNET=/scratch/traffic_measurements/WeMo-February-2018/wemo-internet
+#PHONE=Nexus_5_Black
+#PHONE_MAC=64:89:9a:86:a9:7d
+PHONE=Motorola
+PHONE_MAC=a8:96:75:2f:0c:9c
+
+#PREFIX=wemo
+#DEVICE=WeMo_Switch
+#DEVICE_MAC=94:10:3e:36:60:09
+#PATH_SETUP=/scratch/traffic_measurements/Switches-Feb2018/wemo/setup
+#PATH_LOCAL=/scratch/traffic_measurements/Switches-Feb2018/wemo/local
+#PATH_REMOTE=/scratch/traffic_measurements/Switches-Feb2018/wemo/remote
+
+#PREFIX=tplink
+#DEVICE=TPLink_Switch
+#DEVICE_MAC=50:c7:bf:33:1f:09
+#PATH_SETUP=/scratch/traffic_measurements/Switches-Feb2018/tplink/setup
+#PATH_LOCAL=/scratch/traffic_measurements/Switches-Feb2018/tplink/local
+#PATH_REMOTE=/scratch/traffic_measurements/Switches-Feb2018/tplink/remote
+
+#PREFIX=wemo-insight
+#DEVICE=WeMo_Insight_Switch
+#DEVICE_MAC=14:91:82:25:10:77
+#PATH_SETUP=/scratch/traffic_measurements/Switches-Feb2018/wemo-insight/setup
+#PATH_LOCAL=/scratch/traffic_measurements/Switches-Feb2018/wemo-insight/local
+#PATH_REMOTE=/scratch/traffic_measurements/Switches-Feb2018/wemo-insight/remote
+
+PREFIX=dlink
+DEVICE=DLink_Switch
+DEVICE_MAC=90:8d:78:e3:81:0c
+PATH_SETUP=/scratch/traffic_measurements/Switches-Feb2018/dlink/setup
+PATH_LOCAL=/scratch/traffic_measurements/Switches-Feb2018/dlink/local
+PATH_REMOTE=/scratch/traffic_measurements/Switches-Feb2018/dlink/remote
+
+PATH_SETUP_WLAN_JSON=$PREFIX.wlan1.setup.json
+PATH_SETUP_ETH_JSON=$PREFIX.eth0.setup.json
 PATH_LOCAL_WLAN_JSON=$PREFIX.wlan1.local.json
 PATH_LOCAL_ETH_JSON=$PREFIX.eth0.local.json
-PATH_INTERNET_WLAN_JSON=$PREFIX.wlan1.internet.json
-PATH_INTERNET_ETH_JSON=$PREFIX.eth0.internet.json
+PATH_REMOTE_WLAN_JSON=$PREFIX.wlan1.remote.json
+PATH_REMOTE_ETH_JSON=$PREFIX.eth0.remote.json
 PATH_GNUPLOT=./plot_scripts/plot_ts_graph_$PREFIX
+PATH_GNUPLOT_COMBINED=./plot_scripts/plot_ts_graph_$PREFIX\_combined
 PATH_DIR_RESULT=result
+PATH_RESULT_SETUP_WLAN=$PREFIX\_switch_wlan_setup
+PATH_RESULT_SETUP_ETH=$PREFIX\_switch_eth_setup
 PATH_RESULT_LOCAL_WLAN=$PREFIX\_switch_wlan_local
 PATH_RESULT_LOCAL_ETH=$PREFIX\_switch_eth_local
-PATH_RESULT_INTERNET_WLAN=$PREFIX\_switch_wlan_internet
-PATH_RESULT_INTERNET_ETH=$PREFIX\_switch_eth_internet
+PATH_RESULT_REMOTE_WLAN=$PREFIX\_switch_wlan_remote
+PATH_RESULT_REMOTE_ETH=$PREFIX\_switch_eth_remote
 PATH_RESULT_PHONE_LOCAL_WLAN=$PREFIX\_phone_wlan_local
-PATH_RESULT_PHONE_INTERNET_WLAN=$PREFIX\_phone_wlan_internet
+PATH_RESULT_PHONE_REMOTE_WLAN=$PREFIX\_phone_wlan_remote
 
+./main_flow.sh $PATH_SETUP/$PATH_SETUP_WLAN_JSON $PATH_DIR_RESULT/$PATH_RESULT_SETUP_WLAN $DEVICE $DEVICE_MAC
+./main_flow.sh $PATH_SETUP/$PATH_SETUP_ETH_JSON $PATH_DIR_RESULT/$PATH_RESULT_SETUP_ETH $ROUTER $ROUTER_MAC
 ./main_flow.sh $PATH_LOCAL/$PATH_LOCAL_WLAN_JSON $PATH_DIR_RESULT/$PATH_RESULT_LOCAL_WLAN $DEVICE $DEVICE_MAC
-./main_flow.sh $PATH_LOCAL/$PATH_LOCAL_ETH_JSON $PATH_DIR_RESULT/$PATH_RESULT_LOCAL_ETH Router b0:b9:8a:73:69:8f
-./main_flow.sh $PATH_INTERNET/$PATH_INTERNET_WLAN_JSON $PATH_DIR_RESULT/$PATH_RESULT_INTERNET_WLAN WeMo_Switch 94:10:3e:36:60:09
-./main_flow.sh $PATH_INTERNET/$PATH_INTERNET_ETH_JSON $PATH_DIR_RESULT/$PATH_RESULT_INTERNET_ETH Router b0:b9:8a:73:69:8f
-./main_flow.sh $PATH_LOCAL/$PATH_LOCAL_WLAN_JSON $PATH_DIR_RESULT/$PATH_RESULT_PHONE_LOCAL_WLAN Nexus_5_Black 64:89:9a:86:a9:7d
-./main_flow.sh $PATH_INTERNET/$PATH_INTERNET_WLAN_JSON $PATH_DIR_RESULT/$PATH_RESULT_PHONE_INTERNET_WLAN Nexus_5_Black 64:89:9a:86:a9:7d
-gnuplot $PATH_GNUPLOT
-
+./main_flow.sh $PATH_LOCAL/$PATH_LOCAL_ETH_JSON $PATH_DIR_RESULT/$PATH_RESULT_LOCAL_ETH $ROUTER $ROUTER_MAC
+./main_flow.sh $PATH_REMOTE/$PATH_REMOTE_WLAN_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_WLAN $DEVICE $DEVICE_MAC
+./main_flow.sh $PATH_REMOTE/$PATH_REMOTE_ETH_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_ETH $ROUTER $ROUTER_MAC
+./main_flow.sh $PATH_LOCAL/$PATH_LOCAL_WLAN_JSON $PATH_DIR_RESULT/$PATH_RESULT_PHONE_LOCAL_WLAN $PHONE $PHONE_MAC
+./main_flow.sh $PATH_REMOTE/$PATH_REMOTE_WLAN_JSON $PATH_DIR_RESULT/$PATH_RESULT_PHONE_REMOTE_WLAN $PHONE $PHONE_MAC
+#gnuplot $PATH_GNUPLOT
+gnuplot $PATH_GNUPLOT_COMBINED