* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Download Protocol - PUC-Rio
Computer network wikipedia , lookup
Policies promoting wireless broadband in the United States wikipedia , lookup
Extensible Authentication Protocol wikipedia , lookup
Distributed firewall wikipedia , lookup
SIP extensions for the IP Multimedia Subsystem wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Wireless security wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
MobiCS:
An Environment for Prototyping
and Simulating Distributed
Protocols for Mobile Networks
Ricardo C.A. da Rocha (IME/USP)
rcarocha@ime.usp.br
Markus Endler (PUC-Rio)
endler@inf.puc-rio.br
Outline
Motivation and Related Works
System Model and Reference Architecture
MobiCS Overview
Deterministic simulation
Stochastic simulation
Example
Conclusions
Motivation
Characteristics of Mobile Computing
Environments
Dynamic Network Topology
Energy is scarce resource Mobile Host may
enter doze mode or be turned off
Wireless communication
unreliable connectivity (e.g. intermittent periods of
disconnection)
QoS parameters change very fast
lower throughput
Motivation
Distributed Protocols for Mobile Computing
should...
handle variable number of interacting nodes
make efficient use of wireless communication
consider non-availability failure
maintain consistent distributed state despite
disconnections
be correct and efficient for any number of hosts
(scalability) and mobility pattern (mobility
robustness)
Fact: Evaluating the protocol´s correctness and
efficiency are difficult tasks
Motivation
Our goal:
Build a tool for rapid prototyping and evaluation of
distributed protocols (e.g. multicast, reliable message
delivery, notification protocols)
Approach: Protocol evaluation (correctness &
efficiency) through simulation.
The tool should support:
definition of appropriate abstractions for
programming the protocol (e.g. message, requestreply, transaction)
design of network elements with arbitrary behaviors.
programming of appropriate simulation models,
specially mobility models.
Other Simulators
Common Limitations
Protocol developer has also to deal with lowlevel details.
Form of simulation (e.g. parallel) is not fully
transparent.
Limited extensibility.
Lack of integrated support for protocol
validation and testing.
Limited programmabilty of mobility models.
System Model for Protocols
in Mobile Computing
We assume a structured mobile network composed
of Mobile Hosts (MHs), Mobility Support Stations (MSSs)
We adopt the Indirect Model [Badrinath94], where all
communications are split into a wired and a wireless part
Basic unit of interaction in a protocol message
If mobile host is reachable, wireless message is
delivered. But MH may be disconnected or migrating.
QoS of the wireless connection is modeled as its effective
transmission rate.
Hand-Off is initiated by the MH
At any time, every MH is associated with exactly one MSS
Reference Architecture for
Simulation
Application
Distributed
Protocols
Network Elements
Simulation
Engine
Application makes service
requests (user or automatically
generated)
Distributed Protocols are
programmed and tested
Network Elements implement
HW and basic SW
functionality (OS, low-level
Netw. Protocols)
Simulation Engine:
schedules event processing order
may implement several simulation
modes.
MobiCS
Mobile Computing Simulator
MobiCS is a java class library implementing the
Reference Architecture
Main Advantages:
Single tool for prototyping, validating and analysing
distributed protocols.
A generic Simulation Engine API offers complete
transparency of simulation modes.
Programmable and customizable simulation models
(e.g. mobility, connectivity, etc.)
Supports the creation of abstractions for protocol
implementation.
Comes with a deterministic and a stochastic
simulation mode (others may be added).
MobiCS:
Protocol Programming
Object-oriented protocol design
Protocols are composed of micro-protocols, which
interact through events (mainly, messages and timers)
Main Protocol Components:
Protocol
Wired
Wireless
Handoff
Micro-protocols are Java interfaces whose methods are
handlers for the events.
MobiCS:
Deterministic Simulation
Used for debugging/testing the correctness of the
protocol.
A user creates a simulation script, which is executed by
the simulator.
This script describes a specific scenario (i.e. pattern of
protocol-external events)
Events may be application requests, MH migrations, MH
disconnections, etc.
Global synchronization points end_step() in the script
define the causal order relationship among the events.
Message acceptance can be toggled on/off to simulate
message transmission delays: Accept(msgType) and
AcceptTurnOn(bool).
MobiCS:
Deterministic Simulation
Example:
Mh1.moveTo(cell1);
Mh1.send(new Req);
Mss3.accept(Req);
end_step();
// Mh1 at cell of Mss3
Mh2.unavailable();
The simulation executes in steps (i.e. there is no notion
of simulated time)
Scripts should reflect critical situations in which the
protocol behaviour is to be tested.
Since only a minimal fraction of all possible situations
can be described, this method gives no guarantee of the
protocol´s correctness testing
MobiCS:
Deterministic Simulation
C
Script
server
res
Home agent
(ha)
MSSo
mh
MSSn
req
req
{ha,MSSo,MSSn}.acceptOn()
mh.send(new Req());
mh.moveTo(MSSn);
end_step();
Independent // cut C
server.accept(Req);
res
events
mh.accept(Res);
res
MobiCS:
Deterministic Simulation
Output
Programmer may add printout of messages in
specific event handlers
User-configurable Event Log generated by MobiCS´
simulation engine.
Exceptions raised during execution of either the script
or the protocol code.
MobiCS:
Stochastic Simulation
Allows “performance analysis” of a protocol (i.e.
message complexity)
Conists of a continuous test with randomly generated
events.
User creates a simulation model:
Defines the behavior of all network elements concerning mobility
and connectivity.
Simulation Model can be:
programmed (extending classes) or
configured (instantiation of pre-defined objects).
A simulationObject (for each network element)
determines whether an event of certain type will be
generated at each simulated time unit.
Using MobiCS
Protocol Implementation extend basic classes
Protocol and Message
Implement the Network Elements and configure
the network to be simulated extend basic
classes Mss, Mh, ...
Build the simulation scenarios:
Choose the deterministic scenarios program
deterministic script run simulation compare
expected and real result
Choose stochastic simulation model create
corresponding simulation objects run simulations
analyse event log
Example
RDP
server
Res
Req
proxy
Ack
Proxy created
MSSp
Mh
Req
ForwardRes
DeReg PList
UpCurLoc
MSSo
ForwardRes
?
Greet
Ack
UpCurLoc
Hand-off
DeReg
PList
Ack
MSSn
Greet
FRes
RDP Structuring:
Protocol Interactions
Mh
• Protocol structured as 3 micro-protocols
wired, wireless e handoff
ForwardRes
Mss
Req,Ack
Mss
wireless
wired
handoff
wireless
ForwardRes
wireless
RemPList
PList
UpdCurrLoc
DeReg
wired
handoff
RDP Structuring:
Protocols
Since there are 3 types of network elements, Server, Mh
and Mss ...
we need to declare following Protocol interfaces:
RDPHandOffModule
RDPMssWired
RDPMssWireless
RDPMhWireless
RDPServerWired
Define 3 protocol instances (subclasses of Protocol):
RDPServer, RDPMh, RDPMss, that implement the
corresponding Protocols
Example:
Network Configuration
mh = new MyMh(“Mh 1",sim);
cell1 = new Cell();
cell2 = new Cell();
cell3 = new Cell();
mss1 = new MyMss(“Mss 1",sim,cell1);
mss2 = new MyMss(“Mss 2",sim,cell2);
mss3 = new MyMss("Mss 3",sim,cell3);
wr = new WiredLink(mss2.getAddress(),
mss1.getAddress());
wr2 = new WiredLink(mss1.getAddress(),
mss3.getAddress());
Example: Choosing a
Deterministic Scenario
Goal: Test protocol when ForwardRes arrives at
a MSS while a Mh is migrating to another cell
server
Res
MSSo receives ForwardRes before
proxy
Req
Proxy
created
handoff
of Mh
MSSp
Mh
MSSo
Ack
is completed
Req
ForwardRes
DeRegPList
UpCurLoc
?
Greet
ForwardRes
UpCurLoc
DeReg PList
MSSn
Ack
Greet
FRes
Ack
Example:
Scripting the Scenario
server
Req
proxy
Res
Proxy created
MSSp
Mh
MSSo
Req
DeRegPList
UpCurLoc
Greet
Server.acceptTurnOn(false);
MSSn.acceptTurnOn(false);
Mh.send(new Req());
Mh.moveTo(MSSo);
end_step();
Ack
Mh.moveTo(MSSn);
end_step();
Server.acceptTurnOn(true);
ForwardRes
end_step();
MSSn.acceptTurnOn(true);
ForwardRes
?
Ack
UpCurLoc
DeReg PList
MSSn
Ack
Greet
FRes
Example:
Stochastic Simulation
Example of a Simulation Model
MH Activity and Cell Attraction
Activity: probability that a MH is active (reachable)
Cell Atraction: probability that a migrating MH chooses the cell
as its target cell Mobilidade
Migration Willingness: probability that a MH moves to another
cell
Network Topology: neighbourhood relation among cells
Wireless QoS: Effective wireless transmission rate
Application requests: probability that a service is
requested from the protocol (e.g. RDP request)
Stochastic Simulation:
Some Results
ForwardResult /
Requests
We measured how the number of re-transmissions (ForwardResult)
per Requests is affected by the Mobility Factor
Mobility factor = probability that a migration event is generated every
n simulated time units
2
1.5
1
0.5
0
0
0.2
0.4
0.6
0.8
1
Migration Factor
Other tests: size of proxyList with growing Request/Migration Ratio
Conclusion: RDP´s message overhead grows quickly with increasing
migration and request rates.
Conclusions
MobiCS Flexible simulation environment that
integrates protocol testing (correctness) and performance
analysis
Supports modular and extensible prototyping of
distributed protocols OO and micro-protocols
Provides deterministic and stochastic simulation modes,
and allows for other modes (e.g. parallel) to be
programmed.
Protocol implementation is totally independent of the
chosen simulation mode.
Conclusions
Main Contributions:
Implementation of a tool for prototyping and analysis
of distributed protocols MobiCS
Proof of concept of:
Reference Architecture for flexible and extensible
simulators for Mobile Computing.
Framework for the implementation of MC simulation
models and integration in a simulator
Usability
MobiCS has been used in a graduate courses at
IME/USP to implement a multicast protocol MCAST
[Acharya93]
Conclusions
Future Works:
Define “Network Emulation API” MobiCS as a testbed
for MC applications
Build library of mobility and wireless QoS models.
Implement parallel simulation mode.
Create Graphic User Interfaces script creation, logbased animation, protocol debugging
MobiCS is freely available
URL http://www.ime.usp.br/~rcarocha/mobics