DEVNET-1172VIRL – Your Network Simulation 'Swiss-Army Knife'

41

Transcript of DEVNET-1172VIRL – Your Network Simulation 'Swiss-Army Knife'

VIRL – Your Network Simulation ’Swiss-Army Knife’

Joel Obstfeld, Distinguished Engineer

DEVZONE-0076

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

•  System Overview •  System Architecture

•  VIRL API Overview

•  Demo

Agenda

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Objectives Understand •  what VIRL is

•  what VIRL is not

How VIRL can help with •  Education / self study

•  Test driven development of network applications

•  Rapid prototyping

4

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

System Overview

5

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

The Challenge DevOps and NetOps have a compelling need to: •  Create new network applications and solutions

•  Learn and test new features and facilities

•  Innovate to solve business problems

To do this they need a test-bed that is:

•  Easy to build

•  Easy to configure

•  Easy to scale

•  Easy to access

•  Portable

•  Inexpensive And everyone wants their own…

6

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Who should be interested in VIRL?

Customers

Integrators

Partners

Software Houses

You…

Manufacturers

7

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Deployment Economics Deploying a physical network test-bed requires: •  Equipment ~$2,000/node

•  Setup ~1-2 hours per network

•  Expertise level high @ ~$100/hour for CCNA

•  Resources typically must be dedicated, scheduled

Time and money are being wasted

VIRL can help simplify and streamline development processes and environments

8

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

What is VIRL? A network orchestration and virtualization platform that enables:

•  Point-and-click network design

•  Automated configuration creation

•  Integration VM’s running platform-sync’d code

•  Rapid setup and tear-down

•  Seamless connectivity with ‘real’ networks

•  Portability and repeatability

9

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Deployment Economics with VIRL Deploying virtual target networks with VIRL:

•  Equipment: ü  Laptop or Server with appropriate spec ü  VMware hypervisor ü  VIRL Personal Edition (includes 15 Cisco Node License)

•  Setup ~minutes per network

•  Expertise significantly reduced – VIRL does the work!

•  Little or no contention for resources

•  Portable – work wherever, whenever

10

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

System Architecture

11

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

IOS XR NX-OS IOS XE IOS

Virtualized in

IOS XRv

Virtualized in NX-OSv

Virtualized in CSR1000v

Virtualized in IOSv and

IOSvL2

Servers

Ubuntu, Cirros, 3rd party Virtual

Machines

Virtual Machines run the operating system but are NOT representations of a particular hardware platform – no fans, no switch fabric, no ASIC models

VIRL Architecture Virtualized Platform Operating Systems

12

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

IOS XR NX-OS IOS XE IOS

Virtualized in

IOS XRv

Virtualized in NX-OSv

Virtualized in CSR1000v

Virtualized in IOSv and

IOSvL2

Servers

Ubuntu, Cirros, 3rd party Virtual

Machines

VIRL Architecture Virtualized Platform Operating Systems

13

•  Same Control-plane code •  Same Management plane code •  Same memory footprint

13

•  Different CPU performance •  Different Forwarding plane code •  No ASIC emulation

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

(Nested) Virtualization

14

Physical Host

Host O/S

Virtual Machines

HyperVisor

•  Virtualized devices (CPU, I/O, memory) enable a single host to support many virtual machines

•  KVM / QEMU provides a kernel-based Hypervisor / host-virtualization facility

•  Ubuntu provides the basic host operating system

•  Intel VT-x / AMD-V capable CPUs expose hardware-virtualization functions to Ubuntu / KVM

QEMU /

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

(Nested) Virtualization

15

•  Virtualized devices (CPU, I/O, memory) enable a single host to support many virtual machines

•  KVM / QEMU provides a kernel-based Hypervisor / host-virtualization facility

•  Ubuntu provides the basic host operating system

•  Intel VT-x / AMD-V capable CPUs expose hardware-virtualization functions to Ubuntu / KVM

Physical Host

Nested VM

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Keystone (Identity Services)

