The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

20
The Georgia Tech Network The Georgia Tech Network Simulator Simulator (GTNetS) (GTNetS) ECE6110 ECE6110 August 25, 2008 August 25, 2008 George F. Riley

Transcript of The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

Page 1: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

The Georgia Tech Network The Georgia Tech Network SimulatorSimulator(GTNetS)(GTNetS)

ECE6110ECE6110August 25, 2008August 25, 2008

George F. Riley

Page 2: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

OverviewOverviewNetwork Simulation BasicsGTNetS Design PhilosophyGTNetS DetailsBGP++Scalability ResultsFAQFuture PlansDemos

2

Page 3: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

Network Simulation Basics Network Simulation Basics - 1- 1Discrete Event Simulation

◦Events model packet transmission, receipt, timers, etc.

◦Future events maintained in sorted Event List

◦Processing events results in zero or more new events Packet transmit event generates a future

packet receipt event at next hop

3

Page 4: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

Network Simulation Basics Network Simulation Basics - 2- 2Create Topology

◦Nodes, Links, Queues, Routing, etc.Create Data Demand on Network

◦Web Browsers, FTP transfers, Peer-to-Peer Searching and Downloads, On--Off Data Sources, etc.

Run the SimulationAnalyze Results

4

Page 5: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

Network Simulation Basics Network Simulation Basics - 3- 3

5

TCP Client 1

TCP Client 2

TCP Server 1

TCP Server 2

100 Mbps, 5ms

100 Mbps, 5ms

100 Mbps, 5ms

100 Mbps, 5ms

10 Mbps, 20ms

Page 6: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS Designed Like Real GTNetS Designed Like Real NetworksNetworks

Nodes have one or more Interfaces◦ Interfaces have IP Address and Mask◦ Interfaces have an associated Link object

Packets append and remove PDU’sClear distinction between protocol stack layersPacket received at an Interface

◦ Forwards to Layer 2 protocol object for processing◦ Forwards to Layer 3 based on protocol number (800 is

IPV4)◦ Forwards to Layer 4 based on protocol number (6 is TCP)◦ Forwards to application based on port number

6

Page 7: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS Design PhilosophyGTNetS Design PhilosophyWritten Completely in C++Released as Open SourceAll network modeling via C++

objectsUser Simulation is a C++ main

programInclude our supplied “#include” filesLink with our supplied librariesRun the resulting executable

7

Page 8: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS Details - NodeGTNetS Details - Node

8

Node

Interface

Queue

Link

L2 Protocol

Interface

Queue

Link

L2 Protocol

Routing Info

Location

Port Map

Page 9: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS Details - PacketGTNetS Details - Packet

9

Packet Unique ID

Size

Timestamp

Header Header Header Header

Page 10: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS ApplicationsGTNetS ApplicationsWeb Browser (based on Mah’1997)Web Server - including Gnutella GCacheOn-Off Data SourceFTP File TransferBulk Data Sending/ReceivingGnutella Peer-to-PeerSyn FloodUDP Storm Internet WormsVOIP

10

Page 11: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS ProtocolsGTNetS ProtocolsTCP, complete client/server

◦ Tahoe, Reno, New-Reno◦ Sack (in progress)◦ Congestion Window, Slow Start, Receiver Window

UDP IPV4 (IPV6 Planned) IEEE 802.3 (Ethernet and point-to-point) IEEE 802.11 (Wireless)Address Resolution Protocol (ARP) ICMP (Partial)

11

Page 12: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS RoutingGTNetS RoutingStatic (pre-computed routes)Nix-Vector (on-demand)Manual (specified by simulation application)EIGRPBGPOSPFDSRAODV

12

Page 13: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS Support ObjectsGTNetS Support ObjectsRandom Number Generation

◦ Uniform, Exponential, Pareto, Sequential, Emiprical, Constant

Statistics Collection◦ Histogram, Average/Min/Max

Command Line Argument ProcessingRate, Time, and IP Address Parsing

