Introduction to Open vSwitch (OVS)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I'll cover an introduction to open V switch in which I'll primarily focus on demonstration of using OBS I'll start with the brief definition of open V switch then we will dive right into over us by creating a virtual switch and using it to connect a host and 210 at VMs on that host to each other and to my local network all along I'll use some simple diagrams to represent network connectivity and how it changes when components are added obvious finally a cover a very brief look at the architecture of OBS in future videos I'll look a little deeper at some features of OVS including using open flow creating tunnels like GRE and VX LAN as well as some other configuration options briefly before we jump into a demo of open V switch what is it open V switch is an open source open flow capable virtual switch that is typically used with hypervisors to interconnect virtual machines within a host and virtual machines between different hosts across networks it is also used in some dedicated switching hardware it can be a critical piece in an SDN solution oviya supports many traditional switch features such as VLAN tagging and 802 dot1q trunking standard spanning tree protocol LACP port mirroring flow export tunneling and QoS control so let's jump right in and try out open V switch I'm not going to cover installation instructions in this video so that we can focus on implementation examples I'm doing this demo on my laptop with Linux Mint installed my laptop has an e 0 port getting its IP address and default gateway through DHCP so right now I simply have my IP stack and it's 0 so now I'll create a virtual switch from the shell to do this I'll use an OVS vs CTL command this command is used when configuring OBS bridges so it's over yes vs kettle add - BR for add bridge my bridge here I'm adding a bridge named my bridge but you can name the bridge anything you want OVS vs ctlr vs kettle show will show us our new virtual switch you see it has a single internal port with the same name as the parent bridge which is my bridge this port is also mapped to an interface with the same name my bridge it is marked as internal the distinguish it from the other OVS ports like we will see later I'll turn up this port with if config my bridge up now I'll check if config this shows me my laptop now see is an interface called my bridge if I change my mind and wanted to delete this bridge I would run OVS vs kettle de l - BTR delete bridge my bridge which I won't actually do here all of the add commands you'll see in this video have a corresponding delete command where you just swap out add a DD with de l4 delete let's look at what we have now I've now added an open V switch bridge named my bridge at this moment my bridge is isolated meaning is not really connected to anywhere but my local IP stack in the diagram we can see that each zero is not connected directly to my bridge yet for my laptop to get to the outside Network nothing has changed yet I still go out through each zero next we will change this and virtually connect teeth to zero up to my bridge back to the shell again my goal is to connect each zero to my bridge to do that I'm going to run over yes vs CTL ad - port my bridge e0 let's check the result with a vs vs cattle show we can see there is zero on my bridge let's try to reach the internet though it seems I've lost Internet connectivity for my laptop let's see why in an updated diagram with the o vs vs Kettle ad part each 0 my bridge command I redirected easier to be connected through my bridge as shown here that's what I wanted but my laptop is trying to get to the outside network directly via each Siro now however use to go through my virtual switch called my bridge to get to u0 so to fix this I'm going to do two things I'm going to remove the IP configuration often please zero and I'm going to make the internal port called my bridge a DHCP client so it gets an IP address and default gateway back to the shell if config e00 will remove it users IP address in th client my bridge will get the my Bridgeport my P via DHCP if I do an if config to see if it worked and it looks like I did my bridge got an IP edges with a route - n we see we have a default route via port my bridge which is what we wanted we no longer tried to go through each zero directly pain Google comm shows we can get out next we will add to tap interfaces for virtual machines to use I'll add to tap interfaces for our VMs and then I'll connect these interfaces to OVS so IP ton tap Add mode tap V port one and I'll do the port two as well this creates tap ports V part 1 and V part 2 I'll turn these ports up if config V port one up and if config report - up now if config shows we've successfully added two new tap boards I'll add these new tap words to OVS so I'll do OVS vs kettle again add - port my bridge V port 1 - - ed port my bridge B port - but this - - here is able to pass two commands into o vs vs kettle at once I could have done this with two separate o vs vs kettle commands but I'm just showing this other way it can be done as well with the o vs vs kettle show I can see the new ports view port 1 to be poor - there you can see them call that as ports and all cells interfaces with the same name the difference between a port and an interface is that a port can contain multiple interfaces you would use this concept in creating bonds like LACP for link aggregation in this case we're not doing any bonds so you'll just see a one-to-one mapping of ports and interfaces back to our diagram and here is our updated setup now my bridge now has two Newports V port 1 and V port 2 next I'll connect a couple of VMs to these new ports on OVS on my laptop for virtual machines I'm using VirtualBox you can download VirtualBox from virtualbox.org OVS supports other virtualization platforms too like KVM and zen for example but I'm using VirtualBox share you'll want to check documentation to connecting VMs with other platforms so the VMS I want to use here are VM one and VM to both the boot boot images I need to get them hooked into my new ports view part 1 and view part 2 on OVS so I'll right-click these and go to settings and then I will go to network and I'll say for VM one I want it's destined to be bridged which it is already here but I want it to connect to V part 1 so I'll pick V part 1 and hit ok and I'll go ahead and start that video and the meantime it for bm2 i'm going to do the same thing i'm going to go to settings network and actually it's already set here i want it to go to view port 2 like it says here I'll hit OK and I will start that VM as well so quickly here is our updated network it looks the same as before except I've hooked up my two VMs notice that these VMs have a path to the outside network they have their each 0 ports connected to OVS and from our steps before we still have the OVS bridge my bridge connected to my laptop seat 0 so my new VM should be able to get th CPI a piece from the outside router and should then have internet reach ability let's check out how our VMs are doing here's VM 1 if config shows I got an IP address from DHCP looks like I got 192 168 1 80 in my home network let's ping the outside world I'll ping google.com and it looks like that works just fine on VM 2 I can do the same thing next I'll do it if config see here I have 182 and 68 1.83 hangout also and it looks like that works as well also try painting from vm2 towards VM one-celled paying 192 dot 168 to 1.80 and we see that the two VMs can ping each other as expected let's go to my laptop shell again here I'm going to try a new command OVS app kettle obvious app kettle is used to configure a query demons associated with OVS in this case I just want to co VSS MAC address table so r1 o v SF kettle FD b / show I'm actually here I need to specify the bridge I want to do this for so I'll say my bridge and here we can see our two VMs are showing up on ports 4 & 5 these are open flow ports 4 & 5 so I'm one of my VM windows over here I can see the hardware address or the MAC address 0 8 0 0 to 7 f5 789 I see that over here on port 5 and I know that the other VM is this one here on port 4 open flow port 1 here is my I 0 interface and port 0 here is my my bridge interface this is a little tricky here because we're talking about open flow port so we see ports 1 4 5 and 0 and we probably need to figure out how that maps to the ports that we know like eat 0 and V port 1 and B port 2 for example so another command can help us out there if I do OVS Oh F Ketel show my bridge OVS Oh F kettle is a command used with open flow switches for setting and querying open flow parameters when I do a video on OBS and open flow we will use that command much more so if that OBS oh F kettle show my bridge command I can see that port 1 maps to e 0 port open flow port 4 maps will be port 2 v 2 v part 1 and 0 or local for my bridge now that I've mentioned open flow and OVS Oh F kettle there's an important point I want to insert here as I said at the outset OVS is open flow enabled if you're not familiar with flo i suggest going to open networking org for full details you can also watch my introduction to open flow video on my youtube channel so with this connectivity we now have between vm's and out to the Internet through OBS I haven't done anything in particular with open flow what I mean by that is normally with an open flow enabled switch need to connect to an SDN controller or you need to manually add open flow of flow entries on your switch for any traffic to get forwarded we haven't done that here so why have I been able to have packets forwarded through OBS successfully without doing these things the reason is OVA starts with a default flow entry that makes it act like a regular layer to switch let's look at it from the shell so here I'll run OVS of' kettle dump flows my bridge so let's come and I just ran I'm looking to see all flow entries on my bridge here we see a single flow entry and it's action is the normal action this means normal l2 forwarding so it acts like a traditional simple layer 2 learning switch of course for Sdn we really want to interact with an SDN controller and custom up open flow flow entries but for the purposes of this intro video this default action is good enough before I wrap things up in this intro I'd like to do very brief coverage on the OBS architecture in the video description I'll link to a reference for this material from an O vs deep dive presentation that goes in a way better detail the three main components of OVS are V switch D o vs DB server and a kernel module vs HD is the core component and runs in user space the switch configuration for OVS though is stored in a database OVS DB server because of this configuration changes are persistent they will survive a system reboot the o vs vs Ketel list command will show you the records of the different tables in the OBS DB for example if I run OVS vs catalyst bridge we see my bridge in some IDs for its ports OVS vs kettle list port shows configuration details of the ports from the ports table and Oh vs vs cattle list interface shows configuration details of interfaces from the interface table so here we can see the local internal interface my bridge see some information like MTU link speed there's V port to scrolling by there's here comes viewport one and there is zero I can see some statistics that are being kept as well in this table so that's from the OVS DB server and as I said before OVS also has a kernel module when a packet arrives to a virtual switch if there is a cached match in the kernel module the cast actions are taken if there's not a match in the kernel module the packet is punted into V switch D in user space future meshing packets will then typically have a fast path through the cached entries in the OVS kernel module that are ups up this introduction to open V switch thanks for watching if you found this video useful I would like to see more please subscribe to connect with me I can be found at wymt.com /i n slash David Muller I welcome any feedback in connections in the video description I'll include some links and references for the content in this video which have more detail in the future I create videos including tunneling GRE and V excellent with OVS use of open flow with OBS and using some other OBS configuration features and options
Info
Channel: David Mahler
Views: 309,984
Rating: 4.9681182 out of 5
Keywords: Open vSwitch, OVS, SDN, Software Defined Networking, David Mahler, Virtual Box
Id: rYW7kQRyUvA
Channel Id: undefined
Length: 14min 35sec (875 seconds)
Published: Sun Dec 15 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.