Glance (Image / Repository Services)

Nova (Compute Services)

Neutron (Networking Services)

Swift (Object

Services)

Cinder (Block

Storage Services)

Horizon

(Dashboard)

AP

Is / CLI

IaaS / cloud orchestration software – creates, manages, and deletes virtual resources according to API- or CLI-based instructions

Built on OpenStack

16

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VM Maestro

•  The graphical topology editing tool

•  Enables rapid definition of network elements: ü  Routers ü  Links ü  Protocols ü  Facilities

•  Supports complex topologies

•  Manages simulations

17

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" simulationEngine="OPENSTACK" schemaVersion="0.6" xsi:schemaLocation="http://www.cisco.com/VIRL http://cide.cisco.com/vmmaestro/schema/VIRL.xsd"> <extensions> <entry type="String" key="management_network">flat</entry> <entry type="Boolean" key="AutoNetkit.enable_cdp">true</entry> <entry type="Boolean" key="AutoNetkit.enable_OnePK">true</entry> <entry type="String" key="AutoNetkit.address_family">dual_stack</entry> <entry type="String" key="AutoNetkit.ipv4_infra_subnet">10.0.0.0</entry> <entry type="String" key="AutoNetkit.ipv4_infra_prefix">8</entry> <entry type="String" key="AutoNetkit.ipv4_loopback_subnet">192.168.0.0</entry> <entry type="String" key="AutoNetkit.ipv4_loopback_prefix">22</entry> <entry type="String" key="AutoNetkit.ipv4_vrf_loopback_subnet">172.16.0.0</entry> <entry type="String" key="AutoNetkit.ipv4_vrf_loopback_prefix">24</entry> <entry type="Boolean" key="AutoNetkit.enable_routing">true</entry> <entry type="String" key="AutoNetkit.IGP">isis</entry> </extensions> <node location="518,292" subtype="IOSv" type="SIMPLE" name="Core"> <interface name="GigabitEthernet0/1" id="0"/> <interface name="GigabitEthernet0/2" id="1"/> <interface name="GigabitEthernet0/3" id="2"/> </node> <node location="519,172" subtype="IOSv" type="SIMPLE" name="A1"> <interface name="GigabitEthernet0/1" id="0"/> <interface name="GigabitEthernet0/2" id="1"/> <interface name="GigabitEthernet0/3" id="2"/> </node> <node location="648,368" subtype="IOSv" type="SIMPLE" name="A3"> <interface name="GigabitEthernet0/1" id="0"/> <interface name="GigabitEthernet0/2" id="1"/> <interface name="GigabitEthernet0/3" id="2"/> </node> <node location="403,382" subtype="IOSv" type="SIMPLE" name="A2"> <interface name="GigabitEthernet0/1" id="0"/> <interface name="GigabitEthernet0/2" id="1"/> <interface name="GigabitEthernet0/3" id="2"/> </node>

Topology Representations •  Topologies are represented in XML

•  Files are highly portable and shareable

•  Integrated support for GIT repositories enables multi-user sharing, versioning

18

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

AutoNetKit

Network Information DB

XML Topology Definition

Configurations

Topology Renderings

AutoNetKit Auto-Configuration

AutoNetKit: •  Understands OS-specific configuration constructs

•  Presents graphical representations of topology attributes •  Converts configurations between different OS-types and platforms

19

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

OSPF area values set on each node

BGP route-reflector clusters and AS’s configured

AutoNetKit Visualizations

20

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Create Routers • Identify Type / Flavor • Associate Image (Glance) • Identify / Assign Resources • Associate Configuration • Launch the VM (Nova)

Create Networks / Links • Identify Links and End-Points • Assign End-Points to VMs • Assign Network / Link Characteristics

• Launch the Switch (Neutron)

XML Topology Definition

The Services Topology Director orchestrates the creation of VIRL virtual routers and inter-router links based on the XML-based topology definition and configurations based by VM Maestro

Services Topology Director

21

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VM Maestro

Services Topology Director

Topology Graph with Router Configurations

