COOJA Network Simulator: Exploring the Infinite Possible Ways to Compute the Performance Metrics of IOT Based Smart Devices to Understand the Working of IOT Based Compression & Routing Protocols

This paper demonstrates the scheme regarding Internet of Things (IOT) which is well thought-out the next generation of Internet. IOT explicitly elaborates the assimilation of human beings and physical systems, as they can cooperate with each other so…

Authors: Tayyab Mehmood

COOJA Network S imulator: Exploring the Infin ite Possible Ways to Co m pute th e Performance Metrics of IOT Based Smart Devices to Understand the Wo rking of IOT Based Compression & Rout ing Protocols Tayyab Mehm ood Dept. of Electri cal Engineering, SEEC S, NUST Islam abad Abstract — this paper demonstrates the sche m e regarding Internet of Things (IOT) which is well thought-out t he nex t generation of Internet. IO T explicitly elaborates the assimilation o f h uman beings an d physical systems, as they can cooperate with each other so leading towards a sort of encroachment in networking by interconne cting things together w hile mak ing use of w ireless embedded systems, said to be the building blocks of IOT, that are capable to be given a n IP a ddress and thus making the m part of the global internet. Several essential approaches that entail in IOT a nd supports this innovation are being argued in t his paper. 6LoWPAN (IPV6 Low Power Personal A rea Networks) is a protocol used to appropriately and efficiently use IPV6 addresses. Control messages of RPL routing protocol for low power devices are discussed t o understand the working of RPL protocol. In the end Contiki OS based COOJA Network simulator is use d to de m onstrate the working of ho w these ro uting and compression protocol works in real time si m ulation. Keywords — IOT, 6LoWPAN, IPV6, RPL Routin g Protocol, Contiki OS, COOJA Network Simula tor. I. INTRODUCTION Since few decades the global in ternet has amended significantly in numerous ways which has put immense impact on hu man societ y as well. A dvanceme nt o f Inter net is still o n and ti me to time various new in novations are emerging. T his paper’s core emphasis is on a n innovati ve contraption in net working na med as Internet of Things (IOT), it is one of those i nnovations which is g oing to en close a noteworthy givi ng i n the field of net working. IOT is “ connecting things together ” th us IOT involves interconnection of IP enable d devices called smart objects being clo sely related to M2M communication, and because those co mmon things bec ome so smart t hat they can comprehend their surroundings. since physical bod ies are existing roughly at all p laces in the world these t hings can sense inputs a nd then transform them in to a data set which is then proce ssed on internet, t his can be na med as sensing par t of IOT, inversely a certain thing can receive some data from internet and ca n tell y ou about som ething using ac tuators this can be named as act uating part of IOT. Finally summarizi ng IOT it can be said that the combinatio n of physical objects plus actuators, sensors, co ntroller p lus internet formulates I OT [1]. IPV6 is the most dependable factor which is the key to the success of IOT, as there will be trillions of ob jects that need to be given IP s so I PV6 formulates that incredib ly much promising to allocate t hose addresses. As there will be trillions of small o bjects joining the internet most of which is going to happen through w ireless technology hence it is going to be a very much new i nternet whic h is going to b e very much la rge then the current internet itself one day. The distinctive s mart object ( thing ) impleme nted on IOT w as a co ke machine, connected to the internet, in 1980s at the Carnegie Melon University. The union of IP SO (IP for Smart Objec ts) has made a prodigious work to sponsor the use of IP address for low power devices [2]. IPSO su pports the usage of t he layered IP architecture for lo w power wireless sensor nodes whic h have a small CPU inside the m and i t is also the lead ing associatio n for o utlining the IOT ( Internet of Things) . T he collaboration of I PSO with I ETF (Internet engineering tas k force) quicken s the i mplementation of IPv6 on LLNs (low po wer an d lossy networks). 6LoWPAN (IPv6 o ver Low po w er W ireless Personal Area Net works) standar d gives the idea of using Ip v6 for ever y small and lo w po wer device and it is specified b y IETF organization [3]. The 6LoWP AN standar d permits the use of web services without any applicatio n ga teways, because of this n odes with limited hardware an d computing resources are b ecome capable to contribute in IOT. This pap er shows the RPL (IPv6 based Routing Pr otocol for Low po wer and Lossy Networks) [ 4], which has bee n made by the IETF group to reduce t he routing issues i n LLNs. RPL gears up methods to cut the energy co nsumption of the IOT smart devices by dynamicall y control the sending rate of control packets and ad dressing topology in dependab ility only when data packets ha ve to be sent. RP L us e IPv6 addressing protocol and supports traffic flow not o nly in the do wnward direction (from the gateway/r outer to leafs), but also in the upward direction. [5] and [6] shows the effect of lossy ra dio links o n the maximum a chievable t hroughput, over all reliability of the link a nd power efficienc y of t he system. D ue to br oadcasting and retransmission s of the packets lossy radio links increase s the power co nsumption a nd w ith lossy radio networks we could achieve roughly half o f the data r ate as compared to the lossless networks. [7] Sho ws the impact of lossy radio links and resulted that the 50% to 80% of the energy is wasted due to environmental effects in o utdoor a nd in indoor situations and to overcome the packet collisio ns. To encounter the challenges and req uirements of lossy ra dio networks, IE TF ROLL Worki ngGroup designed a new routi ng protocol for wireless and wired networks named as RPL [8].The main aim of RPL is to offer efficient routing paths fo r MP2P and P2MPtraffic desi gns in LLNs b ut it is idea l for data sink communication (n-to1 or MP 2P). RPL also su pports the new Internet Pr otocol IPv6. In the later sections of the pa per are o rganized as follows in section II wireless sensor net w orks have been briefl y discussed, in sect ion III 6LoWP AN has been highlighte d, section IV e mphasizes o n LRP , section V belo ngs to COOJA simulator and disc ussion will finally be conc luded in section VI. II. Wireless Sensor Network WSN is a collection of nu m ber of sensors that manipulates the physical o r environmental condition s. WSNs usually p ossess many d istributed sensors w hich consists o f a tra nsducer “a device used for transfor mation of energy from one for m to another”, po wer source, a microprocessor and a transceiver these in combination examines the condition of a physical body and the n forwards the d ata to w ards a certain data center to which the network is co nnected. WSNs ty picall y varie s in size as some sensors have big power s ources like batter y and some have small po w er sources. W SN is a part of IOT as is based upon these sensors everything that belongs to IOT has to be coupled with such sensors so that these sensors can monitor their b ehavior or condition. [9] several issues t hat are associated with W SNs include battery timing because to have a co nstant connection to t he internet a node usi ng certain protocols must be on regular basis but the advantages a WSN can p rovide cannot be exempted, which can pla y a re markable role in the progressio n of IOT[1 0 ]. III. 6LoWPAN 6LoWPAN is a standard protocol that is imperative for the efficient usage o f IPV6 over lo w power low rate wireless sensor networks via an adapti on layer [11 ], therefore the name 6LoWPAN has b een derived by t he combinatio n of IPV6 and low power se nsor networks [ 12]. IPV6 b eing very heavy for low po w er wireless sensor netw orks is co mpressed w ith the help o f 6LoWPAN using a range of co m pressing techniques so that it can be u sed within those lo w po wer enviro nments efficiently. As a good number of the WSNs are being p owered by batteries so energy efficiency beco mes a cr ucial need which should be p leasing. T he IEEE 802.15.4 stan dard offers the solution b y introducing data rates of 2 0 to 250 kb/s depending on which frequency channel is bei ng used [1 3]. During transmi ssions certain protocols lay much o verhead, in particular, IPV6 which has much longer headers t hat c an occupy rest of the available band width whic h turns out to be a real setback while imposing IP to WSNs. To resolve this problem 6 LoWPAN was launched in which, with the help of an adaption layer, header compressio n and f ragmentation are made possible m aking the IP V6 overhead lesser and lesser. i. IEEE 802.15.4 and 6LoWPAN LAYRING. Figure 1 give a pict ure of how a 6LoWP AN adaption la yer is used to permit IPV6 over IEEE 802.15.4 standard, different layers and their respective contributions are as follows. Application layer is ac countab le for web communicati on among nodes and it m akes use of HT TP protocol. -Socket presents interface between Application layer and Transport layer.-TCP/UDP protoco ls are used for caring Application layer m essages over trans port layer.IPV6 and I CMPV6 are representing net work layer where IPV6 performs node to node delivery and ICMP V6 is liable for correc ting errors and few more basic functionalities.6 LoWPAN adaption layer takes account o f header compression i n order to overcome t he overhead of I PV6.Media Access Control offers access to the physical channel. -Physical layer in IEEE 802.15.4 standar d is used for number o f functions it provides energy management, RF transceiver, and chan nel selection [14] . ii. COMPRESSION TECHNIQUES Header compression is one of the most pr ominent contributions of 6 LoWPAN in IOT. Generally t wo species of compressions are encountered by 6LoWPAN stateful a nd stateless. In stateful compression there are certain fields who don’t modify t heir value s throughout co mmunication whereas is stateless compression ce rtain fields dra w o n common valu es due to which the header length shrin ks [15]. 6 LoWPAN presents stateless co mpression which is also k nown as HC, this technique can switch a 4 0 or 60 b y tes into few bytes as pointed up in figure 2 . T he version field in IPV6 packet format ca n be neglected pro vided all nodes are using the same IPV6 version, similarly le ngth of the packet can also be overlooked because that infor mation can b e achieved b y MAC header[16], furth er most of the b y tes are o ccupied by the Figure 1: IEEE 802.15.4 and 6LoWPAN layering [8]. Source and d estination addresses they can b e compressed in three unlike ways which are classified as partl y and ful ly compressed header s. In t w o partl y compressed headers source and destination fields are co m pressed sep arately in t wo packets and in full y co mpressed headers both source and destination fields ar e compressed at a time in a single pac ket. Partly co m pressio ns are used a m ong gateways and sensor nodes whereas fully compr essions are used among sensor nodes within the same net work [17]. Figure 2 IP Header Compression from 40 bytes to 2-4 bytes [5]. IV . OVERVIEW OF RPL PROTOCOL RPL is a distance vector routi ng pro tocol for low power small devices and for lossy networks that use IPv6. T hese small network devices are connected in such a way that they don’t create an y loop. B ecause of th is Destination Oriented Dir ected Acyclic Graph (DODAG) i s built to route at a single ter minus. This destination node is named as DODAG root in the R PL specification. The network graph is assembled by u sing the OF ( Objective Fu nction) which explains how the ro uting metric is ca lculated. Durin g to pology creation OF states t hat how routing constraints and other functio ns are taken into account. LLN radio links are very instable, have ver y low data rates and have very hi gh lo ss rat es and these limitatio ns are considered while defini ng the OF (minimizing latency, energy, etc ). Network has to be o ptimized accord ing to the di ff erent application scenarios. For instance, a DODAG may be constructed acco rding to the battery po wer consumpti on of the device, m emory of th e device, processing capab ility o f the device or according to the ET X (Expec ted Nu mber of Transmissions). So net work o ptimization is done by the RPL Instance which permits to build a logical routing topology over the p resent WSN arrangement and RPL p rotocol also states the objective function for a gro up of one or more DODAGs. To avoid routing loops with respect to the DO DAG ro ot, nodes calculate its p osition relative to the other nodes and this position is na med as Ran k or Cos t. If t he node is mobile th en Rank increase s (if node move away fro m the DO DAG roo t) and decreases (if the node m ove the direction of t he DOD AG root). In the network graph, DOD AG root is grounded when it satisfy all the goals and it is floating when it doe s not specify all th e goals but o nly i n DO DAG co mmunication. Towards root, immediate succe ssor of t he lea f (ch ild) is known as parent. T hese leafs ar e of two kinds either they store the routing tables for sub-DOD AG or the y do not store any routing table but o nly know their par ents. For infor mation exchange and topolo gy maintenance, RPL protocol uses four t ypes o f control messages; DOD AG Information Obj ect (DIO), Destination Advertisement Obj ect (DAO), DODAG Information Solicitation (DIS) a nd D AO - ACK. Like beaco n DIO multicasts the RPL instance in the downward direction to allow the other sensor nod es to sto res the infor mation abo ut IPv6 address of the root, current RPLInstance, current ra nk o f th e node and joined it. If leaf don’t hear ant announce ment then it can se nd a request named as DIS. DI S make feasible fo r the leaf to request for th e DIO message ( neighbor disco very). DAO is the r equest fro m the leaf to the root/parent to j oin it on the DOD AG as a child. DAO -ACK is a response of DAO message which is se nt by the root or p atent (root recipient) to th e lea f. I n RP L netwo rk there are three kinds of nodes. The first one is root nodes which o ffer the connectivity t o the leaf nodes and so metimes it is also known as gateway node. T he second one i s r outer which is used to advertise the topology i nformation and routing tables to the neighbors. The third one is lea f (child node) which has the abilit y to join the DOD AG and it does not have the ability to send DIO message. Fig 3: Flow diagram of control messages o f RPL protoco l Most o f the routing protocols usually br oadcast the control messages at a co nstant rate wh ich cause the waste of energy o f the device w hen it is i n a s table co ndition. T herefore RP L protocol uses the Tr ickle algorithm to contro l the sending r ate of DIO message s [1 0]. The control message s will be exceptional in a network with stable links however control messages will send m ore often i n the sit uation where t he topology changes rep eatedly. 1. S TRUCTURE OF DI O CONTROL MESSAGE To construct the topol ogy, DI O message is the main source of information. Figure 2 sho ws the structure of the DI O message. After sendi ng the DIS request message, node rec eive the DI O and discover the RPL instance by storing the first data field of the DIO control messa ge. Fig 4: Structure of DIO co ntrol message RPL i nstance ID is used t o uniquely identify the set of independent DODAGs b est for th e given situation. 128 bit DODAG ID is the routable IPv6 ad dress of the r oot no de. Whenever DOD AG reco nstruction is needed, DOD AG version number is incre mented. “G” tells whether the DODAG is grounded or not. “MOP” (mode of Operatio n) is arranged by the DODAG root and it is used for downward routing. “Prf” field defines the preferable roo t node and it is of 3 bits. DSTN is used to st ore the sequence number and is used by the node to see the fres hness of the DIO message. 2. R OUTING LOOPS I N LLNs: Because of link failure or mobilit y network top ology may change and a node m ay take a different path for the giv en destination. Loop m ay occur if t he child n ode picked as the next hop. Because of this loop, delays, w aste of bandwidth and device energy, pac ket dro ps and network co ngestion may occur in LLNs. T herefore, RPL pro tocol for LLNs must explain a loop avoid ance mechanism durin g t he topology construction. i. LOOP AVOIDENCE STRATEGY Up till now, in the network graph Rank is responsible for the node’s po sition and router multicast the DIO messages to the neighboring nodes for the topology maintenance. If ever y node in the r ange accept the multicast message and consider the DIO m essage sender for the calculatio n o f p arent set then it m ay b e possible that child nodes are chosen as the next hope. Fig 5: Sink(green) and sources (yell ow) in the COOJA Network Simulat or Enviornment If the node 2 computes the DIO message fro m the node 5 and consider it as a effective potential p arent. If the link betwe en node 2 and ro ot node 1 fails then node 2 w ill automaticall y consider its child node (5) as the ne xt hop and eventually loop will occur. Since ETX co st via node 5 to the root node 1 is 3 and ET X cost via node 2 to the root node is 2 therefore n ode does not analyse the DIO message from the higher Rank nodes than itself. ii. RPL METRICS IN LL Ns: Most of the routing pro tocols only consider the link metrics of the network and don’t consider the node’ s current status but this may b e critical for the LLNs where nodes have limited resources and are batter y powered. Node’s status co m prises of available memory, re maining energ y of the batter y and the CPU usage. For instance, if a chain to pology happens i n the WSN dep loyment then the las t node before the root node will typically experience more forwarding overhead and greater traffic load. In figure 5 all the nodes in the network produce some data packets and send th em to the root nod e, in this manner node 2 may fail rapidly because of the extra energ y consumption. Although link between node 3 and node 6 is not the best p ath but it may be sensible to send the data via node 6 because it offers a more s table nod e conditio n. As a resu lt, in [7] numerous metric categories are considered before choosing the ne xt hop by ROLL Working Group. Fig 5: Chain Topology in LLNs iii. ENERGY CONSUMPTION OF IN LLNs: Energy consumption o f nodes method suggest that before choosing the next hop as a po ssible parent a node should weigh up the ener gy level of its neighbors. RPL metric specification use two fields of d ata. Type field define the ty pe of the node, either the node is o n batteries o r on p ower. If t he network device is po wered it means t hat it may be a d ata collector or a root node. During parent selectio n or next hop selection such po w ered nodes are preferable. Second field includes the EE (Ener gy E stimation). Network de vices on batteries must calc ulate the EE value b efore selecting the parent. EE is the ratio of th e P ower-now (remaining energy) to the Po w er-max (esti mated power at boot up). iv. EXPECTED NUMBER OF TRANSMISSIONS IN LLNs: Expected number of transmissions to se nd th e data messages to the root node. T he value of ETX is 1 for the network devi ce which is one hop away f rom th e ro ot node and h ave stron g signal strength with lossless path model. ETX calculates the link qualit y of a si ngle hop between t wo neighboring nodes. PRR (packet reception rate) is used to ca lculate the link quality a nd it is computed at th e receiver node. P RR is the ratio of the number of the rec eived d ata p ackets to the number of send data packets. Fig 6: expected number of tra nsmissions required to send the data to the data co llector node V. COOJA NETWORK SIMULATOR OVERVIEW COOJA is a n etwork simulato r wh ich permits the emulatio n of real hardware plat forms. COOJ A is the app lication of Contiki OS concentrati ng on network behavior. COOJ A is capable of simulating wireless sensor network without any particular m ote. Coo ja su pported follow ing set of standard s; TR 1100, TI CC2420, C ontiki-RPL, IEEE 802.15.4, uIPv6 stack and uIPv4 stac k. There are four propagatio n models in the COOJA simulator which must be selected b efore starting a new s imulatio n [16]. The f irst model is constant loss Unit Disk Gr aph Medium (UD GM) and it take the id eal transmission ra nge disk i n which motes i nside the transmission disk receive data packets and motes outside the transmission disk do not get any p acket. The second model is distance lo ss UDGM is the extension of constant loss UDGM and it also consider the ra dio interferences. Packets ar e transmitted with “success rat io TX” probability and packets are rec eived with p robability of “success r atio RX”. T he th ird model is Directed Grap h Radio Medium (DGRM) and it states the p ropagation d elays for the radio links. Last path loss model i s multipath Ray- tracer Medium (MRM) and it uses t he ray tracing methods such as Friis formula to calculate the receiver power. MRM is also cap able of computing the diffractions, re flections a nd r efractions alon g the radio links [17]. i. COOJA SIMULATION INTERFACE COOJA network si mulator inter face co mprises of five windows. The net w ork win dow d isplays the physical arrangement of the motes. I n order to build a topology, o ne could change the physical position of the mote s. In netwo rk window, all the different have d ifferent colors according to their functionality, i.e. sink mote has a green color and the sender mote has the yello w colo r. Mote attributes, r adio environment o f ea ch mote, mote type and r adio traffic between the motes co uld also the see n visually in the net work windows. Simulatio n control window help s us to control the speed of the simulation and to pause, start and reload the current ru nning simulation. Note window is used to write the theory and key points o f the simulation and save them in the note window. Fig 7: different windows of COOJA networ k simulator to compute the perfor mance matrics Cooja netw ork simulator shows a timeline for each mote in the running si mulation. We co uld use timeline for visualizing the both the po wer consumption and networ k traffic in the wireless sensor net works. In ro w three f or mote 1, Color of the mote shows t he po w er state of the transceiver: if t he mo te is off then it is white, o n then it is gra y as shown for mote 1 . White and gra y color is either hardware is off or on b ut the red color line in the s econd row s hows that w henever the no de hardware goes o n its radio transceiver is also goes o n. In first row in ti meline of m ote 1, Radio transmissions are s hown by blue color, reception by green and radio interference i s shown by red . VI. CONCLUSION Change in the world of communication among several entities have been a burning iss ue for a long time and has sho wed a great pro gress in the form of numerous i nnovations a m ong which IOT is of great significance w hich i s all about ma king communication, pos sible, among di fferent device s, u sing sensors and actuators . T his pap er formulates working of compression and routing protocols in IOT environment. In this paper, we see how COOJ A network simulator enables the emulation d ifferent kinds of motes a nd how t he routing matrices are computed. COO JA simulator is also used as a power visualizer i n this paper. REFRENCES [1] Adrian McEwen. Hak im Cassimally. Desi gning the Internet of Things. [2] A. Dun kels and J. P . V asse ur. Why IP. IPSO A lliance White Paper #1, 2008 [3] G. Montenegro, N. Kushalnagar, J. Hui, and D. Culler. RFC 4944: Transmission of IPv6 packets over IEEE 802.14 networks, 2007. [4] T. Winter, P. Thubert, A. Brandt, T. Clausen, J. Hui, R. Kelsey, P. Levis, K. Pister, R. Struik, and J. P. Vasseur. R PL: IPv6 Routing Protocol for Low power and Lossy Networks. ROLL Working Group, 2011. [5] Y. L i, J. Har m s, and R . Holte. Impact of loss y links on performance of multihop wireless networks. In Computer Communications and Networks, 2 005. ICCCN 2005, pages 303 – 308, 2005. [6] A. Cerpa, J. Wong, L. Kuang, M. Potkonjak, and D. Estrin. Statistical m odel of lo ssy links in wireless s ensor networks. In Information Processing in Sensor Netw orks, IP SN 2 005, pages 81 – 88, 2005. [7] J. Zhao and R. Govindan. Un derstanding packet delivery performance in dense wireless sensor networks. In Proceedings of the 1st International Conference o n Embedded Networked Sensor Systems, SenSys ’03, pages 1– 13, New York, USA, 2003. [8] J. P. Vasseur, N. Agarwal, J. Hu i, Z. Shelby, P . Bertrand, and C. Chauvenet. RPL: IPv6 Routing P rotocol for Low power and Lossy Networks. IPSO Alliance, 2011. [9 ] http://en.wikipedia.org/wiki/Wireless_sensor_network [10 ] 6LoWPAN w orking group, The 6LoWPAN architecture. [11 ] Charu C. Agga rwal. Naveen Asheesh, Amit Sheth. THE INTERNET OF T HINGS, A SERV EY FROM DATA CENTR IC PRESPECTIVE. [12] Arfah A. Hasbollah, Sharifah H. S. Ariffin, M. Ismi A. Hamini. Performance Analysis F or 6 loWPAN IEEE 8 02.15.4 with IPv6 Network [13] Zach Shelby, Carsten Bo rmann. 6LoWPAN:The Wireless Embedded Internet [14] Ch risti an Fuchs, Dr. Alexander Klein. IP - based Communication in Wireless Sensor Network. [15] Jorge Higuera, Jose Po lo. Understanding the IEEE 1451 standard in 6loWPAN Sensor Networks. [16] M. Stehlik. Com parison of Simulators for Wireless Sensor Networks. PhD thesis, Masaryk University, 2011. [17] F. Osterlin d, A. Dunkels, J. Eriksson, N. Finne, And T. Voigt. Cross-level se nsor network simulation w ith c ooja. In LCN, 2006 , pages 641 – 648, nov 2006 Tayy ab Mehmood is a Post Graduate student of EE in SEECS, NUST Islamabad. He did his b achelor from the Islamia University Ba hawalpur. He is the author of several papers which were published in reputed j ournals of El sevier & in IEEE Conferences.

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment