SlideShare a Scribd company logo
The Basic Introduction of
Open vSwitch
Te-Yen(Danny) Liu
Date : 2014/01/08
Page 2
Agenda
 What is Virtual Switch?
 Virtual Network Topology using OVS
 What is Open vSwitch and Features?
 The Main Components
 Using OVS to build Network Topology
 Advanced Examples
 Demo
Page 3
What is Virtual Switch?
 In virtual network, virtual switch acts like an advanced edge
switch for VMs.
Physical Switch
Hypervisor
Virtual Switch
VM VM VM
Virtual
Network
(L2)vNIC
VIF
NIC as vSwitch’s
uplink port
Data Flow
Page 4
Virtual Network Topology (1/2)
 An example of Virtual Network Topology in OpenStack
Page 5
Virtual Network Topology (2/2)
 Another example of Virtual Network Topology in OpenStack
 They use Open vSwitch as the solution to deal with the complication in virtual
newtork and multi-tenancy
Page 6
What is Open vSwitch?
 A software-based solution
 Resolve the problems of network separation and traffic
visibility, so the cloud users can be assigned VMs with
elastic and secure network configurations
 Flexible Controller in User-Space
 Fast Datapath in Kernel
 An implementation of Open Flow
Controlle
r
Page 7
Open vSwitch Design
 Decision about how to process packet made in
userspace
 First packet of new flow goes to ovs-vswitchd,
following packets hit cached entry in kernel
Page 8
Features
 Visibility into inter-VM communication via NetFlow, sFlow(R), IPFIX, SPAN, RSPAN, and
GRE-tunneled mirrors
 LACP (IEEE 802.1AX-2008)
 Standard 802.1Q VLAN model with trunking
 BFD and 802.1ag link monitoring
 STP (IEEE 802.1D-1998)
 Fine-grained QoS control
 Support for HFSC qdisc
 Per VM interface traffic policing
 NIC bonding with source-MAC load balancing, active backup, and L4 hashing
 OpenFlow protocol support (including many extensions for virtualization)
 IPv6 support
 Multiple tunneling protocols (GRE, VXLAN, IPsec, GRE and VXLAN over IPsec)
 Remote configuration protocol with C and Python bindings
 Kernel and user-space forwarding engine options
 Multi-table forwarding pipeline with flow-caching engine
 Forwarding layer abstraction to ease porting to new software and hardware platforms
The newest version is 2.0
Page 9
sFlow with OpenvSwitch
Page 10
The Main Components
Page 11
ovsdb-server
 Database that holds switch level configuration
 Custom database with nice properties:
 Log-based
 Speaks OVSDB management protocol(JSON-RPC)
to manager and ovs-vswitchd
Page 12
Example: Setup QoS
 There are two ways to do that:
 Interface Rate Limiting ( on Interface )
 For instance:
– sudo ovs-vsctl set Interface eth1 ingress_policing_rate=10000
– sudo ovs-vsctl set Interface eth1 ingress_policing_burst=1000
 Port QoS Policy ( on Port )
 For instance:
– sudo ovs-vsctl set port eth1 qos=@newqos 
– -- --id=@newqos create qos type=linux-htb 
– other-config:max-rate=200000000 queues=0=@q0,1=@q1 
– -- --id=@q0 create queue 
– other-config:min-rate=100000000 
– other-config:max-rate=100000000 
– -- --id=@q1 create queue 
– other-config:min-rate=50000000 
– other-config:max-rate=50000000
 Qos can have more than 1 queue
Page 13
The example of QoS in OVS Database
 It is a GUI tool to see the tables in the ovsdb-server
 This case is about checking QoS setting
Page 14
ovs-vswitchd
 Core component in the system:
 Communicates with outside world using OpenFlow
 Communicates with ovsdbserver using management
protocol (OVSDB)
 Communicates with kernel module over netlink
 Communicates with the system through netdev abstract
interface
 Supports multiple independent datapaths (bridges)
 Implements mirroring, bonding, and VLANs through
modifications of the same flow table exposed
through OpenFlow
Page 15
OVS Kernel Module: openvswitch_mod.ko
 Handles switching and tunneling
 Exact-match cache of flows
 Designed to be fast and simple
 Packet comes in, if found, associated actions
executed and counters updated. Otherwise, sent to
userspace
 Does no flow expiration
 Knows nothing of OpenFlow
 Implements tunnels
Page 16
Using OVS to build Network Topology
 Physical Machine to Physical Machine
>ovs-vsctl add-br br0
>ovs-vsctl add-port br0
eth0
>ovs-vsctl add-port br0
eth1
Page 17
Using OVS to build Network Topology
 Virtual Machine to Virtual Machine
 Hypervisor is KVM
>ovs-vsctl add-br br0
>cat /etc/ovs-ifup
#!/bin/sh
switch= 'br0'
/sbin/ifconfig $1 0.0.0.0 up
ovs-vsctl add-port ${switch} $1
>cat /etc/ovs-ifup
#!/bin/sh
switch= 'br0'
/sbin/ifconfig $1 0.0.0.0 down
ovs-vsctl del-port ${switch} $1
>kvm -m 512 -net nic,macaddr=00:11:22:33:44:55-net 
tap,script= /etc/ovs-ifup ,downscript= /etc/ovs-ifdown-
drive 
file = /path/to/disk-image ,boot=on
>kvm -m 512 -net nic,macaddr=11:22:33:44:55:66-net 
tap,script= /etc/ovs-ifup ,downscript= /etc/ovs-ifdown-
drive 
file = /path/to/disk-image ,boot=on
Page 18
Using OVS to build Network Topology
 The profile of the virtual network
 Internal port is connected to IP Stack
 VMs connect with outside network via vport ( tap virtual
interface )
Page 19
Using OVS to build Network Topology
 Virtual Machine to Virtual Machine with GRE Tunnel
GRE Tunnel
GRE Tunnel
Page 20
Using OVS to build Network Topology
sudo ifconfig eth1 0
sudo ovs-vsctl add-br br1
sudo ovs-vsctl add-br br2
sudo ovs-vsctl add-port br1 eth0
sudo ifconfig br1 192.168.1.155 netmask 255.255.255.0
sudo ifconfig br2 10.1.1.1 netmask 255.255.255.0
sudo ovs-vsctl add-port br2 gre0 -- set interface gre0 type=gre options:remote_ip=192.168.1.152
sudo ifconfig eth1 0
sudo ovs-vsctl add-br br1
sudo ovs-vsctl add-br br2
sudo ovs-vsctl add-port br1 eth0
sudo ifconfig br1 192.168.1.152 netmask 255.255.255.0
sudo ifconfig br2 10.1.1.2 netmask 255.255.255.0
sudo ovs-vsctl add-port br2 gre0 -- set interface gre0 type=gre options:remote_ip=192.168.1.155
sudo vi /etc/ovs-ifup
#!/bin/sh
switch='br2'
/sbin/ifconfig $1 0.0.0.0 up
ovs-vsctl add-port ${switch} $1
sudo vi /etc/ovs-ifdown
#!/bin/sh
switch=’br2’
/sbin/ifconfig $1 0.0.0.0 down
ovs-vsctl del-port ${switch} $1
sudo chmod +x /etc/ovs-ifup /etc/ovs-ifdown
sudo kvm -m 512 -net nic,macaddr=11:22:33:44:55:66 -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -cdrom
/home/brent/images/ubuntu-12.04-desktop-i386.iso &
Page 21
Using OVS to build Network Topology
 Bridge to Bridge
 They need a patch port to communicate with each other
ovs-vsctl add-br br0
ovs-vsctl add-br br1
ovs-vsctl add-port br0 patch-to-br1
ovs-vsctl set interface patch-to-br1type=patch
ovs-vsctl set interface patch-to-br1 options:peer=patch-
to-br0
ovs-vsctl add-port br1 patch-to-br0
ovs-vsctl set nterface patch-to-br0type=patch
ovs-vsctl set interface patch-to-br0 options:peer=patch-
to-br1
Page 22
Demo Topology
 The host: OVS1 and OVS2 communicate with each other by GRE Tunnel
 The host: KVM will provision a VM guest and communicates with OVS1
and OVS2
Page 23
OVS with GRE Tunnel Demo (1/2)
 OVS1 and OVS2 communicate with each other by GRE Tunnel
sudo ovs-vsctl add-br br0
sudo ovs-vsctl add-br br1
sudo ovs-vsctl add-port br0 eth0
sudo ifconfig eth0 0
sudo ifconfig br0 192.168.1.10 netmask 255.255.255.0
sudo route add default gw 192.168.1.1 br0
sudo ifconfig br1 10.1.2.10 netmask 255.255.255.0
sudo ovs-vsctl add-port br1 gre1 -- set interface gre1
type=gre options:remote_ip=192.168.1.11
sudo ovs-vsctl add-br br0
sudo ovs-vsctl add-br br1
sudo ovs-vsctl add-port br0 eth0
sudo ifconfig eth0 0
sudo ifconfig br0 192.168.1.11 netmask 255.255.255.0
sudo route add default gw 192.168.1.1 br0
sudo ifconfig br1 10.1.2.11 netmask 255.255.255.0
sudo ovs-vsctl add-port br1 gre1 -- set interface gre1
type=gre options:remote_ip=192.168.1.10
br0
eth0
br1
IP: 192.168.1.10
Default GW: 192.168.1.1
Remote IP:
192.168.1.11
gre1
IP: 10.1.2.10
Page 24
OVS with GRE Tunnel Demo (2/2)
 OVS1 and OVS2 in bare metal mode to communicate with each
other by GRE Tunnel
sudo ovs-vsctl add-br br-int
sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0
sudo route add default gw 192.168.1.1 eth0
sudo ovs-vsctl add-port br-int mgmt0 -- set interface
mgmt0 type=internal
sudo ifconfig mgmt0 10.1.2.10 netmask 255.255.255.0
sudo ovs-vsctl add-port br-int gre1 -- set interface gre1
type=gre options:remote_ip=192.168.1.11
sudo ovs-vsctl add-br br-int
sudo ifconfig eth0 192.168.1.11 netmask 255.255.255.0
sudo route add default gw 192.168.1.1 eth0
sudo ovs-vsctl add-port br-int mgmt0 -- set interface
mgmt0 type=internal
sudo ifconfig mgmt0 10.1.2.11 netmask 255.255.255.0
sudo ovs-vsctl add-port br-int gre1 -- set interface gre1
type=gre options:remote_ip=192.168.1.10
br0
mgmt0
IP: 192.168.1.10
Default GW: 192.168.1.1
Remote IP:
192.168.1.11
gre1
IP: 10.1.2.10
eth0
Page 25
OVS with KVM and guest VM Demo
 The host: KVM will provision a VM guest and communicates with OVS1 and
OVS2
sudo ovs-vsctl add-br br0
sudo ovs-vsctl add-port br0 eth0
sudo ovs-vsctl list port
sudo ifconfig eth0 0
sudo ifconfig br0 192.168.1.20 netmask 255.255.255.0
sudo route add default gw 192.168.1.1 br0
sudo kvm -m 512 -hda /home/liudanny/kvm_lab/linux-core-4.7.7-openvswitch-1.11.0_guagga-
0.99.22.4.img -net nic,macaddr=00:11:22:33:44:55 -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs-
ifdown
sudo kvm -m 512 -hda /home/liudanny/kvm_lab/linux-core-4.7.7-openvswitch-1.11.0_guagga-
0.99.22.4.img -net nic,macaddr=11:22:33:44:55:66 -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs-
ifdown
br0 IP: 192.168.1.20
Default GW: 192.168.1.1
tap0
eth0
VM1
tap1
VM2
IP: 10.1.2.10 IP: 10.1.2.11
Page 26
Q&A
Page 27
Reference
 http://blog.scottlowe.org/2013/05/07/using-gre-tunnels-with-
open-vswitch/
 http://lamoop.com/post/2013-11-18/40060149263
 http://www.youtube.com/watch?v=rYW7kQRyUvA
 http://networkstatic.net/open-vswitch-gre-tunnel-configuration/
 http://networkstatic.net/configuring-vxlan-and-gre-tunnels-on-
openvswitch/
 http://openvswitch.org/ovs-vswitchd.conf.db.5.pdf
 http://openvswitch.org/

More Related Content

What's hot

Docker Networking
Docker NetworkingDocker Networking
Docker Networking
Weaveworks
 
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecasesLF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OpenvSwitch
 
Tiny Server Clustering using Vyatta/VyOS (MEMO)
Tiny Server Clustering using Vyatta/VyOS (MEMO)Tiny Server Clustering using Vyatta/VyOS (MEMO)
Tiny Server Clustering using Vyatta/VyOS (MEMO)
Naoto MATSUMOTO
 
Docker-OVS
Docker-OVSDocker-OVS
Docker-OVS
snrism
 
Server-side Intelligent Switching using vyatta
Server-side Intelligent Switching using vyattaServer-side Intelligent Switching using vyatta
Server-side Intelligent Switching using vyatta
Naoto MATSUMOTO
 
Tutorial on using CoreOS Flannel for Docker networking
Tutorial on using CoreOS Flannel for Docker networkingTutorial on using CoreOS Flannel for Docker networking
Tutorial on using CoreOS Flannel for Docker networking
LorisPack Project
 
Multicloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRPMulticloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRP
Bob Melander
 