1

2

Router Configurations

3

Topology Views 4

5 6

Virtual Machines / Switches

7

8A1-Console: 17000 A1-Aux: 17001 …

VIRL Workflow

22

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

OVA Delivery

23

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

ISO Delivery

24

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VIRL Family

Cisco Modeling Labs

For Corporate users; multi-user network modeling, inc. TAC support

Developers

Individuals VIRL Personal Edition

For Individual users, developers, students etc.

Multi-purpose platform to innovate for SDN / NFV / Cloud paradigms.

/dev/innovate

25

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VIRL Family VIRL Personal •  Personal Use

•  15 Cisco nodes (fixed) •  Active call home (7 days off-net)

•  NO TAC support

•  VM images included •  IOSv •  IOSvL2 (L2 switch) •  IOS XRv •  CSR1000v •  NXOSv •  ASAv (Firewall) •  Linux Server (Ubuntu 14.04)

Cisco Modeling Labs

•  Multi User

•  Scale from 15 … X Nodes

•  No active call home

•  TAC support

•  VM images included •  IOSv •  IOSvL2 •  Linux Server •  Other VM images can be added

26

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VIRL API Overview

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VIRL APIs •  OpenStack foundation, so Nova and Neutron APIs can be

used right away •  Be aware of service bindings (e.g. with mgmt IP = DHCP, REST

API might not be directly accessible from outside) •  Can be used via CLI to some extent

(virl_openstack_client)

•  STD API calls •  Specific VIRL API set •  Simulation start, roster •  Used by VM Maestro •  Can be used via CLI to some extent

(virl_std_client)

•  Can integrate Controller (APIs) into simulation (APIC-EM, ODL, …)

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Built-in API Documentation Built right into UWM

30

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VIRL API Demo Resources •  VIRL running on Laptop

•  [Chrome with Postman]

•  Python w/ request package

•  cURL

•  Scripts / examples on Github: https://github.com/VIRL-Open/virl-utils

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

OpenStack example •  Toolset and API examples to work with VIRL

host https://github.com/VIRL-Open/virl-utils

•  ‘git clone https://github.com/VIRL-Open/virl-utils’

•  link.py - modify link state of VM

•  list.py - show all interfaces for running simulation

•  ports.py - show all Serial ports and VNC screens for running simulations

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VIRL STD Examples: Session List •  Using Python

virl-utils/API/hello-world.py

•  Using cURL curl --user guest:guest http://172.16.1.1:19399/↵ simengine/rest/list

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

VIRL STD Examples: Start Simulation •  Using Python

virl-utils/API/launch-topo.py

•  Using cURL curl --data @topology.virl --header 'Content-Type: text/xml' --user guest:guest http://172.16.1.1:19399/simengine/rest/launch

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Demo

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Recap: Objectives Understand •  what VIRL is

•  what VIRL is not

How VIRL can help with •  Education / self study

•  Test driven development of network applications

•  Rapid prototyping

36

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Summary •  Network Simulation provides a powerful toolkit

•  Endless possibilities

•  (Almost) nothing is impossible J

•  Use it as a test- / playground for your network application development!

•  Integrate it into your development tool chain

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Links •  Get VIRL

http://virl.cisco.com/

•  Documentation and Video Library http://virl-dev-innovate.cisco.com/

•  User Community http://community.dev-innovate.com/

•  YouTube Channel

•  http://www.youtube.com/channel/UC41WuzXlJCGY5qLsuZ8aHkQ

•  Utilities and Sample Topologies https://github.com/VIRL-Open

•  Another API / Python Example https://github.com/mthibaut/python-virl

@CiscoVIRL

cisco.virl

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076

Get VIRL this week!

See any of the VIRL team in the Devnet Zone to get your 30% discount on VIRL Personal Edition** Purchase VIRL at http://virl.cisco.com and apply your discount code

Discount is only available during CL San Diego! **Discount is NOT applicable to the Gift Card

Thank you

© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Public DEVZONE-0076 40