SlideShare ist ein Scribd-Unternehmen logo
1 von 27
The Basic Introduction of
Open vSwitch
Te-Yen(Danny) Liu
Date : 2014/01/08
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 2
What is Virtual Switch?
 In virtual network, virtual switch acts like an advanced edge

switch for VMs.

Hypervisor
vNIC

VIF

VM

VM

VM

Virtual
Network
(L2)

Virtual Switch
NIC as vSwitch’s
uplink port

Data Flow

Physical Switch
Page 3
Virtual Network Topology (1/2)
 An example of Virtual Network Topology in OpenStack

Page 4
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 5
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
Controller

Page 6
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 7
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 8
sFlow with OpenvSwitch

Page 9
The Main Components

Page 10
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 11
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 12
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 13
ovs-vswitchd
 Core component in the system:
 Communicates with outside world using OpenFlow
 Communicates with ovsdb-server 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 14
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 15
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 16
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 17
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 18
Using OVS to build Network Topology
 Virtual Machine to Virtual Machine with GRE Tunnel

GRE Tunnel

GRE Tunnel

Page 19
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 20
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 21
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 22
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

IP: 192.168.1.10
Default GW: 192.168.1.1

br0

IP: 10.1.2.10

br1
gre1 Remote IP:
192.168.1.11

eth0

Page 23
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

br0
mgmt0

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

gre1

Remote IP:
192.168.1.11

IP: 10.1.2.10

eth0
IP: 192.168.1.10
Default GW: 192.168.1.1

Page 24
OVS with KVM and guest VM Demo
 The host: KVM will provision a VM guest and communicates with OVS1 and

OVS2
IP: 10.1.2.10 IP: 10.1.2.11

VM1

VM2

tap0

br0

tap1
IP: 192.168.1.20
Default GW: 192.168.1.1

eth0
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
Page 25
Q&A

Page 26
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-onopenvswitch/
http://openvswitch.org/ovs-vswitchd.conf.db.5.pdf
http://openvswitch.org/

Page 27

Weitere ähnliche Inhalte

Was ist angesagt?

Vxlan deep dive session rev0.5 final
Vxlan deep dive session rev0.5   finalVxlan deep dive session rev0.5   final
Vxlan deep dive session rev0.5 finalKwonSun Bae
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep diveWinton Winton
 
Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Weaveworks
 
MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)JuHwan Lee
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
Routed Provider Networks on OpenStack
Routed Provider Networks on OpenStack Routed Provider Networks on OpenStack
Routed Provider Networks on OpenStack Romana Project
 
Openstack zun,virtual kubelet
Openstack zun,virtual kubeletOpenstack zun,virtual kubelet
Openstack zun,virtual kubeletChanyeol yoon
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux NetworkingPLUMgrid
 
[2018] 오픈스택 5년 운영의 경험
[2018] 오픈스택 5년 운영의 경험[2018] 오픈스택 5년 운영의 경험
[2018] 오픈스택 5년 운영의 경험NHN FORWARD
 
Enable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zunEnable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zunheut2008
 
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) [발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) 동현 김
 
Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4HngNguyn748044
 
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 scratchAll Things Open
 
Meshing OpenStack and Bare Metal Networks with EVPN - David Iles, Mellanox Te...
Meshing OpenStack and Bare Metal Networks with EVPN - David Iles, Mellanox Te...Meshing OpenStack and Bare Metal Networks with EVPN - David Iles, Mellanox Te...
Meshing OpenStack and Bare Metal Networks with EVPN - David Iles, Mellanox Te...OpenStack
 
VMware vSphere Networking deep dive
VMware vSphere Networking deep diveVMware vSphere Networking deep dive
VMware vSphere Networking deep diveSanjeev Kumar
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes NetworkingCJ Cullen
 
Faster packet processing in Linux: XDP
Faster packet processing in Linux: XDPFaster packet processing in Linux: XDP
Faster packet processing in Linux: XDPDaniel T. Lee
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStackSteve Martinelli
 
Open vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelOpen vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelNetronome
 

Was ist angesagt? (20)

Vxlan deep dive session rev0.5 final
Vxlan deep dive session rev0.5   finalVxlan deep dive session rev0.5   final
Vxlan deep dive session rev0.5 final
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
 
Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)
 
MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Routed Provider Networks on OpenStack
Routed Provider Networks on OpenStack Routed Provider Networks on OpenStack
Routed Provider Networks on OpenStack
 
