GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin...

64
GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison [email protected] [email protected]

Transcript of GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin...

Page 1: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

GIMS Tutorial - GEC 12Packet Capture for GENI

Charles Thomas

& Dongchan Kim

University of Wisconsin - Madison [email protected]

[email protected]

Page 2: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

GIMS Tutorial

• Follow along (cut and paste commands):http://gims.wail.wisc.edu/docs/Tutorial.html

• Start your VirtualBox Tutorial image.

Page 3: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Tutorial Outline

• Introduction to GIMS.

• Setting up for using GIMS.

• Creating a capture filter.

• Creating an RSpec.

• Creating a slice and starting the experiment

Page 4: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Tutorial Outline (Cont.)

• Tour of the monitoring GUI tools.

• Pause/Restart traffic capture.

• Stop and teardown the experiment.

• Post-experiment data analysis.

• System capabilities.

• Future directions / Q&A

Page 5: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

What is GIMS?

• GENI Instrumentation and Measurement Systems• Collaboration between University of Wisconsin

(Barford), Colgate University (Sommers) and Boston University (Crovella)

• High-speed packet capture system integrated with ProtoGENI.

• Infrastructure could be modified to support other types of instrumentation.

Page 6: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

GIMS Architecture

• ProtoGENI Scripts– Allow us to control the capture system.

• GIMS Backend– Coordinates communication.

• MySQL Database• Capture Device

– Daemon & hardware

• Web-based GUIs– Device and configuration control, real-time

monitoring, experiment results.

Page 7: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 8: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

GIMS Database

• MySQL• Stores information about:

– Experiments– Capture Devices– Experiment/Device pairings– Device Configurations– Experiment Results– Device Statistics

Page 9: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 10: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

‘capd’, the GIMS Capture Daemon

• XML/RPC control structures• Supports a wide variety of hardware.• libpcap support• Flow aggregation based on IPFIX• CryptoPan anonymization• Sampling (every N, randomized)• Remote storage (SSH, Amazon S3)

Page 11: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 12: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

ProtoGENI Scripts

Page 13: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Current Functionality• CreateSliver

– Create new experiment

– Load config into device

– Start capture

• StopSliver

– Pause capture

• StartSliver

– Restart capture after pause

• DeleteSlice

– Shutdown capture activities and cleanup.

Page 14: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 15: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Installing the ProtoGENI Scripts

Page 16: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

M2crypto> sudo apt-get install python-m2crypto

Page 17: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Test Scripts> wget http://www.emulab.net/downloads/protogeni-tests.tar.gz

Page 18: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Test Scripts>mkdir test_scripts;

>tar xzf protogeni-tests.tar.gz –C test_scripts;

Page 19: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Emulab AccountClick ‘Request Account’ button on http://www.schooner.wail.wisc.edu

Page 20: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Emulab AccountChoose the corresponding option

Page 21: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Emulab AccountFill out the form

Page 22: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Emulab AccountClick the ‘Submit’ button when done

Page 23: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSL CertificateClick ‘Login’ button

Page 24: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSL CertificateLogin with your account

Page 25: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSL CertificateClick ‘Generate SSL Cert’ in the left column

Page 26: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSL CertificateType the PassPhrase for your certificate and Emulab Password

Page 27: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSL CertificateClick ‘Download’ to save your SSL Certificate

Page 28: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSL CertificateSave the SSL Certificate as ‘$HOME/.ssl/encrypted.pem’

Page 29: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSL CertificateCreate a ‘$HOME/.ssl/password’ file containing the PassPhrase for your certificate

Page 30: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSH Key> cd $HOME/.ssl; ssh-keygen –f protogeni-key

Page 31: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSH KeyClick ‘Edit SSH Keys’ on the Emulab login page

Page 32: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSH KeyAdd the public key and Emulab password at the bottom of the web page

Page 33: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

SSH KeyThe keys added to your account

Page 34: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Creating a Capture Filter

http://gims.wail.wisc.edu/cgi-bin/GIMSControl.cgi

Page 35: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 36: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Setup Capture Filter

• Config Name: GEC12_<name>• Source IP address: 10.1.1.3• Destination IP address: 10.1.1.2• Source port number: 48060• Destination port number: 5001• Protocol: UDP

Page 37: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Setup Capture Filter (Cont.)

• SSH User: gimsusr• SSH Host: ops.schooner.wail.wisc.edu• SSH Port: 22• SSH Path: /proj/GEC12/data• SSH Private Key: foo• Rollover Interval: 1 minute• Sampling: everyN• Param: 5

Page 38: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Creating an Rspec For Your Experiment

cd ~geni/Tutorials/GIMS/

cp GimsMSNProduction.rspec GEC12.rspec

vi GEC12.rspec

Page 39: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 40: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Save as “GEC12.rspec”

When you’re done editing, simply type “ZZ”

Page 41: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Creating a Slice and Starting the Experiment

cd ~geni/Tutorials/GIMS

ls -l

./registerslice.py -n <slicename>

./createsliver.py -m https://gims.wail.wisc.edu/protogeni/xmlrpc/cm -d -n <slicename> GEC12.rspec

Page 42: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

GIMS Monitoring Tools

•gimsd - Device monitor

•LogViewer.cgi

•Results.cgi

Page 43: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

‘gimsd’ - The GIMS Hardware Monitoring Daemon

•Sits in a loop looking for running experiments.

•If it finds any, queries the capture device via SNMP to get information on the device status (Only queries each device once.), storing results in DB.

•Calls ‘GetExperimentStats’ for each running experiment and stores the results in the database.

•Runs every 15 seconds (configurable).

Page 44: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 45: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 46: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 47: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.
Page 48: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Pause/Restart Capture

./sliveraction.py -m https://gims.wail.wisc.edu/protogeni/xmlrpc/cm -d -n <slicename> stop

./sliveraction.py -m https://gims.wail.wisc.edu/protogeni/xmlrpc/cm -d -n <slicename> start

Page 49: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Stopping and Tearing Down the Experiment

./deleteslice.py -m https://gims.wail.wisc.edu/protogeni/xmlrpc/cm -d -n <slicename>

Page 50: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Post-Experiment Analysis

Page 51: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Accessing Captured Data

• As configured by GEC12 config, captured data is at:

Host: ops.schooner.wail.wisc.eduUsername: gimsusrPassword: genigec12Directory: /proj/GEC12/data/[exp ID]/

Page 52: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

• Packet analyzer

• Display packet in fields

• Selective view of packets by filters

WireShark

Page 53: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Experimental Traffic

• Packet generator: Iperf

• Protocol: UDP

• Source IP address: 10.1.1.3

• Source port number: 48060

• Destnation IP address: 10.1.1.2

• Destination port number: 5001

Page 54: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Experimental Traffic

Page 55: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

WireShark Usage

Page 56: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

WireShark Usage

Page 57: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

WireShark Usage

Page 58: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

WireShark Usage

Page 59: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

System Capabilities

•Current system is fairly low-end

•Dell 2650 PowerEdge server

•Onboard e1000 network card

Page 60: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

System Capabilities

• In metadata file,

<stat_update timestamp="21:28:11">

<device_packets_received>11952058</device_packets_received>

<device_packets_dropped>23574</device_packets_dropped>

<device_interface_drops>0</device_interface_drops>

<packets_observed>11928476</packets_observed>

<bytes_observed>18035855712</bytes_observed>

</stat_update>

Page 61: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Stress Test – Capture Daemon

 

1000Mbps w/o

Samp.

1000Mbps w/

Samp.

100Mbps w/o

Samp.

100Mbps w/

Samp.

1Mbps w/o

Samp.

1Mbps w/

Samp.

Pkt received 387508252 330336415 238551004 286693045 2241462 695764

Pkt dropped 44196832 27430032 542675 0 0 0

Ratio 11.40539118 8.303665825 0.227488039 0 0 0

** Sampled every 5th packet

Page 62: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Stress Test – NIC

 

1000Mbps w/o

Samp.

1000Mbps w/

Samp.

100Mbps w/o

Samp.

100Mbps w/

Samp.

1Mbps w/o

Samp.

1Mbps w/

Samp.

Pkt received 387508252 330336415 238551004 286693045 2241462 695764

Pkt dropped 1538178305 1255481441 0 0 0 0

Ratio 79.87687817 79.16933438 0 0 0 0

** Sampled every 5th packet

Page 63: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Future Directions

• Wide variety of feature requests, bug fixes, security improvements.

• Integration with other frameworks.

• Deployment of 5 more GIMS capture systems across the US to make capture more widely available.

Page 64: GIMS Tutorial - GEC 12 Packet Capture for GENI Charles Thomas & Dongchan Kim University of Wisconsin - Madison cthomas@wisc.edu cthomas@wisc.edu dkim24@wisc.edu.

Q&A