Direct Execution of OLSR MANET Routing Daemon in NS-3 Evgeni Bikov, Pavel Boyko IITP RAS, Moscow Overview • Questions: – Can the ns-3-dce framework run unmodified OLSRd routing daemon? – Does it match the out of box ns-3 OLSR model? – Can it be used instead of model in large scale simulation campaigns? • Answer: yes • … almost Motivation • MANET routing protocol models are difficult to verify. Specification Model Implementation • 3X more verification when model coexists with the “real” implementation! Direct Code Execution • Run [as much as possible] unmodified ”implementation” code instead of model in simulated environment. • Methods: – Virtual machines; – Manual source modifications (AODV-UU); – Automatic source modifications (NSC). NS-3-DCE Framework • http://code.nsnam.org/mathieu/ns-3-dce • No source code patching: – custom ELF loader with automatic globalization; – custom process and thread management; – glibc API reimplemented to use NS-3 API; – netlink API reimplemented . • Shown to run Zebra routing daemon. • Now runs Linux kernel as well as user space applications. OLSRd • • • • http://olsr.org Production quality OLSR implementation. ~80 KLOC in C, user space, portable, BSD license. Widely used in community mesh networks, O(10K) installations worldwide: – http://guifi.net 12K+ operating nodes, Spain – http://funkfeuer.at Austria • Large number of RFC extensions; plugin architecture. • OLSRv2 implementation in progress. Running OLSRd on NS-3-DCE • OLSRd appeared to be quite demanding to glibc implementation quality (good test case) • But finally it runs • Now how to check that NS-3-DCE executes OLSRd correctly? – read PCAPs; – compare to virtual machine execution; – compare to out of box NS-3 OLSR model. OLSRd vs. ns3::olsr::RoutingProtocol • • • • Small static topologies Steady state simulation No traffic apart OLSR Observables: – routing tables @ all nodes; – mean packet size (B); – mean packet rate (1/s). • Results: – all routing tables match; – mean packet size and rate: up to 2X difference. Calibration • Find and fix the differences between OLSRd and NS-3 OLSR model until observables match. • Differences found: – – – – default timeouts HELLO compression message aggregation message jitter OLSRd modified; model modified; model modified; OLSRd modified. • After calibration observables match within 1-5%. Example: Message Jitter RFC NS-3 OLSR model OLSRd Comparison: Transient Behavior • • • • 100 nodes Static random positions No traffic Mean known route length (top) • Number of known destinations (bottom) • Similar behavior, but difference >> stddev. Comparison: Steady State • Good: average steady state route length matches. • Bad: up to 2x difference in average packet size and average packet rate. • Calibration made for small networks does not help at larger scale. Need more accurate message compression and aggregation mechanisms in the model. Comparison: Performance • OLSRd outperforms model at 100 nodes Conclusions • Use model at the early stages of MANET routing protocol design/research. • Finally discard model and switch to DCE of implementation. • Use calibration procedure in between to test model and implementation against each other.