◦ Rate(“10Mb”), Time(“10ms”)◦ IPAddr(“192.168.0.1”)

13

Page 14: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

GTNetS Distributed GTNetS Distributed SimulationSimulationSplit topology model into several partsEach part runs on separate workstation or

separate CPU in SMPEach simulator has complete topology

picture◦ “Real” nodes and “Ghost” nodes

Time management and message exchange via Georgia Tech “Federated Developers Kit”.

Allows larger topologies that single simulation

May run faster

14

Page 15: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

ExampleExample

UNC Chapel Hill, Feb 3, 2006 15

// Simple GTNetS example// George F. Riley, Georgia Tech, Winter 2002

#include "simulator.h" // Definitions for the Simulator Object#include "node.h" // Definitions for the Node Object#include "linkp2p.h" // Definitions for point-to-point link objects#include "ratetimeparse.h" // Definitions for Rate and Time objects#include "application-tcpserver.h" // Definitions for TCPServer application#include "application-tcpsend.h" // Definitions for TCP Sending app#include "tcp-tahoe.h" // Definitions for TCP Tahoe

int main(){ // Create the simulator object Simulator s;

// Create and enable IP packet tracing Trace* tr = Trace::Instance(); // Get a pointer to global trace object tr->IPDotted(true); // Trace IP addresses in dotted notation tr->Open("intro1.txt"); // Create the trace file TCP::LogFlagsText(true); // Log TCP flags in text mode IPV4::Instance()->SetTrace(Trace::ENABLED);// Enable IP tracing all nodes // Create the nodes Node* c1 = new Node(); // Client node 1 Node* c2 = new Node(); // Client node 2 Node* r1 = new Node(); // Router node 1 Node* r2 = new Node(); // Router node 2 Node* s1 = new Node(); // Server node 1 Node* s2 = new Node(); // Server node 2

// Create a link object template, 100Mb bandwidth, 5ms delay Linkp2p l(Rate("100Mb"), Time("5ms")); // Add the links to client and server leaf nodes c1->AddDuplexLink(r1, l, IPAddr("192.168.0.1")); // c1 to r1 c2->AddDuplexLink(r1, l, IPAddr("192.168.0.2")); // c2 to r1 s1->AddDuplexLink(r2, l, IPAddr("192.168.1.1")); // s1 to r2 s2->AddDuplexLink(r2, l, IPAddr("192.168.1.2")); // s2 to r2

// Create a link object template, 10Mb bandwidth, 100ms delay Linkp2p r(Rate("10Mb"), Time("100ms")); // Add the router to router link r1->AddDuplexLink(r2, r); // Create the TCP Servers TCPServer* server1 = new TCPServer(TCPTahoe()); TCPServer* server2 = new TCPServer(TCPTahoe()); server1->BindAndListen(s1, 80); // Application on s1, port 80 server2->BindAndListen(s2, 80); // Application on s2, port 80 server1->SetTrace(Trace::ENABLED); // Trace TCP actions at server1 server2->SetTrace(Trace::ENABLED); // Trace TCP actions at server2

// Create the TCP Sending Applications TCPSend* client1 = new TCPSend(TCPTahoe(c1), s1->GetIPAddr(), 80, Uniform(1000,10000)); TCPSend* client2 = new TCPSend(TCPTahoe(c2), s2->GetIPAddr(), 80, Constant(100000)); // Enable TCP trace for all clients client1->SetTrace(Trace::ENABLED); client2->SetTrace(Trace::ENABLED);

// Set random starting times for the applications Uniform startRv(0.0, 2.0); client1->Start(startRv.Value()); client2->Start(startRv.Value()); s.Progress(1.0); // Request progress messages s.StopAt(10.0); // Stop the simulation at time 10.0 s.Run(); // Run the simulation std::cout << "Simulation Complete" << std::endl;}

// Simple GTNetS example// George F. Riley, Georgia Tech, Winter 2002

#include "simulator.h" #include "node.h"#include "linkp2p.h#include "ratetimeparse.h"#include "application-tcpserver.h"#include "application-tcpsend.h"#include "tcp-tahoe.h"

int main(){ // Create the simulator object Simulator s;

// Simple GTNetS example// George F. Riley, Georgia Tech, Winter 2002

#include "simulator.h" // Definitions for the Simulator Object#include "node.h" // Definitions for the Node Object#include "linkp2p.h" // Definitions for point-to-point link objects#include "ratetimeparse.h" // Definitions for Rate and Time objects#include "application-tcpserver.h" // Definitions for TCPServer application#include "application-tcpsend.h" // Definitions for TCP Sending app#include "tcp-tahoe.h" // Definitions for TCP Tahoe

int main(){ // Create the simulator object Simulator s;

// Create and enable IP packet tracingTrace* tr = Trace::Instance(); tr->IPDotted(true); tr->Open("intro1.txt"); TCP::LogFlagsText(true); IPV4::Instance()->SetTrace(Trace::ENABLED);

// Create the nodesNode* c1 = new Node(); // Client node 1Node* c2 = new Node(); // Client node 2Node* r1 = new Node(); // Router node 1Node* r2 = new Node(); // Router node 2Node* s1 = new Node(); // Server node 1Node* s2 = new Node(); // Server node 2

// Create and enable IP packet tracingTrace* tr = Trace::Instance(); tr->IPDotted(true); tr->Open("intro1.txt"); TCP::LogFlagsText(true); IPV4::Instance()->SetTrace(Trace::ENABLED);

// Create the nodesNode* c1 = new Node(); // Client node 1Node* c2 = new Node(); // Client node 2Node* r1 = new Node(); // Router node 1Node* r2 = new Node(); // Router node 2Node* s1 = new Node(); // Server node 1Node* s2 = new Node(); // Server node 2

// Create a link object template, //100Mb bandwidth, 5ms delayLinkp2p l(Rate("100Mb"), Time("5ms")); // Add the links to client and server leaf nodesc1->AddDuplexLink(r1, l, IPAddr("192.168.0.1")); c2->AddDuplexLink(r1, l, IPAddr("192.168.0.2")); s1->AddDuplexLink(r2, l, IPAddr("192.168.1.1")); s2->AddDuplexLink(r2, l, IPAddr("192.168.1.2"));

// Create a link object template, //10Mb bandwidth, 100ms delayLinkp2p r(Rate("10Mb"), Time("100ms"));// Add the router to router linkr1->AddDuplexLink(r2, r);

// Create a link object template, 100Mb bandwidth, 5ms delay Linkp2p l(Rate("100Mb"), Time("5ms")); // Add the links to client and server leaf nodes c1->AddDuplexLink(r1, l, IPAddr("192.168.0.1")); // c1 to r1 c2->AddDuplexLink(r1, l, IPAddr("192.168.0.2")); // c2 to r1 s1->AddDuplexLink(r2, l, IPAddr("192.168.1.1")); // s1 to r2 s2->AddDuplexLink(r2, l, IPAddr("192.168.1.2")); // s2 to r2

// Create a link object template, 10Mb bandwidth, 100ms delay Linkp2p r(Rate("10Mb"), Time("100ms")); // Add the router to router link r1->AddDuplexLink(r2, r);

// Create the TCP ServersTCPServer* server1 = new TCPServer(TCPTahoe());TCPServer* server2 = new TCPServer(TCPTahoe());server1->BindAndListen(s1, 80); server2->BindAndListen(s2, 80); server1->SetTrace(Trace::ENABLED); server2->SetTrace(Trace::ENABLED);

// Create the TCP Sending ApplicationsTCPSend* client1 = new TCPSend(TCPTahoe(c1), s1->GetIPAddr(), 80, Uniform(1000,10000));TCPSend* client2 = new TCPSend(TCPTahoe(c2), s2->GetIPAddr(), 80, Constant(100000));

TCPServer* server1 = new TCPServer(TCPTahoe()); TCPServer* server2 = new TCPServer(TCPTahoe()); server1->BindAndListen(s1, 80); // Application on s1, port 80 server2->BindAndListen(s2, 80); // Application on s2, port 80 server1->SetTrace(Trace::ENABLED); // Trace TCP actions at server1 server2->SetTrace(Trace::ENABLED); // Trace TCP actions at server2

// Create the TCP Sending Applications TCPSend* client1 = new TCPSend(TCPTahoe(c1), s1->GetIPAddr(), 80, Uniform(1000,10000)); TCPSend* client2 = new TCPSend(TCPTahoe(c2), s2->GetIPAddr(), 80, Constant(100000));

// Enable TCP trace for all clientsclient1->SetTrace(Trace::ENABLED);client2->SetTrace(Trace::ENABLED);

// Set random starting times for the applicationsUniform startRv(0.0, 2.0);client1->Start(startRv.Value());client2->Start(startRv.Value()); s.Progress(1.0); // Request progress messagess.StopAt(10.0); // Stop the simulation at time 10.0s.Run(); // Run the simulationstd::cout << "Simulation Complete" << std::endl;}

// Enable TCP trace for all clientsclient1->SetTrace(Trace::ENABLED);client2->SetTrace(Trace::ENABLED);

// Set random starting times for the applicationsUniform startRv(0.0, 2.0);client1->Start(startRv.Value());client2->Start(startRv.Value()); s.Progress(1.0); // Request progress messagess.StopAt(10.0); // Stop the simulation at time 10.0s.Run(); // Run the simulationstd::cout << "Simulation Complete" << std::endl;}

TCP Client 1

TCP Client 2

TCP Server 1

TCP Server 2

Page 16: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

Integration of Zebra bgpd Integration of Zebra bgpd into ns-2/GTNetSinto ns-2/GTNetS

Zebra bgpd:◦ One BGP router per

process (C).◦ Works on real-time.◦ Blocking routines.◦ BSD sockets.

ns-2/GTNetS:◦ Multiple BGP routers per

process (C++).◦ Works on simulation-time.◦ Non-blocking routines.◦ Simulator’s TCP

implementation.

Convert C code to C++. Convert real-time to simulation-time functions. Remove blocking routines and interleave schedulers. Replace sockets with the simulator TCP implementation.

16

GFR
GFR
Page 17: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

BGP++ scalabilityBGP++ scalability

Compact routing table structure.◦ Observations:

Memory demand, O(n3), driven by memory required for representing routing tables.

BGP attributes account for most of the memory required for a single routing table entry.

Different entries often have common BGP attributes.

◦ Solution: Use a global data structure to store and share BGP attributes. Avoid replication.

◦ Proof of concept simulations of up to 4,000 ASs in a single workstation with 2GB RAM.

Extend BGP++ to support parallel/distributed BGP simulations. Solve memory bottleneck problem. 17

Up to 62% memory savings, 47% on average.

GFR
is this set up typical4000????//
GFR
Page 18: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

Other BGP++ featuresOther BGP++ features

BGP++ inherits Zebra’s CISCO-like configuration language.

Develop a tool to automatically generate ns-2/GTNets configuration from simple user input.

Develop a tool to automatically partition topology and generate pdns configuration from ns-2 configuration, or distributed GTNetS topology.◦ Model simulation topology as a weighted graph: node

weights reflect expected workload, link weights reflect expected traffic.

◦ Graph partitioning problem: find a partition in k parts that minimizes the edge-cut under the constraint that the sum of the nodes’ weights in each part is balanced.

18

Page 19: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

Scalability Results - PSCScalability Results - PSCPittsburgh Supercomputer Center128 Systems, 512 CPU’s, 64-bit

HP SystemsTopology Size

◦15,064 Nodes per System◦1,928,192 Nodes Total Topology◦1,820,672 Total Flows◦18,650,757,866 Simulation Events◦1,289 Seconds Execution Time

19

Page 20: The Georgia Tech Network Simulator (GTNetS) ECE6110 August 25, 2008 George F. Riley.

Questions?Questions?

20