Showing posts with label gre. Show all posts
Showing posts with label gre. Show all posts

Saturday, May 18, 2013

OpenFlow, GRE and VxLan Pcaps, Amazon EC2 BOTO (Python API)


Here are pcaps from the little experiment we did.

OpenFlow Pcap – 192.168.2.4 is OVS and 192.168.2.14 is OVS Controller 
Download here

\
























GRE Pcap - Download here


























VxLan Pcap - Open file in wireshark and "Decode As -> VxLan"  Download here


























I have Amazon EC2 running OwnCloud software over Ubuntu. Amazon provides a Python based API, BOTO, to control the EC2 instances. Here is the code snipped to fish some info about your instance.

<Code Begin>

#!/usr/bin/python

import boto.ec2
import re
import sys

def main():
  conn = boto.ec2.connect_to_region("ec2_location", aws_access_key_id='your_aws_key', aws_secret_access_key='your_aws_secrete')
  if conn:
    print "Connected to --->", re.split(':', str(conn))[1]
  else:
    print "Connection failed"
    sys.exit(2)

  reservations = conn.get_all_instances()
  print reservations,'\n'
  for i in range(0, len(reservations)):
    instance = reservations[i].instances
    print "Instance Name --->", instance[0]
    for x in range(0, len(instance)):
      print "Instance Type --->", instance[x].instance_type
      print "Instance Placement --->", instance[x].placement
      print "Instance ID --->", instance[x].id
      print "Instance State --->", instance[x].state
      print "Instance Public IP Address --->", instance[x].ip_address
      print "Instance Hyervisor --->", instance[x].hypervisor
      print "\n"

if __name__ == '__main__':
  main()

<Code End>