Unbreakable VPN using Vyatta/VyOS - HOW TO -
Unbreakable VPN using Vyatta/VyOS - HOW TO -Unbreakable VPN using Vyatta/VyOS - HOW TO -
Unbreakable VPN using Vyatta/VyOS - HOW TO -
Naoto MATSUMOTO
 
Staging driver sins
Staging driver sinsStaging driver sins
Staging driver sins
Stephen Hemminger
 
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
Quality of Service Ingress Rate Limiting and OVS Hardware OffloadsQuality of Service Ingress Rate Limiting and OVS Hardware Offloads
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
Netronome
 
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話
upaa
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
Kernel TLV
 
Weave Networking on Docker
Weave Networking on DockerWeave Networking on Docker
Weave Networking on Docker
Stylight
 
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO) UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
Naoto MATSUMOTO
 
LF_OVS_17_OVS Performance on Steroids - Hardware Acceleration Methodologies
LF_OVS_17_OVS Performance on Steroids - Hardware Acceleration MethodologiesLF_OVS_17_OVS Performance on Steroids - Hardware Acceleration Methodologies
LF_OVS_17_OVS Performance on Steroids - Hardware Acceleration Methodologies
LF_OpenvSwitch
 
An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)
Naoto MATSUMOTO
 
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
Naoto MATSUMOTO
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
Michelle Holley
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
Jeff Anderson
 

What's hot (19)

Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecasesLF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
 
Tiny Server Clustering using Vyatta/VyOS (MEMO)
Tiny Server Clustering using Vyatta/VyOS (MEMO)Tiny Server Clustering using Vyatta/VyOS (MEMO)
Tiny Server Clustering using Vyatta/VyOS (MEMO)
 
Docker-OVS
Docker-OVSDocker-OVS
Docker-OVS
 
Server-side Intelligent Switching using vyatta
Server-side Intelligent Switching using vyattaServer-side Intelligent Switching using vyatta
Server-side Intelligent Switching using vyatta
 
Tutorial on using CoreOS Flannel for Docker networking
Tutorial on using CoreOS Flannel for Docker networkingTutorial on using CoreOS Flannel for Docker networking
Tutorial on using CoreOS Flannel for Docker networking
 
Multicloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRPMulticloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRP
 
Unbreakable VPN using Vyatta/VyOS - HOW TO -
Unbreakable VPN using Vyatta/VyOS - HOW TO -Unbreakable VPN using Vyatta/VyOS - HOW TO -
Unbreakable VPN using Vyatta/VyOS - HOW TO -
 
Staging driver sins
Staging driver sinsStaging driver sins
Staging driver sins
 
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
Quality of Service Ingress Rate Limiting and OVS Hardware OffloadsQuality of Service Ingress Rate Limiting and OVS Hardware Offloads
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
 
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
Weave Networking on Docker
Weave Networking on DockerWeave Networking on Docker
Weave Networking on Docker
 
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO) UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
 
LF_OVS_17_OVS Performance on Steroids - Hardware Acceleration Methodologies
LF_OVS_17_OVS Performance on Steroids - Hardware Acceleration MethodologiesLF_OVS_17_OVS Performance on Steroids - Hardware Acceleration Methodologies
LF_OVS_17_OVS Performance on Steroids - Hardware Acceleration Methodologies
 
An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)
 
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
 

Viewers also liked

Definitions
DefinitionsDefinitions
Definitions
as14nishatsimi
 
Responses from the target audience
Responses from the target audienceResponses from the target audience
Responses from the target audience
as14nishatsimi
 
Presentacion Conferencia
Presentacion ConferenciaPresentacion Conferencia
Presentacion Conferencia
Cáritas Diocesana de Zaragoza
 
Presentation1
Presentation1Presentation1
Presentation1
deepapnair
 
My news story planning
My news story planningMy news story planning
My news story planning
as14nishatsimi
 
My news story planning
My news story planningMy news story planning
My news story planning
as14nishatsimi
 
Radio Stations
Radio StationsRadio Stations
Radio Stations
nishatsimi
 
Journalistic and ethical guidelines
Journalistic and ethical guidelinesJournalistic and ethical guidelines
Journalistic and ethical guidelines
as14nishatsimi
 
Soundwaves
SoundwavesSoundwaves
Soundwaves
Conferat Conferat
 
Basic FM Radio Station RF Design Good Practices
Basic FM Radio Station RF Design Good PracticesBasic FM Radio Station RF Design Good Practices
Basic FM Radio Station RF Design Good Practices
Frank Massa
 
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
Gerd Leonhard
 

Viewers also liked (11)

Definitions
DefinitionsDefinitions
Definitions
 