Openstack zun,virtual kubelet
Openstack zun,virtual kubeletOpenstack zun,virtual kubelet
Openstack zun,virtual kubelet
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
[2018] 오픈스택 5년 운영의 경험
[2018] 오픈스택 5년 운영의 경험[2018] 오픈스택 5년 운영의 경험
[2018] 오픈스택 5년 운영의 경험
 
Enable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zunEnable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zun
 
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) [발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
 
Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4
 
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
 
Meshing OpenStack and Bare Metal Networks with EVPN - David Iles, Mellanox Te...
Meshing OpenStack and Bare Metal Networks with EVPN - David Iles, Mellanox Te...Meshing OpenStack and Bare Metal Networks with EVPN - David Iles, Mellanox Te...
Meshing OpenStack and Bare Metal Networks with EVPN - David Iles, Mellanox Te...
 
VMware vSphere Networking deep dive
VMware vSphere Networking deep diveVMware vSphere Networking deep dive
VMware vSphere Networking deep dive
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Faster packet processing in Linux: XDP
Faster packet processing in Linux: XDPFaster packet processing in Linux: XDP
Faster packet processing in Linux: XDP
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStack
 
Open vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelOpen vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream Kernel
 

Ähnlich wie Basic Introduction to Open vSwitch

Thebasicintroductionofopenvswitch
ThebasicintroductionofopenvswitchThebasicintroductionofopenvswitch
ThebasicintroductionofopenvswitchRamses Ramirez
 
Openstack openswitch basics
Openstack openswitch basicsOpenstack openswitch basics
Openstack openswitch basicsnshah061
 
Multicloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRPMulticloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRPBob Melander
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stablejuet-y
 
SDNDS.TW Mininet
SDNDS.TW MininetSDNDS.TW Mininet
SDNDS.TW MininetNCTU
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stablejuet-y
 
Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Yongyoon Shin
 
Deeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay NetworksDeeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay NetworksDocker, Inc.
 
Open stack networking_101_part-2_tech_deep_dive
Open stack networking_101_part-2_tech_deep_diveOpen stack networking_101_part-2_tech_deep_dive
Open stack networking_101_part-2_tech_deep_diveyfauser
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation ToolsEdwin Beekman
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksLaurent Bernaille
 
Westermo WeOS Multicast Tunneling
Westermo WeOS Multicast TunnelingWestermo WeOS Multicast Tunneling
Westermo WeOS Multicast TunnelingFabian Vandendyck
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksLaurent Bernaille
 
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 2014Nat Morris
 
Open stack networking vlan, gre
Open stack networking   vlan, greOpen stack networking   vlan, gre
Open stack networking vlan, greSim Janghoon
 
Open stack advanced_part
Open stack advanced_partOpen stack advanced_part
Open stack advanced_partlilliput12
 
Docker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUGDocker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUGPiotr Kieszczyński
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVROpenStack Korea Community
 
DragonFlow sdn based distributed virtual router for openstack neutron
DragonFlow sdn based distributed virtual router for openstack neutronDragonFlow sdn based distributed virtual router for openstack neutron
DragonFlow sdn based distributed virtual router for openstack neutronEran Gampel
 
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
 

Ähnlich wie Basic Introduction to Open vSwitch (20)

Thebasicintroductionofopenvswitch
ThebasicintroductionofopenvswitchThebasicintroductionofopenvswitch
Thebasicintroductionofopenvswitch
 
Openstack openswitch basics
Openstack openswitch basicsOpenstack openswitch basics
Openstack openswitch basics
 
Multicloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRPMulticloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRP
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
 
SDNDS.TW Mininet
SDNDS.TW MininetSDNDS.TW Mininet
SDNDS.TW Mininet
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stable
 
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
 
Open stack networking_101_part-2_tech_deep_dive
Open stack networking_101_part-2_tech_deep_diveOpen stack networking_101_part-2_tech_deep_dive
Open stack networking_101_part-2_tech_deep_dive
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
 
Westermo WeOS Multicast Tunneling
Westermo WeOS Multicast TunnelingWestermo WeOS Multicast Tunneling
Westermo WeOS Multicast Tunneling
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
 
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
 
Open stack networking vlan, gre
Open stack networking   vlan, greOpen stack networking   vlan, gre
Open stack networking vlan, gre
 
Open stack advanced_part
Open stack advanced_partOpen stack advanced_part
Open stack advanced_part
 
Docker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUGDocker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUG
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
 
DragonFlow sdn based distributed virtual router for openstack neutron
DragonFlow sdn based distributed virtual router for openstack neutronDragonFlow sdn based distributed virtual router for openstack neutron
DragonFlow sdn based distributed virtual router for openstack neutron
 
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話
 

Mehr von Te-Yen Liu

Go語言開發APM微服務在Kubernetes之經驗分享
Go語言開發APM微服務在Kubernetes之經驗分享Go語言開發APM微服務在Kubernetes之經驗分享
Go語言開發APM微服務在Kubernetes之經驗分享Te-Yen Liu
 
TensorFlow Studying Part II for GPU
TensorFlow Studying Part II for GPUTensorFlow Studying Part II for GPU
TensorFlow Studying Part II for GPUTe-Yen Liu
 
Caffe studying 2017
Caffe studying 2017Caffe studying 2017
Caffe studying 2017Te-Yen Liu
 
TensorFlow Study Part I
TensorFlow Study Part ITensorFlow Study Part I
TensorFlow Study Part ITe-Yen Liu
 
Machine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionMachine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionTe-Yen Liu
 
OpenStack 2012 fall summit observation - Quantum/SDN
OpenStack 2012 fall summit observation - Quantum/SDNOpenStack 2012 fall summit observation - Quantum/SDN
OpenStack 2012 fall summit observation - Quantum/SDNTe-Yen Liu
 

Mehr von Te-Yen Liu (6)

Go語言開發APM微服務在Kubernetes之經驗分享
Go語言開發APM微服務在Kubernetes之經驗分享Go語言開發APM微服務在Kubernetes之經驗分享
Go語言開發APM微服務在Kubernetes之經驗分享
 
TensorFlow Studying Part II for GPU
TensorFlow Studying Part II for GPUTensorFlow Studying Part II for GPU
TensorFlow Studying Part II for GPU
 
Caffe studying 2017
Caffe studying 2017Caffe studying 2017
Caffe studying 2017
 
TensorFlow Study Part I
TensorFlow Study Part ITensorFlow Study Part I
TensorFlow Study Part I
 
Machine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionMachine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis Introduction
 
OpenStack 2012 fall summit observation - Quantum/SDN
OpenStack 2012 fall summit observation - Quantum/SDNOpenStack 2012 fall summit observation - Quantum/SDN
OpenStack 2012 fall summit observation - Quantum/SDN
 

Kürzlich hochgeladen

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Kürzlich hochgeladen (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Basic Introduction to Open vSwitch

  • 1. The Basic Introduction of Open vSwitch Te-Yen(Danny) Liu Date : 2014/01/08
  • 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 2
  • 3. What is Virtual Switch?  In virtual network, virtual switch acts like an advanced edge switch for VMs. Hypervisor vNIC VIF VM VM VM Virtual Network (L2) Virtual Switch NIC as vSwitch’s uplink port Data Flow Physical Switch Page 3
  • 4. Virtual Network Topology (1/2)  An example of Virtual Network Topology in OpenStack Page 4
  • 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 5
  • 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 Controller Page 6
  • 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 7
  • 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 8
  • 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 11
  • 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 12
  • 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 13
  • 14. ovs-vswitchd  Core component in the system:  Communicates with outside world using OpenFlow  Communicates with ovsdb-server 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 14
  • 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 15
  • 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 16
  • 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 17
  • 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 18
  • 19. Using OVS to build Network Topology  Virtual Machine to Virtual Machine with GRE Tunnel GRE Tunnel GRE Tunnel Page 19
  • 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 20
  • 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 21
  • 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 22
  • 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 IP: 192.168.1.10 Default GW: 192.168.1.1 br0 IP: 10.1.2.10 br1 gre1 Remote IP: 192.168.1.11 eth0 Page 23
  • 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 br0 mgmt0 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 gre1 Remote IP: 192.168.1.11 IP: 10.1.2.10 eth0 IP: 192.168.1.10 Default GW: 192.168.1.1 Page 24
  • 25. OVS with KVM and guest VM Demo  The host: KVM will provision a VM guest and communicates with OVS1 and OVS2 IP: 10.1.2.10 IP: 10.1.2.11 VM1 VM2 tap0 br0 tap1 IP: 192.168.1.20 Default GW: 192.168.1.1 eth0 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 Page 25