bridging the gap: turning a network simulation into an emulation mac newbold

13
Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold Mac Newbold

Upload: imogen-logan

Post on 01-Jan-2016

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Bridging the Gap:Turning a Network Simulation

into an Emulation

Mac NewboldMac Newbold

Page 2: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Motivation: Simulation Benefits:Benefits:

Easy to useEasy to use Quick developmentQuick development Low costLow cost

Drawbacks:Drawbacks: Results are only as accurate as the simulator Results are only as accurate as the simulator

model of the worldmodel of the world May help develop working protocol, but no May help develop working protocol, but no

working “real world” implementationworking “real world” implementation

Page 3: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Motivation: Emulation Benefits:Benefits:

Can be perfectly accurateCan be perfectly accurate It It isis the real world the real world

Uses real implementationsUses real implementations Develop/test protocol and implementation Develop/test protocol and implementation

simultaneouslysimultaneously

Drawbacks:Drawbacks: Needs real hardwareNeeds real hardware

Purchase, configure, maintain, etc.Purchase, configure, maintain, etc. Harder to program, debug, reconfigureHarder to program, debug, reconfigure

Page 4: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Motivation: Goals Simulation and emulation are both Simulation and emulation are both

becoming easier to usebecoming easier to use Still usually mutually exclusiveStill usually mutually exclusive

Choose one or the other, and stick with itChoose one or the other, and stick with it Our Goals:Our Goals:

Bring simulation and emulation closerBring simulation and emulation closer Easier transition from one to the otherEasier transition from one to the other

Take advantage of all the benefitsTake advantage of all the benefits Eliminate the drawbacksEliminate the drawbacks

Page 5: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Current State of the Art Most network simulations use NSMost network simulations use NS

A.k.a. NS-2A.k.a. NS-2 Stable, well-known, widely usedStable, well-known, widely used Has limited emulation capabilitiesHas limited emulation capabilities

Emulation platforms are being developedEmulation platforms are being developed Many small one-time do-it-yourself testbedsMany small one-time do-it-yourself testbeds Utah Network TestbedUtah Network Testbed

Hardware provided, easy configurationHardware provided, easy configuration Uses NS simulator scripts as inputUses NS simulator scripts as input Flexible, customizableFlexible, customizable

Page 6: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Plan of Attack Use NS simulator scripts to drive automatic Use NS simulator scripts to drive automatic

traffic generation in the Testbedtraffic generation in the Testbed Plan A: Using NS emulationPlan A: Using NS emulation Plan B: Using other traffic generatorsPlan B: Using other traffic generators

Plan A Results:Plan A Results: NSE (NS-emulator) was very difficult to useNSE (NS-emulator) was very difficult to use Not even the scripts that came with ns workedNot even the scripts that came with ns worked Declared to be infeasibleDeclared to be infeasible

Move on to Plan BMove on to Plan B

Page 7: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Design Plan: Take ns scripts as input, and configure Plan: Take ns scripts as input, and configure

a traffic generator to do the same thing that a traffic generator to do the same thing that ns would have donens would have done

Testbed supplies traffic generation OSKit Testbed supplies traffic generation OSKit kernels (send, consume, request, reply)kernels (send, consume, request, reply)

Most common ns traffic (and most useful in Most common ns traffic (and most useful in the Testbed) is CBR/UDP (constant bit rate)the Testbed) is CBR/UDP (constant bit rate)

Goal: Find CBR/UDP in ns script, and Goal: Find CBR/UDP in ns script, and configure send/consume to emulate itconfigure send/consume to emulate it

Page 8: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Results Added functionality to the Testbed thatAdded functionality to the Testbed that

Parses the ns script, getting all necessary traffic Parses the ns script, getting all necessary traffic generation informationgeneration information

Outputs Testbed commands to correctly Outputs Testbed commands to correctly configure the kernels on the right nodesconfigure the kernels on the right nodes

Works great! Works great! And now, an example:And now, an example: We took an ns script with CBR/UDP traffic We took an ns script with CBR/UDP traffic

and ran it on the Testbed… Seamlessly!and ran it on the Testbed… Seamlessly!

Page 9: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Start with the NS scriptset ns [new Simulator]

set send [$ns node]set consume [$ns node]

set router [$ns node]

set client [$ns node]set server [$ns node]

$ns duplex-link $send $router 100Mb 1ms DropTail$ns duplex-link $router $consume 100Mb 1ms DropTail

$ns duplex-link $client $router 100Mb 1ms DropTail$ns duplex-link $router $server 100Mb 1ms DropTail

# Insert Testbed commands here to turn on routing in # the router node and to add routes to client/server

Page 10: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

End with the NS script

#Create a UDP agent and attach it to node sendset udp0 [new Agent/UDP]$ns attach-agent $send $udp0

# Create a CBR traffic source and attach it to udp0set cbr0 [new Application/Traffic/CBR]$cbr0 set packetSize_ 1024$cbr0 set rate_ 100Mbps$cbr0 attach-agent $udp0

# Create a null agent to consume, and connect themset null0 [new Agent/Null] $ns attach-agent $consume $null0$ns connect $udp0 $null0

$ns at 0.00001 "$cbr0 start"$ns at 0.04900 "$cbr0 stop"

$ns run

Page 11: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

NS Simulation Topology

Page 12: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Demonstration We log into the TestbedWe log into the Testbed Fill out the formFill out the form Let the nodes reboot, and we’re readyLet the nodes reboot, and we’re ready On the router node:On the router node:

Check for automatic trafficCheck for automatic traffic On the client node:On the client node:

Try sending a lot of packets to the server Try sending a lot of packets to the server (through the bottleneck router)(through the bottleneck router)

See how many get clobberedSee how many get clobbered

Page 13: Bridging the Gap: Turning a Network Simulation into an Emulation Mac Newbold

Conclusions The automatic configuration of traffic The automatic configuration of traffic

generation in an emulated environment, generation in an emulated environment, based on simulated traffic, is a very useful based on simulated traffic, is a very useful way to bring simulation and emulation way to bring simulation and emulation closer together.closer together.

This functionality is now present in the This functionality is now present in the Utah Network Testbed (www.emulab.net)Utah Network Testbed (www.emulab.net)