Responses from the target audience
Responses from the target audienceResponses from the target audience
Responses from the target audience
 
Presentacion Conferencia
Presentacion ConferenciaPresentacion Conferencia
Presentacion Conferencia
 
Presentation1
Presentation1Presentation1
Presentation1
 
My news story planning
My news story planningMy news story planning
My news story planning
 
My news story planning
My news story planningMy news story planning
My news story planning
 
Radio Stations
Radio StationsRadio Stations
Radio Stations
 
Journalistic and ethical guidelines
Journalistic and ethical guidelinesJournalistic and ethical guidelines
Journalistic and ethical guidelines
 
Soundwaves
SoundwavesSoundwaves
Soundwaves
 
Basic FM Radio Station RF Design Good Practices
Basic FM Radio Station RF Design Good PracticesBasic FM Radio Station RF Design Good Practices
Basic FM Radio Station RF Design Good Practices
 
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
 

Similar to Thebasicintroductionofopenvswitch

The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
Te-Yen Liu
 
Westermo WeOS Multicast Tunneling
Westermo WeOS Multicast TunnelingWestermo WeOS Multicast Tunneling
Westermo WeOS Multicast Tunneling
Fabian Vandendyck
 
Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1
Yongyoon Shin
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
Laurent Bernaille
 
Cisco data center support
Cisco data center supportCisco data center support
Cisco data center support
Krunal Shah
 
Otv notes
Otv notesOtv notes
Otv notes
Krunal Shah
 
OpenNebulaConf2018 - Scalable L2 overlay networks with routed VXLAN / BGP EVP...
OpenNebulaConf2018 - Scalable L2 overlay networks with routed VXLAN / BGP EVP...OpenNebulaConf2018 - Scalable L2 overlay networks with routed VXLAN / BGP EVP...
OpenNebulaConf2018 - Scalable L2 overlay networks with routed VXLAN / BGP EVP...
OpenNebula Project
 
Automating auto-scaled load balancer based on linux and vm orchestrator
Automating auto-scaled load balancer based on linux and vm orchestratorAutomating auto-scaled load balancer based on linux and vm orchestrator
Automating auto-scaled load balancer based on linux and vm orchestrator
Andrew Yongjoon Kong
 
Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Hardware accelerated switching with Linux @ SWLUG Talks May 2014Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Nat Morris
 
Deeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay NetworksDeeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay Networks
Docker, Inc.
 
SDN/OpenFlow #lspe
SDN/OpenFlow #lspeSDN/OpenFlow #lspe
SDN/OpenFlow #lspe
Chris Westin
 
Meetup docker using software defined networks
Meetup docker   using software defined networksMeetup docker   using software defined networks
Meetup docker using software defined networks
OCTO Technology
 
Docker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined NetworksDocker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined Networks
Adrien Blind
 
Docker Setting for Static IP allocation
Docker Setting for Static IP allocationDocker Setting for Static IP allocation
Docker Setting for Static IP allocation
Ji-Woong Choi
 
How to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchHow to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratch
All Things Open
 
SDNDS.TW Mininet
SDNDS.TW MininetSDNDS.TW Mininet
SDNDS.TW Mininet
NCTU
 
OpenStack networking juno l3 h-a, dvr
OpenStack networking   juno l3 h-a, dvrOpenStack networking   juno l3 h-a, dvr
OpenStack networking juno l3 h-a, dvr
Sim Janghoon
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
Thomas Graf
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
Edwin Beekman
 
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
James Denton
 

Similar to Thebasicintroductionofopenvswitch (20)

The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
Westermo WeOS Multicast Tunneling
Westermo WeOS Multicast TunnelingWestermo WeOS Multicast Tunneling
Westermo WeOS Multicast Tunneling
 
Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
 
Cisco data center support
Cisco data center supportCisco data center support
Cisco data center support
 
Otv notes
Otv notesOtv notes
Otv notes
 
OpenNebulaConf2018 - Scalable L2 overlay networks with routed VXLAN / BGP EVP...
OpenNebulaConf2018 - Scalable L2 overlay networks with routed VXLAN / BGP EVP...OpenNebulaConf2018 - Scalable L2 overlay networks with routed VXLAN / BGP EVP...
OpenNebulaConf2018 - Scalable L2 overlay networks with routed VXLAN / BGP EVP...
 
Automating auto-scaled load balancer based on linux and vm orchestrator
Automating auto-scaled load balancer based on linux and vm orchestratorAutomating auto-scaled load balancer based on linux and vm orchestrator
Automating auto-scaled load balancer based on linux and vm orchestrator
 
Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Hardware accelerated switching with Linux @ SWLUG Talks May 2014Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Hardware accelerated switching with Linux @ SWLUG Talks May 2014
 
Deeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay NetworksDeeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay Networks
 
SDN/OpenFlow #lspe
SDN/OpenFlow #lspeSDN/OpenFlow #lspe
SDN/OpenFlow #lspe
 
Meetup docker using software defined networks
Meetup docker   using software defined networksMeetup docker   using software defined networks
Meetup docker using software defined networks
 
Docker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined NetworksDocker networking basics & coupling with Software Defined Networks
Docker networking basics & coupling with Software Defined Networks
 
Docker Setting for Static IP allocation
Docker Setting for Static IP allocationDocker Setting for Static IP allocation
Docker Setting for Static IP allocation
 
How to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchHow to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratch
 
SDNDS.TW Mininet
SDNDS.TW MininetSDNDS.TW Mininet
SDNDS.TW Mininet
 
OpenStack networking juno l3 h-a, dvr
OpenStack networking   juno l3 h-a, dvrOpenStack networking   juno l3 h-a, dvr
OpenStack networking juno l3 h-a, dvr
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
 

Recently uploaded

Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
ysasp1
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
fovkoyb
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
uehowe
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
ukwwuq
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
uehowe
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
uehowe
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
saathvikreddy2003
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 

Recently uploaded (20)

Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 

Thebasicintroductionofopenvswitch

  • 1. The Basic Introduction of Open vSwitch Te-Yen(Danny) Liu Date : 2014/01/08
  • 2. Page 2 Agenda  What is Virtual Switch?  Virtual Network Topology using OVS  What is Open vSwitch and Features?  The Main Components  Using OVS to build Network Topology  Advanced Examples  Demo
  • 3. Page 3 What is Virtual Switch?  In virtual network, virtual switch acts like an advanced edge switch for VMs. Physical Switch Hypervisor Virtual Switch VM VM VM Virtual Network (L2)vNIC VIF NIC as vSwitch’s uplink port Data Flow
  • 4. Page 4 Virtual Network Topology (1/2)  An example of Virtual Network Topology in OpenStack
  • 5. Page 5 Virtual Network Topology (2/2)  Another example of Virtual Network Topology in OpenStack  They use Open vSwitch as the solution to deal with the complication in virtual newtork and multi-tenancy
  • 6. Page 6 What is Open vSwitch?  A software-based solution  Resolve the problems of network separation and traffic visibility, so the cloud users can be assigned VMs with elastic and secure network configurations  Flexible Controller in User-Space  Fast Datapath in Kernel  An implementation of Open Flow Controlle r
  • 7. Page 7 Open vSwitch Design  Decision about how to process packet made in userspace  First packet of new flow goes to ovs-vswitchd, following packets hit cached entry in kernel
  • 8. Page 8 Features  Visibility into inter-VM communication via NetFlow, sFlow(R), IPFIX, SPAN, RSPAN, and GRE-tunneled mirrors  LACP (IEEE 802.1AX-2008)  Standard 802.1Q VLAN model with trunking  BFD and 802.1ag link monitoring  STP (IEEE 802.1D-1998)  Fine-grained QoS control  Support for HFSC qdisc  Per VM interface traffic policing  NIC bonding with source-MAC load balancing, active backup, and L4 hashing  OpenFlow protocol support (including many extensions for virtualization)  IPv6 support  Multiple tunneling protocols (GRE, VXLAN, IPsec, GRE and VXLAN over IPsec)  Remote configuration protocol with C and Python bindings  Kernel and user-space forwarding engine options  Multi-table forwarding pipeline with flow-caching engine  Forwarding layer abstraction to ease porting to new software and hardware platforms The newest version is 2.0
  • 9. Page 9 sFlow with OpenvSwitch
  • 10. Page 10 The Main Components
  • 11. Page 11 ovsdb-server  Database that holds switch level configuration  Custom database with nice properties:  Log-based  Speaks OVSDB management protocol(JSON-RPC) to manager and ovs-vswitchd
  • 12. Page 12 Example: Setup QoS  There are two ways to do that:  Interface Rate Limiting ( on Interface )  For instance: – sudo ovs-vsctl set Interface eth1 ingress_policing_rate=10000 – sudo ovs-vsctl set Interface eth1 ingress_policing_burst=1000  Port QoS Policy ( on Port )  For instance: – sudo ovs-vsctl set port eth1 qos=@newqos – -- --id=@newqos create qos type=linux-htb – other-config:max-rate=200000000 queues=0=@q0,1=@q1 – -- --id=@q0 create queue – other-config:min-rate=100000000 – other-config:max-rate=100000000 – -- --id=@q1 create queue – other-config:min-rate=50000000 – other-config:max-rate=50000000  Qos can have more than 1 queue
  • 13. Page 13 The example of QoS in OVS Database  It is a GUI tool to see the tables in the ovsdb-server  This case is about checking QoS setting
  • 14. Page 14 ovs-vswitchd  Core component in the system:  Communicates with outside world using OpenFlow  Communicates with ovsdbserver using management protocol (OVSDB)  Communicates with kernel module over netlink  Communicates with the system through netdev abstract interface  Supports multiple independent datapaths (bridges)  Implements mirroring, bonding, and VLANs through modifications of the same flow table exposed through OpenFlow
  • 15. Page 15 OVS Kernel Module: openvswitch_mod.ko  Handles switching and tunneling  Exact-match cache of flows  Designed to be fast and simple  Packet comes in, if found, associated actions executed and counters updated. Otherwise, sent to userspace  Does no flow expiration  Knows nothing of OpenFlow  Implements tunnels
  • 16. Page 16 Using OVS to build Network Topology  Physical Machine to Physical Machine >ovs-vsctl add-br br0 >ovs-vsctl add-port br0 eth0 >ovs-vsctl add-port br0 eth1
  • 17. Page 17 Using OVS to build Network Topology  Virtual Machine to Virtual Machine  Hypervisor is KVM >ovs-vsctl add-br br0 >cat /etc/ovs-ifup #!/bin/sh switch= 'br0' /sbin/ifconfig $1 0.0.0.0 up ovs-vsctl add-port ${switch} $1 >cat /etc/ovs-ifup #!/bin/sh switch= 'br0' /sbin/ifconfig $1 0.0.0.0 down ovs-vsctl del-port ${switch} $1 >kvm -m 512 -net nic,macaddr=00:11:22:33:44:55-net tap,script= /etc/ovs-ifup ,downscript= /etc/ovs-ifdown- drive file = /path/to/disk-image ,boot=on >kvm -m 512 -net nic,macaddr=11:22:33:44:55:66-net tap,script= /etc/ovs-ifup ,downscript= /etc/ovs-ifdown- drive file = /path/to/disk-image ,boot=on
  • 18. Page 18 Using OVS to build Network Topology  The profile of the virtual network  Internal port is connected to IP Stack  VMs connect with outside network via vport ( tap virtual interface )
  • 19. Page 19 Using OVS to build Network Topology  Virtual Machine to Virtual Machine with GRE Tunnel GRE Tunnel GRE Tunnel
  • 20. Page 20 Using OVS to build Network Topology sudo ifconfig eth1 0 sudo ovs-vsctl add-br br1 sudo ovs-vsctl add-br br2 sudo ovs-vsctl add-port br1 eth0 sudo ifconfig br1 192.168.1.155 netmask 255.255.255.0 sudo ifconfig br2 10.1.1.1 netmask 255.255.255.0 sudo ovs-vsctl add-port br2 gre0 -- set interface gre0 type=gre options:remote_ip=192.168.1.152 sudo ifconfig eth1 0 sudo ovs-vsctl add-br br1 sudo ovs-vsctl add-br br2 sudo ovs-vsctl add-port br1 eth0 sudo ifconfig br1 192.168.1.152 netmask 255.255.255.0 sudo ifconfig br2 10.1.1.2 netmask 255.255.255.0 sudo ovs-vsctl add-port br2 gre0 -- set interface gre0 type=gre options:remote_ip=192.168.1.155 sudo vi /etc/ovs-ifup #!/bin/sh switch='br2' /sbin/ifconfig $1 0.0.0.0 up ovs-vsctl add-port ${switch} $1 sudo vi /etc/ovs-ifdown #!/bin/sh switch=’br2’ /sbin/ifconfig $1 0.0.0.0 down ovs-vsctl del-port ${switch} $1 sudo chmod +x /etc/ovs-ifup /etc/ovs-ifdown sudo kvm -m 512 -net nic,macaddr=11:22:33:44:55:66 -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -cdrom /home/brent/images/ubuntu-12.04-desktop-i386.iso &
  • 21. Page 21 Using OVS to build Network Topology  Bridge to Bridge  They need a patch port to communicate with each other ovs-vsctl add-br br0 ovs-vsctl add-br br1 ovs-vsctl add-port br0 patch-to-br1 ovs-vsctl set interface patch-to-br1type=patch ovs-vsctl set interface patch-to-br1 options:peer=patch- to-br0 ovs-vsctl add-port br1 patch-to-br0 ovs-vsctl set nterface patch-to-br0type=patch ovs-vsctl set interface patch-to-br0 options:peer=patch- to-br1
  • 22. Page 22 Demo Topology  The host: OVS1 and OVS2 communicate with each other by GRE Tunnel  The host: KVM will provision a VM guest and communicates with OVS1 and OVS2
  • 23. Page 23 OVS with GRE Tunnel Demo (1/2)  OVS1 and OVS2 communicate with each other by GRE Tunnel sudo ovs-vsctl add-br br0 sudo ovs-vsctl add-br br1 sudo ovs-vsctl add-port br0 eth0 sudo ifconfig eth0 0 sudo ifconfig br0 192.168.1.10 netmask 255.255.255.0 sudo route add default gw 192.168.1.1 br0 sudo ifconfig br1 10.1.2.10 netmask 255.255.255.0 sudo ovs-vsctl add-port br1 gre1 -- set interface gre1 type=gre options:remote_ip=192.168.1.11 sudo ovs-vsctl add-br br0 sudo ovs-vsctl add-br br1 sudo ovs-vsctl add-port br0 eth0 sudo ifconfig eth0 0 sudo ifconfig br0 192.168.1.11 netmask 255.255.255.0 sudo route add default gw 192.168.1.1 br0 sudo ifconfig br1 10.1.2.11 netmask 255.255.255.0 sudo ovs-vsctl add-port br1 gre1 -- set interface gre1 type=gre options:remote_ip=192.168.1.10 br0 eth0 br1 IP: 192.168.1.10 Default GW: 192.168.1.1 Remote IP: 192.168.1.11 gre1 IP: 10.1.2.10
  • 24. Page 24 OVS with GRE Tunnel Demo (2/2)  OVS1 and OVS2 in bare metal mode to communicate with each other by GRE Tunnel sudo ovs-vsctl add-br br-int sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0 sudo route add default gw 192.168.1.1 eth0 sudo ovs-vsctl add-port br-int mgmt0 -- set interface mgmt0 type=internal sudo ifconfig mgmt0 10.1.2.10 netmask 255.255.255.0 sudo ovs-vsctl add-port br-int gre1 -- set interface gre1 type=gre options:remote_ip=192.168.1.11 sudo ovs-vsctl add-br br-int sudo ifconfig eth0 192.168.1.11 netmask 255.255.255.0 sudo route add default gw 192.168.1.1 eth0 sudo ovs-vsctl add-port br-int mgmt0 -- set interface mgmt0 type=internal sudo ifconfig mgmt0 10.1.2.11 netmask 255.255.255.0 sudo ovs-vsctl add-port br-int gre1 -- set interface gre1 type=gre options:remote_ip=192.168.1.10 br0 mgmt0 IP: 192.168.1.10 Default GW: 192.168.1.1 Remote IP: 192.168.1.11 gre1 IP: 10.1.2.10 eth0
  • 25. Page 25 OVS with KVM and guest VM Demo  The host: KVM will provision a VM guest and communicates with OVS1 and OVS2 sudo ovs-vsctl add-br br0 sudo ovs-vsctl add-port br0 eth0 sudo ovs-vsctl list port sudo ifconfig eth0 0 sudo ifconfig br0 192.168.1.20 netmask 255.255.255.0 sudo route add default gw 192.168.1.1 br0 sudo kvm -m 512 -hda /home/liudanny/kvm_lab/linux-core-4.7.7-openvswitch-1.11.0_guagga- 0.99.22.4.img -net nic,macaddr=00:11:22:33:44:55 -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs- ifdown sudo kvm -m 512 -hda /home/liudanny/kvm_lab/linux-core-4.7.7-openvswitch-1.11.0_guagga- 0.99.22.4.img -net nic,macaddr=11:22:33:44:55:66 -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs- ifdown br0 IP: 192.168.1.20 Default GW: 192.168.1.1 tap0 eth0 VM1 tap1 VM2 IP: 10.1.2.10 IP: 10.1.2.11
  • 27. Page 27 Reference  http://blog.scottlowe.org/2013/05/07/using-gre-tunnels-with- open-vswitch/  http://lamoop.com/post/2013-11-18/40060149263  http://www.youtube.com/watch?v=rYW7kQRyUvA  http://networkstatic.net/open-vswitch-gre-tunnel-configuration/  http://networkstatic.net/configuring-vxlan-and-gre-tunnels-on- openvswitch/  http://openvswitch.org/ovs-vswitchd.conf.db.5.pdf  http://openvswitch.org/