Experimenters Ovs

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Software OpenFlow

Solutions using
Open vSwitch

Ryan Izard
rizard@g.clemson.edu
Open vSwitch (OVS)
• Software OpenFlow switch
– Production quality
– Open source
• Documentation and code
– http://openvswitch.org
– https://github.com/openvswitch/ovs
• Kernel and userspace modes
• Supports
– Monitoring: Netflow, sFlow, SPAN, RSPAN
– Control: OpenFlow, OVSDB
OpenFlow Support
• Supports OpenFlow 1.0 through 1.5
– Suggest OVS >= 2.4.0
– Meter protocol support
– Limited 1.5 support
– Consult the change logs when in doubt
• ofsoftswitch supports meters
– Can daisy-chain with OVS
How to use OVS?

General Instructions For GENI


1. Download OVS 1. Start with an OVS image
2. Install OVS – Ubuntu 12 or 14
3. Start OVS daemons 2. Configure OVS bridges
4. Configure OVS 3. Connect controller to
bridges OVS bridges
5. Connect controller to 4. Install flows and control
OVS bridges your network
6. Install flows and
control your network
Select OVS Image in GENI using
the Jacks GUI
• Node Type: “emulab-xen”
• Disk Image: “Ubuntu 14 with OVS, by Niky”
Before We Get Started
• For this guide
– <…> indicates variable substitution
– […] indicates an optional parameter
– …|… indicates a exclusive-or between two parameters
• You must be root for any ovs-* command
OpenFlow Version Support
• OVS w/OpenFlow version > 1.0
– Must use “-O OpenFlow<ver>” flag for any ovs-ofctl cmd
– Include flag at end of command
– Note capital O, not zero
• Examples
– OpenFlow 1.0, <ver> = 10, e.g. “-O OpenFlow10”
– OpenFlow 1.1, <ver> = 11, e.g. “-O OpenFlow11”
– OpenFlow 1.2, <ver> = 12, e.g. “-O OpenFlow12”
– OpenFlow 1.3, <ver> = 13, e.g. “-O OpenFlow13”
– OpenFlow 1.4, <ver> = 14, e.g. “-O OpenFlow14”
– OpenFlow 1.5, <ver> = 15, e.g. “-O OpenFlow15”
Creating and Viewing a Bridge
• Add/remove a bridge
– $ ovs-vsctl add-br <bridge-name>
– $ ovs-vsctl del-br <bridge-name>
• Add/remove a port to/from a bridge
– $ ovs-vsctl add-port <bridge> <port-name>
– $ ovs-vsctl del-port <bridge> <port-name>
• Show general configuration
– $ ovs-vsctl show
• Show detailed switch configuration
– $ ovs-ofctl show <bridge-name>
Datapath and Controller
• Set datapath ID (DPID)
– $ ovs-vsctl set bridge <bridge-name> \
other-config:datapath-id=0011223344556677
• Set OpenFlow version
– $ ovs-vsctl set bridge <bridge-name> \
protocols=OpenFlow<ver>,OpenFlow<ver>,…
• Set controller
– $ ovs-vsctl set-controller <bridge-name> \
tcp:<controller-ip>:<controller-port>
– Also supports SSL (tutorial)
Fail Modes
• Perform learning switch if controller disconnects
– $ ovs-vsctl set-fail-mode <bridge-name> standalone
• Only use installed flows if controller disconnects
– $ ovs-vsctl set-fail-mode <bridge-name> secure
Debugging
• View OpenFlow channel b/t controller and switch
– $ ovs-vsctl snoop <bridge-name>
– $ ovs-vsctl monitor <bridge-name>
Table Operations
• Typically done by controller, but useful when
debugging or for testing
• For full documentation, see ovs-ofctl man page
• Show flow table entries
– $ ovs-ofctl dump-flows <bridge-name>
• Add an entry to flow table
– $ ovs-ofctl add-flow [<priority>] [<table-id>] [<cookie>] \
<matches> [<actions> | <instructions>]
• Remove an entry from a flow table
– $ ovs-ofctl del-flow [--strict] <priority> <table-id> \
[<cookie>] <matches>
Table Operations
• Modify a flow table entry
– $ ovs-ofctl mod-flow [--strict] <priority> <table-id> \
[<cookie>] <matches> [<actions> | <instructions>]
– Can also set cookie and other flow fields
• Can also add, remove, modify, show groups and
buckets
– ovs-ofctl add-group, del-group, mod-group, dump-
groups, insert-buckets, remove-buckets
– Consult ovs-ofctl docs for details
Allow Host to TX/RX Packets
• LOCAL port of OVS is
network interface
– e.g. LOCAL <--> br0
– can route into iface
Example Workflow
To turn an example machine into a switch:
switch$ ovs-vsctl add-br br0
switch$ ovs-vsctl add-port br0 eth1
switch$ ovs-vsctl add-port br0 eth2
switch$ ovs-vsctl set-controller tcp:192.168.1.1:6653
switch$ ifconfig br0 10.0.0.100/24 up # “host” on LOCAL port
switch$ ping 10.0.0.2 # assume host-2 out eth2
switch$ ping 10.0.0.1 # assume host-1 out eth1

10.0.0.1 and 10.0.0.2 on host-1 and host-2, respectively, will


also be able to communicate through the OVS bridge br0 on
the switch node
Give it a Try Yourself

Tutorial

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy