Tommy here from Lauren systems and we're going to talk about building an open source slab using xcp and g including how the virtual Networking works inside of it if you all learn more about me and my company head over to Lawrence systems comm There's a hires button right up at the top if you want to support this channel in other ways There is affiliate links well on the side of our website and down below this video to get you deals and discounts on Products and services we talk about on this channel that does include shirts because this question seems to come up a lot in Comments and where do you get the shirts? There's an affiliate link for the shirts over on teespring If you like any of the shirts that we have or ones you've seen us wear that are available on our store you can order them here Shipping is pretty much all over the place. Teespring takes care of all that for us all right xcp and g is the Fully open source hypervisor. I've talked about a lot on his channel But I wanted to give you a getting started video now I have videos that I'll reference that go in depth on other topics But this is the basics of getting you started This is an fully open source product and it does offer paid support if you want it We're going to talk about it from the concept of building your own lab Which means we're going to use the open source unsupported versions of this You can get support from their forums and have discussions They do offer, you know a good community that actually they have quite a big community as they point out here 23 000 forum posts and over 90 000 downloads of this and 3400 forum contributors So they have a very active very healthy online community, which is great if you're looking for basic help So I think this is a great product with a great community to build your system on But it also does work in the production environments of large-scale enterprises And that's also why I want to start with what is zen orchestra? What is the architecture of this and what is zen project? So zen project is the actual hypervisor itself, but not the whole thing zen Orchestra is an orchestrating tool that runs on top of it So you have xo a the zen server, which is over here xcp and g But xo a actually supports both the citrix one and the open source one from here citrix has their own version This is separate from citrix, but citrix does pull Just so you know the same zen server at the core and zen server itself at the core is if you're wondering Just how popular a project it is. This is still the primary hypervisor within amazon and I know amazon uses more than one But this the zen core not xcp and g but the zen core is a big part of the hypervisor system That's used in enterprise things like amazon and xcp and g is used very frequently like I said in large production apartments all right We'll start at the hardware level And picking out a server means well Some you know guesswork sometimes for things they do have A hypervisor hardware compatibility list generally speaking it does work on a very broad range of hardware But will it work? Is it hardware compatibility certified that matters a lot in the enterprise market? And I just chose a del server, but I mean they have a lot more than just del in here And they bring up del because one of the affiliates down below is tech supply directed and they do offer discounts And for example, I just did a video with the del r630 It's 100 compatible with zen server. It's on the list here You can spec one out and I have a separate review. I did have this It's a good server to run this on but obviously if you're building a lab it kind of comes on to whatever you have So even if you don't have a system that matches this hardware compatibility list, it doesn't mean it won't run specifically the lab server We're building here is on an amd fx processor with 24 gigs ram and an ssd and some random motherboard We had I purposely built it one out of spare parts I had two to show that yes, it'll work with things that aren't even on the list But anytime you go off-list with it, there could be Potentially compatibility issues and there's work around for some of those compatibility issues that you can discuss in the forums Now architecture wise this is where sometimes it's a little bit confusing and this is an important part of the video That's I wanted to start with when you're loading xcpng Which we will go through the loading process of xo a zen orchestra the preferred way to control and manage the servers is a vm that runs within it This is different than some other projects and I'll bring up proxmox I don't really use proxmox, but of course i'm familiar with it. They integrate it all into one system And that's just a different architectural design to load it and have the management platform be within it Zen has been done differently for a long time and one of the reasons that is scalability So you can have a single system running xo a one vm wherever that vm lives As a matter of fact, it doesn't have to live inside of a Zen server, but traditionally you do it's one of the servers you would have running on there You can but I could be running it directly even on my computer right here if I wanted to it's a web-based application And there's instructions and we'll get to those and how to build it or you can just download it from them But from one server you can run many many zen servers So from a concept of that you can even and they have options to work remotely I can have a zen server running as an orchestra server running here at my office and vpn into other clients that are remotely and Manage all of their vms with it. So zen orchestra offers a large amount of flexibility and scalability by doing it this way So you can have all these machines deployed and even if they're completely separate pools for example So you pool resources together So you take a series of physical zen servers and you create a resource pool So you can do things like high availability or just easily You know move vms around between those resource pools zen orchestra can connect different pools together And move machines between them And this is really easy for us because we have our main production pool and we have our lab pool And we'll be focusing on the lab pool But I can use one instance of zen orchestra to manage both pools very easily and move vms between them Even though the servers don't have to know each other zen orchestra will handle the introduction So to speak of the server so they can speak to each other and pass vms around between them provided They're all on the same version of xcp ng I do bring that up because there's sometimes these Compatibilities if you have one on a newer one and one on the older one Older will go to newer but newer doesn't always go to older. It couldn't sometimes be compatibilities It's always best when they're on the same But zen orchestra can handle talking to pools that are at different versions So even if some are at older versions, you haven't get it on re-upgrading and some are at newer zen orchestra will communicate with them All right, so first thing is do is download it pretty easy Grab the iso and install it now. I've already physically loaded it on the hardware But what I want to do now is walk you through what it looks like to go through the load and what the options are to choose I want to boot you've got two options standard boot or advance We're going to look at the advanced options and what these are is if you have a certain edge cases Like install or upgrade Alternate kernel options serial console etc. There's a couple different things if you have an edge case And like I said, if you have certain hardware compatibilities, you may want to try one of the other kernels or the install 2g That's for some of the Ryzen systems that there's some working out compatibility issues with and same with some of the epic So let's go back over here And we're just going to go through the standard install go through the boot installer here So press enter and I'll fast forward through this while it boots Once it boots you're presented with, you know, kind of a basic style older as I Have sent around for a while linux style installer Press enter next, you know pretty basic here check for existing products I've loaded this demo before so it's going to find an existing one Now one of the nice things about how this works We're going to perform a clean install, but it also sees backups on here when you do the upgrades You actually will upgrade them when there's full releases the same way you put the drive in and you install over the top And it performs an upgrade, but it keeps a backup This is a great way to do it because whenever you're Doing this you can always go back and just pop the drive in and if it doesn't go well restore from that backup But we're going to go ahead and delete and put a clean installation in here We're not worried about the backup now hardware wise This has got an 80 gig hard drive in this is the demo one the machine the hardware we built it on has 120 gig ssd in it I put two in this particular System to show you that there's an option comes up for software raid So I do have the ability if I wanted to hit software raid and I can raid two systems together Or two drives together to make a raid if I wanted to we're not going to for this demo I just want to show you that was an option there and if you're using enterprise hardware You can also present a single large drive Like with the del raid utility would be an example like I did in my del r630 review to xcp and g and just have it Install there now xcp and g slices a part for the operating system and will take the remaining hard drive Whatever the size that is and leave it for storage for the vms as a local storage There are ways later to add more storage to it or you could start putting all the drives together themselves There's a couple different options you can think about for doing this But you at least want to install it on one drive Itself maybe one smaller ssd that's on the system, but it'll still take the leftover It doesn't use and allow you to use it as local storage Now this is the part where it's going to ask about the local storage essentially We could merge these together and put them both in here in storage for now Which for simplicity we're going to do it as ext because this is going to match the physical hardware when we get there I prefer the ext file base maybe slower, but then provisioning I can't really say and you can go look into forums There's barely any noticeable speed difference between lvm or ext Especially because now the newer versions are using ext4 the previous versions were using ext3 So I don't think there's much of a difference anymore But my preference because i'm more familiar with managing the ext system I'm less familiar with lvm is ext plus it supports the thin provisioning Press okay local media scanning Live dangerous and skip verification of the media Give it a password, but it doesn't really matter because we're going to change it And this is just the demo for install Static is probably your preferred so 192 and 683 dot 102 210 Whatever works for you match it to your network settings when it was free you can work this as dhcp if you want Um, but it's probably easier to find the system if you statically assign it to an unused address Give it a name dns servers, whatever your preference is Choose a time zone We'll skip this for now, but you can put your I think it is it But I don't think that's the right one put a proper time server in there and hit install This will take a little while it's going to go through the installation eject and reboot Depending on speed of your hardware this may take about five to 15 minutes to install Like I said wild variation comes with how fast your hardware is really fast hardware and install faster So now we're going to get out of this and show you what the next step is to forgetting to set up All right, once the system's loaded you go to HTTP 192 168 3 dot 210 the ip address we assigned to the system It says welcome to xcp ng 8.10 now as of 8.1. Like I said, there's no management interface here to actually Manage the system, but it gives you some options for a quick deploy your download before we do either one of those I assasaged into the system. So root at 192 168 3.1 3.2 10 and we're going to do a yum upgrade Okay, no updates on this is actually because I've already done the upgrades on here The first time you log in there's probably going to be some updates depending on when you downloaded What version you downloaded and if there's been any updates But the good news is from the command line And it's better to do it before you load anything just yum upgrade It runs through the upgrade process and then you just can do a shutdown Dash our now and it'll restart So we're also going to pull this up now if you were to plug in directly to the machine that this is running on right now And this is what you would see the status display You know network management, etc. And this interface This is what's actually on the screen right now as far as like if it booted up But you don't really have to do anything with this and pretty much the machine right now is sitting in our lab And is headless. It doesn't have a monitor plugged in at all. So let's go back over here And talk about quick deploy So the two options for management are zen orchestra the older one And I've talked about this in my older videos But I don't really use it at all anymore is xcp and g center As a matter of fact with the 8.1 Please note It makes sure you have the latest version because they just fixed a bunch of bug updates where it was trying to Pull some of the wrong updates for it This is the lesser maintained and lesser featured system and it doesn't have as many features as zen orchestra does So zen orchestra has everything like it's a pretty extensive Everything from backups and continuous replication and all the different bells and whistles including a lot of advanced networking options But of course they have a paid version versus a free version Let's talk about that when you run the deploy it's going to run Right here and we'll put in the password Connect and put an ip address and this is really slick It goes through here. It you can see all the different networks that are on this and we'll get to those in a second It's going to see normally just the main network You put an ip address you want to sign to this and it's going to load and launch the free version of zen orchestra And they have a comparison for what's in your free package and things like that limited support But it does work You don't get all the cool auto patching rolling snapshot full backup features and all the cool reporting features On the starter you do get 15 Days of premium included with it, which is pretty cool. So you can actually use it to play around and see what all the full features are But being that this is a lab The concept is let's build it all from sources now. They have all the details and all the documentation in their Documentation here on how to build up from sources. It's actually really cool And they did a nice job of documentation overall But they also like I said details how to do this or You can go here and this is the zen orchestra Updater zen installer from sources and this is a github script I have full instructions on how to do and use this on my video that i'll leave link to how to build zen orchestra from Sources using zen orchestra install updater. I have people say they can't find the video I don't know how to make it any clear, but I will link it down below Is it's pretty easy to find for how to build it from sources using this update tool works really well It makes it really easy. They also have docker images if you don't want to take the time to compile So let's go over here The first thing you want to do after you have it loaded is get zen orchestra running and that quick deploy is probably an easy way To do it once you have that running you're going to want to build a vm But you're probably asking well, how do I at least get one iso on there so I could build the vm Well, I do recommend doing the quick deploy for it and I'll show you how to set up local isos. This is actually Not my favorite way to put these on here, but if we're talking about a single lab server This will definitely get you started. So this is how you create a local iso repository Now we're going to assume you already loaded the xo a appliance and the xo a appliance system the free one With the quick deploy here completely will let you do this without even activating the trial You can add this local I figured I'd show how this works real quick When you go here to create a repository and we'll walk through the system. So we're going to go new and we'll say new storage Select the host which is the xcp ng lab And we're going to say we want a local iso repository path to directory. Well, we're sshed in over here We'll call it local iso local iso now we're going to go ahead and find something to download And i'm pulling this from the devian page. So we'll just copy this link here We're in the iso folder and we'll just type uh w get to pull it But you could use whatever tool to get this in here What we did is in the root of this system. We've added this particular iso Now the problem you may run into is there's a limited amount of storage in the local system And that limited amount of storage means well You're not going to be able to put too many isos in here and you could cause problems So this is not my favorite way to do it But it is a way at least you can start getting some isos on the system But I wanted to show that this is possible and how this part worked To an ls and pwd. So we're at local iso right here Let's copy that and we see that there's one devian iso in there So where's the path? Local iso we hit create. Well, actually gotta give it a name Call it like local iso here create Oh, please fill out the description There we go Let me look at what drives are in there. There we go pretty much One disc one simple system in there not a big deal If you want to put a few more in there, but like I said, there's a limited amount of storage That's how you would do that and then to create a new vm you go over here to new vm Select the pool select a template and we're going to say Devian 10 because that's what we downloaded in there and then you would select the iso And there's our local iso now. I obviously have a lot more isos in there We're going to talk about the better way to do it. So right here's that devian one If we wanted to go ahead and create it and we could go through the load process and build a vm Not going to do that. We're going to go back over here to storage pools And let's go get rid of the local iso one remove it Oh Gotta disconnect it. Yep Yeah It's stuck because there went something it was stuck because I thought something was using it takes a second and now it's gone All right, so if you go back over here to storages I have this free nas iso the way this got on there pretty simple this is A free nas server with a bunch of isos in it now this can be this is just as smb mount But this can be done in a few different ways. So we're going to go to new storage post storage name Select the value and you have local nfs or smb You put it in the server name now This can be your windows server if you have all your iso files on a windows server And you have an open share or a share with the username password on there You put all fill all this in and create and it will read all those on there It only has to be a read only share because it's just pulling the iso files. So This is another option for getting all the isos in in the better option Especially because I have so much storage on my free nas now. What about adding Other local storage well I'm not going to dive too deep into that because we have some available local storage for things But kind of the same thing when you're adding a new storage So we're going to go ahead and look at the existing storage again And we'll look at this right here. This is my free nas name dozer And mount dozer been left. So let's go ahead and show you how you add one of those. We're going to go new storage again Select host Free nas nfs It's just an nfs share the basic options of nfs share. We'll log in and look at those real quick We'll choose nfs 192.168 Default nfs version Get this little query and look it found all the different ones that are available on there That I have including the lab vm Which is actually not a good idea to add the same one twice that will probably create some problems So i'm not going to do that but this you kind of get an idea That's pretty easy way to do that now What does it look like just really quick and free nas and you can do this with Synology you can do this with really anything that supports nfs And here's the zen lab vm share. We're going to edit Advanced mode check the box that says all directories make sure it has permission to Read write access into that storage. Like I said, whatever you're using for storage that will work a few other options that are inside of the zen server We're going to go back up here It does have and i've covered this before how to set up iscazion there lvm local zfs local So they've built in zfs if you have a bunch of drives you can go to the command line and time to get over zfs I believe you can have a separate video on that lvm or simple ext local So if you just have a device you can just point it at that device and it will create an ext file system Where you can create an ext file system on it and point it at the device after you create it that you've attached So there's plenty of options to dive into and your documentation is pretty good on that so Once those pieces are taken care, let's jump into the networking part Now there's two pieces to the networking It it's sometimes a little bit confusing But let's get break down and explain it by starting over here This is my lab. This is my xcpng lab system running an amd I put the processor because someone will ask it's an fx 83 20 with 24 gigs of ram in a single 120 gig ssd on there So the hypervisor and all the vms live inside of this one physical box The network card in here happens to be an intel x5 20 10 gig card There's a lot of different 10 gig cards that work I like the intel ones because they seem to be very very compatible This is going to my unify switch My unify switch is set up as a trunk port Which means all vlands are passed across here. That's an important thing to remember So all vlands and that is also the native network is the 192 1683.1 network That's native vlan one and I'm bringing this up because we're going to talk about not just how to create a network But also how to create a couple of vlands in there But it is important to know that it's a single physical network connection But we're going to create vlands inside of here and show you how they work And they're already defined either in the unify switch and the pf sense or just the unify switch That's going to vary with some of the switching equipment But at least you should be defining those vlands within there if you want them to work on the ports We're also going to talk about the private networking features that are in here Let's go back over to this And look at kind of the ip layout of what we have set up So my pf sense Manages the 192 683.0 network and the 1272 network. I do have defined but not managed in pf sense It's only defined as vlands in my unify Vlan 20 vlan 100 vlan 200. I just created these so I have some extra vlands for Doing things where I may want something in the physical Side of the server to come out to a physical port. I may do in those later in advanced videos I just want to mention exist, but you do have to have these defined in your switching equipment And that's because we're going to be running pf sense inside of here as our lab Which you've seen me do before if you watch this channel And that's how I get pf sense inside the system to talk to outside systems is by Splitting off these vlands, but physically the lab servers like I said one physical ethernet cable connected at 10 gigs So there's the assignments we have here's the lab server itself the xcp ng And this is a virtual machine running on it the zen orchestra and it's at dot 28 So let's dive into the networking side of things now Please note. I am using the fully compiled version Like I have him reference to my other video of zen orchestra that being said I did compile it with the flags and you can look through the details when you set it up Or use a docker image to say make sure all the plugins are there This is important because if you don't have some of the plugins specifically the plugins related to the sdn controller You wouldn't be able to do some of the steps in this video because the sdn controller has to be turned on So if you did compile it that way great You just have to turn the sdn controller on if you try to create a network without That turned on it prompts you with a link to the instructions of how to turn that on So let's go over to the networking under host And we can see the network interfaces right here This is the one that's assigned the other ones can all be left alone You assign them to the VMs But you don't have to assign anything more than a single IP address within the actual physical xcp ng machine But you notice I can't edit these networks. So that seems kind of odd, right? Well, not really And I ignore the fact that for my lab demo We did set it to tcp instead of static because I wanted pfSense to handle that So if anyone wants to point that out that I said set it to The other way. Yes, you can set it to static But I choose dhcp that way I can manage everything with my pfSense just fyi and you can see it's connected at 10 gig But then we have vlan 20 10 gig storage. Let's go ahead and add another network Now even though I can't edit them here Let's talk about exactly how we add them and where they end up So you go over here to network We select the pool and if we had more than one pool collected It would give me all the options for the other pools You can see which ones are plugged in and eth0 is the one we want to use And we're going to call this vlan 69 Because the vlan tag is it is not the mtu. I'm sorry 69 You can leave the mtu at default if you want to tweak it They do give the option to leave it at default unless you know what you're doing there So we just named this vlan 69 to make it simple. We'll go ahead and create network All right, and we're going to do another new network Select pool It does have bonding options if you were to select multiple interfaces That is an option in case you want to know what that is up there So you can bond them together studio 100 create network And we'll do one last one just so we match what we had in the sheet over there Over here to network Actually 200 copy and paste the wrong thing here 200 200 Now we're going to go to home pools And we edit all the networks from the pool. This is where you can actually change and Set settings on these and use them and rename them to something different if you want and the reason you Edit them in the pool is so all the hosts have matching Network interfaces in that pool and let's show you that in production So if we go over here, we go over to my production pool here And we look at the network interfaces and let's say we have this this is dot three general network Not in use studio 200 lab network. Let's edit this one to say lab network. So we'll put this as lab network And I have in here go to the host You can see that network is now in this host and that network is in the other host as well So what this allows you to do is create it in one location And this automatically gets propagated to the other ones pretty straightforward But if you're even if this is a host of one, it's still the way the practices are of doing that one important thing The network order has to match in order for this to work properly So eth zero is plugged into and trunked all on my main system just like it is on my lab system So both of my servers the xc xcp and g running on the 630 and the other one go over here back to host 720 both have a matching set of network interfaces plugged in the same way for the network It's there's ways to rearrange them. It can get a little tricky But generally if you're putting them in you want eth zero on each computer to be plugged into the same Network that way if you pass any vm between there's not any weird things that happen And same goes for each subsequent network interface the cards can be different types of cards They should just be plugged into the same network interfaces So it's a little side note on when you're building the machines, but it's something that is fairly important to do When you're doing that because you're naming them all in the pool. All right back to the system here So now that we have those networks built, let's talk about building one more network and that's a private one So the private networks are different. So the vlands work fine for When you have the system and we'll go open the system requirements here the vlands are for when you want a Network of course to pass through your network and switching equipment But sometimes maybe you don't necessarily want it to openly pass through there and there's a couple different options So they have vx lands and encrypted g re tunnels I've already got one vx land created on there and you can create one vx land or one g re tunnel And it has an encryption option and you can if there was more than one pool We'd have the add pool option And these are kind of neat because what this allows you to do Is have an extended software to find networking controller and you can find this they have a lot of information on it But one stn controller three different pools Many different hosts that can talk to each other through an encrypted tunnel Now this is an interesting way you can build out a pool and have inter communications between the vms on tied to a back end vx Land that's all encrypted and you're able to pass this data back and forth as if it's kind of a Almost like a vpn, but it's actually at the network layer So everything goes across there and this is sometimes used in data centers But when you're building out something kind of specific for yourself and you want to play with a lab and you say I want this locked down Don't let it leave into my networking equipment, but this particular vm needs to stay behind Whatever firewall we put in front of it and we will demo how to set up pf sense in front of it That's one of the other options they have in here. Um, it's pretty pretty neat I'm not going to dive deep into it other than yes It's pretty easy to create and pretty easy to maintain and the reason you still tie it to An adapter so it knows what adapter to leave and go out through the system when you're setting it up So uh, that is definitely an option in there. All right Let's go over to pf sense now And we're going to say filter none to show all the vms that are on this machine right now And we'll go over here to the pf sense lab setup and let's look at the networking So we have the vlan 69, which let's just change it So we'll have it plugged into 10 gig native, which give is it a 192 1683 dot address on there And then I said studio 100 and studio 200 now the studio 100 200 are not defined in my pf sense They are just vlans defined in my switching equipment And this allows me if I want to put any ports on my switch To trunk it to that particular Vlan tag I can say tag 100 tie it to one of the switchboards And then the pf sense in here will then feed any devices that are outside of my network for my lab testing And this is how we do some of the demo videos that you see in our studio So we'll go ahead and fire this up now as far as getting pf sense on xcp ng They have a tutorial right here right in their blog post about how to do it They have entries in our wiki on how to do it and I will comment on this There's two approaches to setting up vlans and I definitely By far as it says here the easy solution and perhaps the officially supported approach for xcp ng When you do this dom zero hands all the vlan tagging what that means is As we were doing it and creating all those network interfaces Each one of those network interfaces is attached to the main xcp ng system and in it's handling the vlans And pf sense which should be booted up now it is we'll go ahead and log into it It does not see these as vlans, but as actual adapters So by handling it inside of here and we'll log into pf central quick It does not see these as vlans here. So if we look at interface assignments, we go over here to vlans There's no vlan tagging going on here. Everything's treated as an interface So instead of adding more vlans to here even though they are because there's only one physical adapter on our xcp ng machine and everything else is trunked out with the vlans And that's how we're slicing these up to build out the separate networks You don't actually define them here. There is some information on here and ways to do it But it's it's kind of I don't know. It doesn't seem as well supported It's more challenging to do that and I don't think you gain any benefit from it Other than you'd be able to define and play with vlans inside of pf sense here But that like I said kind of a one-off thing I mentioned it But I prefer to do it the way that I have this set up But when was the first interface lan lan to Ignore this this is for another demo, but these are the interfaces that we have attached that we have right here So you can see that the second one down xn2 has the 40 network on pf sense So we should be able to go over here Network and we'll attach it to the studio 100. So now we've attached this to studio 100 and we'll boot up this Debian server Debian on my labs server here And it now is behind the pf sense and should get an ip address once it boots Boot it up. Let's log into it And it has 192 168 40 dot 119 we go over here in a pf sense services dcp server Hey, look there is the Debian lab assigned 192 168 40 dot 119 Pretty easy enough to find there. And what if we wanted to change it? What if we want to put it on the other network? Well, it's actually pretty easy. We go over here to network We'll change it to the studio 200 option And now it has 10 dot 10 dot 11.  You can see That's the other network inside of pf sense the xn2 network adapter that's attached to that pretty straightforward to do Now the only tricky problem I've had and pf sense might get angry if I do this is it. Let's go ahead and change it So let's try that lab vxlan sometimes pf sense Yep, it didn't like that. So let's see if it actually worked Sometimes you do have to change When you change the network it after restart pf sense not all the time but some of the time I've had this happen Yep, it still thinks it's disconnected. So you just have to reboot it. So we'll reboot pf sense real quick and It'll come right back up and running. So we'll just go ahead and reboot it It doesn't like the network adapters on pf sense being changed without a restart I'm not sure what the work around for that is or if there's some driver I'm missing but I did follow the instructions and I do see that happening It does have as you can see and it's stopping right now the zen guest utilities running in the background But that still happens. So we'll let this reboot real quick All right, pf sense is rebooted logged in And now we change the network to this lab vxlan So we're not going to go through the whole demo of extending this vxlan across other pools But just to show you basically if we take and go to the vms here and now this server We're gonna move it over to that vxlan here There we go And we still have the ten address and We should be able to get out And we're on the internet so we can ping things we can get out on the internet things are resolving Networks are really fine now the one other network type that's worth mentioning in here and we can go to the pools Exhibiting lab go to networks is the host internal management network networks On which guests will be assigned a private link local ip which can be used to talk to the zen api These are kind of neat because this is local only to one physical host So you can tie things to this particular adapter, and this will allow you to have communication Only inside of this particular machine So it doesn't have anything else But you can tie this once again to pf sense and then build your networks behind it and everything flows back out of pf sense Now the other question that comes up a lot is what if I want to virtualize my pf sense and run it inside of here Well, if you may have noticed I labeled a couple of these not in use not in use And that's just kind of a general house cleaning I do when I set them up if I don't have and there's nothing plugged into These other network interfaces like eith 1 and eith 2 our system is not in use But what if I wanted to use them and what if I wanted to use it for my cable modem to plug into my virtualized pf Sense so I can have it all virtualized my self I prefer to run pf sense on real hardware that way if i'm ever troubleshooting something I did inside of zen server and it didn't boot for some reason I have easy internet access but if you insist and want to run it this way you could call this cable modem And the reason you might want to call it cable modem a b a b l e modem Is you would take this and assign it to the wan And calling it cable modem would help you Hopefully not accidentally assign it somewhere else. So if we were in here and we seen it and we go to networks And If you if you assigned it cable modem You would go, huh? I'm assigning something a network called cable modem So if you label like that it's a good clear way to let you know where to assign it to and where would you assign it? pf sense pretty straightforward as you go here And you would change the native network and we're using a native network Because this is essentially double-natted as my lab system, but I would change this to cable modem because vfi vif Number zero is right here. It's the first network in it or if you're looking in the council You'll see that it's x and n zero inside of pf sense and assigned here via dhcp Now in case you're wondering can't you assign more than one thing to your cable modem? Yes, and it's essentially the same as when you come out of the cable modem and you plug it into your switch Any type of switch and then plug more systems into it What happens next is really based on the support level you have with whoever your cable writers Or really if you're doing this and you're getting like let's say a fiber handoff that does give you a whole block of ip's Yes, you could assign them all through here or even have xcp and g and have that one port that we label cable modem Attached to multiple pf senses or multiple different things that you have virtualized inside of here Maybe you want to have a server have a direct public address. That's another way to handle it So there are some different use cases that do work if you want it publicly done Just be careful when you're doing that because what you don't want is because obviously it's so easy to go here and Go to the network and swap these two really any network pretty quickly You don't want someone to accidentally do that and accidentally take a server that's supposed to be private For local communication and just throw it out on a public internet But that's pretty much it there for setting up the networking pretty straightforward Now anything else you do from here I've gone and got videos on how to do the backups how to do the config backup restores settings setting up the remotes and There's a lot of other features that are in here that obviously you can play with There's importing vm's importing just a disc and setting up, you know New servers new storage new vm's and I have other ones on how the entire ha process works where we took Several servers tied them together to a single resource pool put it in ha mode and showed how it auto failed Over between them and because this is a self-compiled version. Like I said, it does have any Support if you want to use in production they do have a purchase option And if you decide if you're playing with this in your lab and you want to run this at your business There is paid support for both xcp and g and zen orchestra and support packages available That do help out the developers of this that is the way they monetize is they make money selling support packages for The whole system if you want to use it in production, but it's a pretty awesome system I've been using it for a while. We've got a lot of clients running this in production I'm really happy with it. It's been an excellent project and 100 open source So all the features and I've talked about some of the other ones details before like The v-motion that you see in the esx esxi world does work inside of here They have the zen motion as they call it so I can move and transition live servers between pools and a lot of those other bells and whistles including Doing snapshots and snapshots with memory so you can snapshot something in place and grab live memory for backup So there's so many features I could probably go on another hour But I won't if you look through my videos I have a few more on there and of course they got plenty of documentation You can go through inducing your own reading and they have a very lively community and forum where you can also have discussions as well So a read and thank you. Hopefully this was helpful And thank you for making it to the end of the video If you like this video, please give it a thumbs up If you'd like to see more content from the channel hit the subscribe button and hit the bell icon If you like youtube to notify you when new videos come out If you'd like to hire us head over to laurancesystems.com fill out our contact page And let us know what we can help you with and what projects you'd like us to work together on If you want to carry on the discussion head over to forums.laurancesystems.com Where we can carry on the discussion about this video other videos or other tech topics in general Even suggestions for new videos. They're accepted right there on our forums, which are free Also, if you like to help the channel in other ways head over to our affiliate page We have a lot of great tech offers for you and once again Thanks for watching and see you next time


First of all, I would like to thank you for your kind invitation. It is really an honor for me to talk to such a distinguished audience. And I think the format will allow some real discussions given that it's a small room and we are in a more intimate setting than in a large conference room. What I will try to do is to have a short introduction of how the establishment of the European financial supervisors and among them the European Banking Authority came about. And I would like to put that into a European context into the process of addressing the problems that came about in the European financial system during the 2007 and 2009 financial crisis. And unfortunately to the context of recent events that are still prevailing in the financial markets in Europe. I think that the advantages of financial integration in the European Union and even more so in the monetary union of Europe has been well documented. The literature in academia and also in applied research clearly stated that there are many advantages of creating a single market in Europe in financial services. I would name three advantages that is I think applicable to all countries and all financial institutions. One was that cross-border activity increased the international diversification of credit risk in the asset books of banks. And if well managed in terms of risks it is clearly an advantage for an institution to have a well diversified asset portfolio. Also on the liability side the integration increased the opportunity for banks to go in their funding activities to a more diversified setting and therefore stabilizing their funding structure. And thirdly there was as a consequence of this integration there was a clear process of transferring knowledge, expertise, governance and stability across the borders through subsidiaries and branches across the European market. Nevertheless I think this process had its own risks and these risks were revealed in the financial crisis and I would mention a few of these risks. When the crisis came about it became very apparent that there was a problem of the regulatory landscape in Europe. Financial institutions who were acting in a global fashion or in a European fashion in a cross-border fashion were regulated extremely differently in various markets. And unfortunately this was used for regulatory arbitrage purposes and this meant that some of their activities were not properly regulated and were not properly overseen by the financial regulators of their respective jurisdictions. Other problems that came about in the financial crisis was that due to their international diversification their activities became completely interconnected so if there was a problem emerging in one spot or in one institution or in one country or in one segment of the market that translated into waves of risks very quickly to the entire European financial sector. Now this of course came brought the recognition that something needs to be done at the European level if we want to preserve the advantages of integration but we want to reduce the risks associated with this integration. This brought about the setup of the new European financial supervisory framework. I will try to... This has to be the middle part of it. The middle, okay. Okay, so what I will talk about is a little bit of an introduction of the landscape of the supervisory architecture in Europe. Then I will go into the details of the functioning of the perceived or potential functioning of this new supervisory infrastructure and then I will mention some topics of let's say particular interest in our activities of recent month. The new institutional arrangements in Europe are based on let's say two major pillars and four institutions altogether. One pillar is that a new authority was created for macroprudential oversight of the European financial system. This is the ESRB. It is dominated by central banks. Its seat is with the ECB. Its chairman is the governor or the president of the ECB and it is functioning there to look at the European financial system as a whole and try to identify risks that are threatening the entire functioning of the European financial system. The other pillar is the, let's put it this way, the microprudential pillar of the architecture and this is comprising three institutions, three microprudential authorities that have been created with a sectoral breakdown for the insurance and pension sector, for the banking sector and for the securities market sector at a European level. These institutions, the insurance is seated in Frankfurt, the market, the security supervisor is seated in Paris and the EBA is seated in London. These institutions are there to provide functions of microprudential nature for the European banking, insurance and securities markets. There is a joint committee that is coordinating between the three ISAs. They are called the European Supervisory Agencies, the ISAs and this joint committee is chaired on a rotational basis and it's meeting every quarter. So this is the new institutional framework. These new agencies have been recently set up, they started operations from 1st of January this year only and they are relatively small organizations in terms of size just to give you an idea and then you can compare it or relate it to the national supervisors of various countries. The EBA when I started my job there in April was about a team of 30 people and now we have grown to 50 which is in percentage terms it's a huge growth but in terms of manpower it's still a very, very small organization and I will explain how we are going to grow further and how we are going to perform what we are supposed to do. Okay, what are the objectives of setting up the European, I will talk about the European Banking Authority but similar lines are true for the other two. What are the major objectives of setting up this new agency? The first one and I would say this is probably the most important and the most obvious one is to change the old fashion of European Banking Regulation from having European directives and then these directives being transposed into national legislations by the national law makers subject to interpretations, subject to discretions, subject to variations in terms of the approach of transposition that resulted into major differences and major regulatory arbitrage opportunities and major under regulation in the pre-crisis era. So we will be there to ensure that the rules in Europe provide a level playing field and there are single applicable rules throughout the European banking community, throughout the European financial markets for banks. We are talking about regulations to approximately 8,000 financial institutions in Europe altogether. So it is a difficult job to create single rules for all of them irrespective of their size and type of their business model. The second major objective is to harmonize supervision. The other problem in the European financial market which became very evident in the crisis was that not only rules were different, but the enforcement of these rules, the application of these rules were very, very different and they are still very different. Countries in different parts of Europe had a completely different approach of policing or supervising their banks and their financial institutions. You all remember the light touch approach, the principle based approach, heavy onsite approach, different frequency of onsite visits, different ways of looking at banks, different resources, level of resources in various national supervisors that were completely making it impossible to have the same approach in enforcing the regulation. So there will be an objective of the European banking authority to ensure that from now on, the consistency of supervision and enforcement will be higher. There will be a specific objective of the existence of the EBA is to look at larger cross-border banks and to ensure that they are better supervised and their supervision is much stronger than before. We will have a role in risk assessment in continuous monitoring of risk and risk assessment in a bottom-up fashion, so it is very important as opposed to the ESRB's top-down macroprudential approach. We will do bottom-up monitoring of the major European players and try to assess their risks and give signals and warnings and propose action in case we do see something popping up in the various financial institutions and in various financial markets in Europe. The EBA will have a role in early intervention and bank resolution or crisis management in general. As we all know, there is an upcoming proposal of the European Commission in this area. It is not yet published, it's not yet out, so we don't quite yet know what exactly the role EBA is going to play under this new framework, but it is very clear that there needs to be something at the European level to allow authorities to manage institutions in crisis at a European level in case there are institutions operating at the European level. The EBA does also have a relatively modest role in consumer protection, and the reason I'm saying relatively modest is because of resources. We have to be realistic of what we can achieve in consumer protection at the European level with the resources we have. We do have a mandate, and we will look at issues that are in significance European, and we will try to do something good in consumer protection. It was a last minute addition to the legislation on the EBA. Main objectives, I will talk about that. The main objectives will be that we will develop binding technical standards based on the higher level legislation issued by the European Union. So whenever CRD4 is going to be adopted, we will be obliged to write pieces of legislation that are called binding technical standards or implementing technical standards that will be, and this is important, these pieces of legislation will be applicable directly to all countries in Europe. So whatever comes out of the EBA's drafting table endorsed by the Commission will be directly applicable European regulations in the European Union. Of course, if you have questions on how this is going to happen, I will be able to give you the process and the details. Of course, this will involve national supervisors to a great extent. Just to give you a magnitude and idea, we are estimating that we would be issuing about 150 pieces of regulations in the next two and a half years only on banking, which will become enforceable and observable by European financial institutions. Now, just logistically imagine that with the team of our size without the involvement of the expertise and resources of national supervisors, it would be impossible. So therefore, there is a structure in place which will make the involvement of national supervisors very, very strong. We will have to, we have got tools to promote the supervisory culture across the European landscape. We have got a very strong role in monitoring and taking part in colleges, in international banks, colleges. We do European wide risk assessment. One example of that was the stress test, but we will do continuous risk monitoring and assessment of risks on an ongoing basis. The European stress test, I think it's a well-publicized exercise. It was involving Irish banks as well, and it was well-published in Ireland. So I don't want to go into details in this introductory mark. We will have a role of reacting to risk warnings that are coming from the ESRB. So if the ESRB provides some sort of a warning that has got implications on the microprudential supervision of individual institutions, then we will follow up on these warnings, and we will contact national authorities and take the necessary steps to address these warnings. We will have powers to handle emergency situations. I must say that this is untested water. We have not done that. We have not had an emergency situation declared yet, but we have got, I mean, we might have at some point in time. That was a long discussion on what an emergency situation is. The conclusion in the regulation is that such an emergency situation needs to be declared by the European Council. So its heads of states will declare an emergency situation under which we would have increased powers to act, even on individual institutions, which we normally don't have. In consumer protection, we will have a role to monitor developments in the markets, identify trends that can be risky from a consumer perspective, and in extreme situations again, we even have the power to stop the distribution of certain products in the European market. But that's an extreme situation. I must say that we have already had the first question coming from the political side of what the first candidate of a product is that we want to stop being distributed in Europe. And unfortunately, we don't have that yet. So it will take time until we reach that stage in our operations. I've got a few slides. And of course, I will leave this with you later on. But that was the most important, I think that was the most important slide. I think I've explained the single rulebook concept, which is a marked change from the old way of regulating financial sector in Europe. Only for Basel, three implementation we are expecting to issue more than 40 standards. Very, very soon we are trying to gear up for this. The process of creating these standards will be such that under the EBA's umbrella, there will be working groups for each and every technical standards involving the experts from the EBA and involving the experts of national authorities, which in Iran's case, it's the Central Bank of Ireland. And these working groups will be doing the drafting. And then this drafting will go to an approval process within the EBA. As you know, the main governing body of the EBA is the Board of Supervisors, which is a 27-member body comprising the heads of banking supervision in the 27-member countries. So there will be member state control on what is being approved and adopted. And then once it's finalized, it goes to public consultation and impact assessment, which will all be transparent and public. And finally, when the final draft is ready, then the European Commission is supposed to endorse it under its delegated powers. And once it's endorsed, it will become directly applicable to the European market. So it's a very heavy process. And we have to do it for every single regulation, which will be issued under this process. I mentioned the oversight function of the EBA. We have touched upon all these elements. We will go to colleges. We will do continuous risk assessment. We will develop risk dashboards, which will be communicated to the national authorities. And occasionally, we will do stress testing. I do get the question very frequently from the media how often we do the stress test. It is not in our regulation. It is not defined in our regulation. It just says we are supposed to do regular stress testing exercises. And there is no decision on the next one yet. But it is reasonable to expect that we will do one probably every year. Again, it's not written. It's not carved in stone. One area I want to touch upon is the colleges. The experience we had under the predecessor organization under SEPs, which was a member organization of national supervisors, was when SEPs sent visitors or observers to the colleges of international banks, was that the quality and the way of operation of these colleges were quite different. So not only rules were different, but the way international banks were supervised were different. I can also say that what we experienced in the crisis that colleges that are the forum for supervising internationally active banks, they had a very smooth operation when business was put. But when crisis came, their functioning worsened. Their quality of functioning was going down. And the reason was because there was the confidence between national supervisors in sharing information and sharing decisions and sharing risk assessments across groups that were operating across the borders collapsed when the crisis came. So I could say that there is a lot to do with respect to colleges of supervisors to ensure that the way they function, the way they perform their duty of looking at international banks with the involvement of many national supervisors in some cases, should be standardized and protocols should be established and these protocols should be maintained even in the case of a crisis. And there should be a discussion between the supervisors on the risks and the business of the respective financial institutions. We did experience similar differences in the course of the stress test of this year, for example, when we looked at how home country supervisors communicated the stress test results to the host country supervisors in the colleges prior to publication. We did see some very good examples where full information sharing was in place and we did see some, let's say less encouraging examples where information was not that readily shared with the community of supervisors involved in the supervision of one or two particular groups. So where we want to go a lot deeper is to ensure that the way this is happening is more harmonized, is more standardized and the appropriate protocols are developed and they are respected. We of course have to stress that according to the current rules, according to the current legislation, the supervision of individual financial institutions remained with the national authorities. So the EBA is not conducting direct supervision of individual financial institutions at this stage but we have a mandate to ensure that the way these individual institutions are supervised on an international basis is harmonized and it's uniform and we will do that through the colleges. And it's given that there are more than 100 colleges in Europe, you can imagine what sort of task we have only to send one person to every college meeting to every single college. That's already something of a resource-intensive job. I will not go into the details. I think of the continuous risk assessment, there is a little bit of a technical description on the slides of how this is done. With respect to the EU wide stress test of banks, as I mentioned, this was the first time we conducted the stress test exercise under the new EBA logo. The stress test in the prior year in 2010 was a different exercise, it was done under SEPs without SEPs having regulatory powers. We, at the moment, we are in the process of doing the lessons learned exercise within the EBA with the involvement of the supervisors who participated in the exercise. And of course we will propose improvements for next year, although we clearly see that this year's exercise was clearly much improved compared to 2010 and the market perception and reception of the exercise was much more positive. So I think we have made a major step ahead and we will try to make another step next time we do the exercise. In terms of consumer protection, we have a mandate to monitor market developments. So if, for example, let's just make one example which is now very highly publicized, there is this case of PPI insurance misselling related to mortgage loans in a number of countries. We, if something like that happened today at a European level in a multiple of countries, we would be supposed to spot that and give a warning in advance and not go into a situation when such misselling has to be rectified years after it happened. So we would need to look at market trends. Unfortunately, right now we have very little capacity to do so, so we rely on national authorities, but we will need to build up some capacities to do this. We are also cooperating in this respect with the other two agencies. For example, one obvious case for monitoring is the package retail investment products which are sold under structured deposit label, are sold under different funds label and are also sold under different life insurance policies label, but essentially they are the same products, the same risk and they are sold under different labels in different sectors and there are consumer that could be consumer issues in there, so we are doing some cooperation in this respect with the other two agencies. Again, caveat is resources on this. We are also mandated to develop disclosure rules for retail investors. Some countries are more advanced, some other countries are less advanced in this. Some countries have had bad experience in the sale process of various financial products because of under information or misinformation of especially retail clients. Some countries have already progressed very well on rectifying these, so I think with the involvement of the EBA we will be able to build on the experience of various countries and to reach something of a higher level at the European level. Again, we do have the power to constrain the distribution of products under extreme scenarios. Of course for that we will need to earn the reputation of an institution that has got the authority to pinpoint, identify such a product and then make the move and restrict the distribution. And even if we do restrict the distribution of certain products that is subject to regular reviews and we cannot just maintain or abuse this power indefinitely without proper justification. Individual complaints handling remains with national authorities. This is a difficult area. We have started receiving individual complaints. What is interesting is not only from the European Union but also outside of the European Union, even outside of Europe. People write to us in emails complaining about their mistreatment in financial services. And that of course given that we are a very transparent organization and my personal email is on the website it is sometimes a difficult job because as an EU institution of course we have to reply to inquiries that come in and we sometimes find it very difficult to cope with that in terms of the numbers. So again we stress that individual complaints are still to be dealt with primarily with the national authorities. The one area where we do have jurisdiction and mandate to act is when there is a suspicion or there is a case of breaching of EU law in financial sector regulation. That in itself is a difficult call because when a complaint comes in just to make a judgment whether it has got an element of breach of EU law is a legal challenge altogether. So it's not without difficulties even these days. This is roughly what the EBA's mandate is. Again rulemaking, oversight and consumer protection the three pillars of our activities. I would say I would summarize that the role of the EBA in rulemaking is very clear. It's very clearly defined. It's very straightforward. The role in oversight is I would say given that we rely on the individual supervision of institutions by national authorities it's less centralized in a European context and in terms of consumer protection we given the resource intensity of this activity we will be able to do relatively I say relatively little in the coming few years in this area nevertheless we have to take steps there.


Well, I'm back. And so are you. Welcome to chapter 3.3 percentiles and box and whisker plots. It's Monica Wahee Library College Lecturer. And this is what we're going to talk about. And this is what you're going to learn. At the end of this lecture, the student should be able to explain what a percentile means, describe what the interquartile range is and how to calculate it, explain the steps to making a box and whisker plot, and also state how a box and whisker plot helps a person evaluate the distribution of the data. So let's get started.  I mean, not on the animal, but on the box and whisker plot later. So what are we going to go over? We're going to go over percentiles. And we're going to explain what those are. Then we're going to talk about quartiles, sounds a little similar, it's got the tiles in it. Well, you'll understand why they're similar. Then we're going to compute quartiles. And then finally, we're going to do the box and whisker plot. Alright. So let's go. So percentiles, we're going to have a flashback, okay, you're not going to like this little part, because it's going to remind you of standardized tests. So maybe not all of you have been subjected to this, but most of us have, if you gone to high school, in the US, you probably got to deal with the standardized tests. So just remember, we're only talking about quantitative data, right? So if you take a standardized test or a non standardized test, you usually get points. And points are numerical. So that's quantitative data. So I remember I used to take the standardized tests, and I'd be, you know, showing my friends what I got, right, because they'd send you that thing in the mail. Now, I learned pretty early on that it mattered, who all was in the pool of people may taking a test with you, right?  Because what percentile means is, for example, if you test at the 77th percentile, it means you did better than 77% of people taking the test. And a lot of those standardized tests, they didn't care how many points you got. What they cared about is what percentile you were at. So different batches of people would have different scores.  So it didn't really matter what your absolute score was, it just mattered what your percentile was. So just to sort of remind you, if somebody had come up to me in high school and said, Oh, I got 77% percentile, what I'd say is, Okay, if only 100 people had taken the test, you'd have done better than 77 of them. Well, of course, we were all braggie braggie. You know, I was always in like the 95th or the 97th or the 98th. And it happened so often, I wondered if it was really true. But what I realized is, is that there were so many people in the pool, because you know, I was in public high school in Minnesota, well, they were pulling together all the public high schools, Minnesota, ninth grade, you know, I was pulled with them in 10th grade or whatever. And when you're taking like nursing examinations, sometimes they'll do that, they'll put you on a percentile.   You don't even know who's taking it. But really, that's, that's what a percentile is. It's the percentage of people that you did better than if you're at the 77th percentile, then you did better than 77%. Okay, so here's just some rules about percentiles. First of all, you know how I gave the example of the 77th percentile. Well, the rule is you have to have one between one and 99, like you can have the negative second percentile or the 105th percentile. So that's the first rule. Then whatever number you pick, like I was saying, that percent of the values fall below that number, and 100 minus that number of the values fall above that number. So like in my, well, here, we'll give an example. 20 people take a test, just 20, right? Let's say there's a maximum score of five on the test. The 25th percentile means that 25% of the scores will fall below whatever score that is. And 75% will fall above that score. So let's say it's an easy test. And let's say out of my 20 people, 12 get a four, which is almost the total, right? And the remaining eight get a five. So everybody gets either a four or a five.  Just because this was an easy test and every, you know, the first 12 people got a four and then the rest eight got a five. So even the 50th percentile then would technically be at a four, right? Now, this would all come out differently if it were a hard test. And most people got a score below three, right? And so the percentiles would be shifted down. I just tell you that so you can keep in mind the difference between the actual score and the percentile. So the percentile just happens to mean that this percent of people got the score lower than whatever your score is. It doesn't actually say what your score was, right? So that's what you just want to remember as we're going through percentiles. Okay, now we're going to talk about quartiles and also the inter quartile range, remember the tile thing. So this relates to percentiles. So I put a little quarter up there. So quartiles is a specific set of percentiles. And you'll see why I put the little quarter up there. It's because there's technically four quartiles. It's just that the top quartile doesn't count because it's like the 100% one and remember, it can only go up to 99. Like I was just showing you. So we calculate the first second and third quartile. So we have the 25th percentile is the first quartile. The 50th percentile, which is also known as a median, which you're already good at, right? That's known as a second quartile. And then the third quartile is a 75th percentile. So those are your quartiles, 25th, 50th, and 75th, and technically 100th, but we never say that, right, because it only goes up to 99. So you have the first quartile at the 25th percentile, the second quartile at the 50th percentile, and the third quartile at the 75th percentile. And these are actually not that hard to calculate by hand. So here's like how you do it sort of an overview. So first, you order the data from smallest to largest, because remember, we have quantitative data, so you can sort them. So you sort them smallest to largest. And this is feeling very median, right? Well, guess what, that step two is you find the median, because the median is also the second quartile, which is also the 50th percentile. So already, you have no how to do this, right? Because you could already do step one and two. Now, this is the harder part. This is the new part. Step three is where you find the median of the lower half of the data, right? And so wherever you put your median, you pretend that's the end, and you look at the smaller values, and you find the median of those. And that would be the first quartile or the 75th percentile. Then finally, step four, which you probably guessed, is you find where your median was, and you then you look at the upper half of the data between the median and the maximum, and you make a median out of that part of the data. And then that's your 75th percentile. Okay, and I'll show you an example of us doing that. But this is an overview of the steps. Now remember range before what the range was? Yeah, you remember, that's where we had the maximum minus the minimum, right?  And that's the range. Well, we have something new and improved in this lecture here, we have the interquartile range. Okay, so you already know about quartiles, we were just talking about them. But interquartile sort of means like within, right? So once you have the third quartile, and you have the first quartile, you can calculate the interquartile range or RQ or R for short. So if you see IQ are on here, just remember that's interquartile range. So that's the third quartile, minus the first quartile. And again, I'll show you an example. This is just an overview. Okay, here's the example I promised. On the right side of the slide, you will see a sample of data I collected. I went to a hd.com. That's American hospital directory.com. And it provides publicly available information about American hospitals. So I went in and I took a random sample of 11 Massachusetts hospitals. There's a lot more. So I took a random sample. And what I did was I wrote down how many beds each of those hospitals had. Because if a hospital has several 100 beds, they're considered kind of a big hospital. And if they have less than 100 beds, they're considered a smaller hospital. So I wrote all those numbers down. And then I already did step one of making our quartiles, which is to order the data from smallest to largest. So you'll see on the right side of the slide, my smallest hospital had only 41 beds. And my largest hospital had 364 beds and see I put ever all of them in order there on the right. And so we already did step one. So let's go on to step two. So the step two is to find the median. And that's quartile to or the 50th percentile. Now you're already good at that, right? And so we have 11 hospitals. So we know that the sixth one in the row is going to be the median, you know, because it's an odd number of hospitals that I drew. And so the sixth one will circle it. That's the 50th percentile or the median. So we already got quartile to it's it's funny that you have to start with quartile to but that's what you have to do. Now I just recolor coded these so you could kind of remember what's going on as we do the other steps. 126 is the median. That's kind of not on anybody's side, it's not on the lowest side and it's not on the highest side. The orange ones then are considered below the median. And the blue ones are considered above the median. And so I just color coded them so you can keep track of what's going on in the next slides. Okay, now we're going to do the 25th percentile for step three. So the goal is to find the median of the lower half of the data. So now you see why I color coded it is because now we're pretending just the orange ones exist. And we are just finding the median of that. And we're not counting that 126 because that's already been used. And so now we find that 90 is the 25th percentile. How you remember that it's not the 75th. It's not the third one is because it's a low one like 25 is a low number. And 75 is a higher number. So you go to the lower part of the data, you find the median of that and that's going to be your 25th percentile. And so in our case, that's 90.  And so, of course, ours is 254. So that's our 75th percentile. So what we just did is we calculated our quartiles, we have our 50th percentile, our 25th percentile and our 75th percentile. So that's what I meant by that overview slide. This is an example of how you would do that. And of course, I have to give a shout out to the IQ are, which is the interquartile range. Remember, you just learned that. So that's the 75th percentile minus the 25th percentile. So in our case, that's going to be 254 minus 90, which equals 164. So that is your IQ are so if I gave you a test and I asked you what is the IQ are for these data, you can't just put 254 minus 90, you actually have to work it out and put 164. So there you go. So that's our quartile example. So I just wanted to step back and give you some philosophical points on what happens with q one and q three, depending on how many data points you have. Okay, so remember, the first step of this is always to put them in order from smallest to largest. So let's pretend I had only only drawn the first six values of my hospitals. See how I put on the slide, I put the position of the number, which is 123456. And I put above the example numbers. So let's say I was going to do the median on that, you know, what I'd have to do is I'd have to take 90 plus 97 divided by two. But then the next question is what do we do for q one and q three? Well, given that in the example of having six values, the 90 and 97 are mushed together for the median, they don't get they can get reused or they do get reused when looking at the bottom and the top half of the data. So when we went to go to do q one in this, we would actually count that 90 in there. In fact, q one would be 74, because that's the median of the three numbers below the median, right below that line. And then the q three would actually be 121 because we actually count the 97 in there. So in other words, when you have like six values, and the median is made out of mushing together two values, like taking the average of those two values, those two values, they get to double dip, they get to be in the bottom. And the bottom one gets to be in the bottom. And the top one gets to be in the top when calculating q one and q three. Now, well, what if we had seven values instead of six? Okay. So I just expanded and pretended we had seven hospitals. And you'll see that I have seven positions there. Well, this was a little like the one we did together with the 11 values, where the median was clearly this 97 here. In this case, it's 97. So that 97 does not get reused in the bottom and the top. So you'll notice that q one is the middle number of the three bottom ones. And q three is the middle number of the top three ones. And so that's what happens when you have seven values. And it also happens when you have 11 values, like I demonstrated with those hospitals. But it's not super predictable because what if you had eight values, we suddenly see it gets a little complicated. So how will we do this? Well, see the first four are between 41 and 97, top four between 121, 155. Well, to make our median, we'd have to take the mean of 97 and 121. But remember, they don't get used up the 97 then gets to double dip and be a part of the calculation for q one. And 121 gets to double dip and part be part of the calculation for q three. But even even with this double dipping, if you go down, you'll see that there are four then numbers to contend with for q one. So of course, to get q one, you actually have to mush together or take an average of 74 and 90. And if you go up the upper part of the data, in order to get q three, you're going to have to make an average of 126 and 142 or the ones in position six and position seven. So if you're unlucky enough to get like eight values, then you realize you're going to have to make your median by making an average of two numbers, your q one of making an average of two numbers, and your q three like that. So it's not super predictable what's going to happen. You just have to pay a lot of attention. Just remember, if your median is made out of two numbers averaged, those numbers get to double dip in the downstairs and the upstairs of calculating q one and q three. If instead, your median is just one number, like because you have an odd number of values, then that guy has to just stay there and does not double dip in q one and q three calculations. So we can just see another example of this. So this is nine values, right? Now we remember when I had 11 values, it was like having seven values, I had this median, and it was really clear like we have here. But even the medians of the top of the data and the bottom of the data, they were just, you know, it was an odd number. And so it was easy to figure that out. Well, you see here, in this case, our median is the fifth value. And that's 121. So 121 does not double dip anywhere, right? So we go to calculate q one, we only have four values, because we're not counting the 121. And then we're stuck with taking an average of the second and third value to get q one.  And then we have to take an average of those to get q three. So I guess this is just my long way of saying you got to be really careful what you're doing. First, make sure you've gotten the median, then figure out if that median is this kind of a median where it's just your circling in, or it's a median that came out of an average, because if it's a median that came out of an average, just know that those numbers are going to double dip in q one and q three. And if it's a median that was because you had an odd number of data, it was just like in the middle, that one doesn't get to double dip. Okay, enough double dipping, I'm getting hungry. When I go to that roller coaster, I'm going to get a double dip ice cream cone. Okay, we're going to move on to box and whisker plot, which is kind of like your percentiles getting graphed, right? So let's go back to our ingredients, we already created our box plot ingredients. In fact, that's why I trickily went through those quartiles first, because now we've created our ingredients to make a box plot. So I just sort of summarize what we have on the left side of the slide, say that 50 times, hospital beds was what we were counting. The smallest literal hospital had only 41 beds. q one was 90. This is a little easier, I put it in order, cure one was 90 median q two was 126.  And then the maximum was 364. Okay, so let's make a box plot. And then you remember what the data looks like on the right side of the slide. Okay, well, now I'm going to walk you through how you would make this box plot. So first you draw this thing. Well, how do you know what to draw? Well, I usually just draw a line and vertical line, and then put a zero at the bottom. And then I cheat, I go look at the maximum, I go, Oh, I wonder where that is. And see our maximum was like 364. So I just made 400 at the top. Our maximum had been something like, you know, I think Massachusetts General Hospital has something like 600 or 800 beds. If we had gotten that one in there and that was our maximum, I would maybe go up to 900, you know, whatever is a little bit above the maximum, that's what I put at the top. So this was 364. So I put 400. Then what I did was I divided it in half, like I see where the 200 is, I just kind of threw that in there. And then I divided between the 200 and the 400 and a half and put the 300. And so you can just kind of eyeball this and draw it out that way if you want. Okay, so I got this thing set up. And then here we go, we're going to do the first thing. Okay, here's the first thing, we're going to draw in q one or quartile one. So on the left side of the slide, you'll see I circled that that's 90. On the right side of the slide, I made this horizontal line. Now how why do you make that line? Well, look at how it's proportion to that that up and down graph thing I made, you know, with the numbers, you probably don't want it too wide, but you don't want it too skinny. This is just about right, like Goldilocks just right. Okay, so you just make this horizontal line at q one. So that's the first step. Now you make a copy of that same line parallel, and you make it at q three. So if you look at that, if you're I hope you're not lost, if you look at that, you know, 100 200 300 400, you know, q one is 90. So it's about 10, under 100. So that's how I knew where to position that lower one.  So that's where I roughly knew how to position this one. It's not perfect. If you do it in statistical software, they put it out and it's perfect. But for demonstration purposes, that's what I'm doing. Okay, so now what we've done is we put in q one and q three, we put these horizontal lines that are parallel. All right, here's the next step. We connect them. Hence the box. So the box gets made, right, that you just connect them. All right, now I put a little circle on the right side of the slide because I wanted you to make sure you saw what's going on there. Okay, that's when we put in q two or the median, right? So the median is 126. See where 100 is it's up a little bit. And we make that parallel. But you see how I made q one q three connected the box and then did the median. I think this is the easiest order to do it and when you're drawing it by hand and you're not the statistical software.  But we're not done yet. We got the whiskers. So you're probably wondering this whole time, what is this whisker thing? Well, you just figured out what the box is. The whiskers are the markers for the minimum and the maximum. So you'll see the minimums at 41. And then we have a whisker at 41. So why is it called a whisker? Well, it's smaller. I don't know why it's called a whisker, but it's different from the other ones, because it's smaller. I guess that's a reason maybe. But notice how it's like half the almost half the size. Sometimes they're really, really small. But it's tiny. And you want to position it like vertically in the middle, like you don't want it off to the side or anything. But and you also want these parallel, you'll notice the maximums up there way high at 364. So I just did both of these on the same slide. So you draw on the whiskers, and then you probably can guess the last step, you connect the whiskers to the box. So good job, there you went and did it. You made a box plot. And then now let's look at the interquartile range. Remember how you calculated this you took q3 minus q1? Well, that means this boxy thing is 164 beds long, right? So that's where your IQ are. This is a visual pictorial of your IQ are so very good. We did our box plot. We did our interquartile range. And you are probably wondering, why did we just do this? I'll explain. So why do we do this? Well, one of the main things that we do is we look at the distribution in the data. I know, I know, you guys learned how to do a histogram already, and you're good at a stem and leaf. Those are other ways of looking at the distribution. And if you make a histogram of these data, you'll find that well, I mean, these are only 11. But you know, if you get a pile of data, and you make a histogram and a stem and leaf, you'll find that those images agree with the box plot. And you're probably thinking, well, how do you how do they agree? Well, if you look on the right side of the slide, I'm just giving you an example. So skewed right, if you had skewed right data, and you knew it because you made a histogram, and you saw a skewed right distribution, if you took the same data, and you made a box plot, it would be kind of like that skewed right one that we just did, where the top whisker would be really high in that thing connecting the whisker to the box. That would be like really long, whereas the one on the bottom short. As you can see the skewed left is the opposite, right? The bottom one is long, and the top one short. If you have a normal distribution, remember that that's symmetrical, that's that mound shape distribution. And you have a larger spread. In other words, you have a bigger standard deviation, you have a bigger variance, right? Then you're going to see a box that's really big like that. But if you have a smaller spread, and it's a normal distribution, you're going to see a box that looks like this. And you're probably wondering, where are you getting these shapes? Well, I'll show you a kind of on the last slide here as we wrap up the conclusion. It's because if you fly over a roller coaster, like see this roller coaster. This roller coaster is skewed right. That would make sense, right, because you want to go up steeply, and then go down really fast. And see how the box plot for the roller coaster looks. You've got sort of the part where you start going up really fast. That's kind of near the median and kind of near the 25th percentile. And the part where you start where you're just getting on and it's slowly going there, that's like the bottom whisker.  And it's a long tail, which is good, I guess, if you design roller coasters. And then that long tail then is that right skew. So that's why I mean, if in your mind, you're going, how is she getting this this histogram and this box plot? This is kind of how I'm doing it is I'm saying, Well, if you flew over the histogram, or the roller coaster, you might see like a shape of a box plot. So in conclusion, we talked about percentiles in general, like the 77th percentile, what that all means. And then we focus in on quartiles, which are a specific set of percentiles. And then we're going to go, or we already did calculate the quartiles. And the reason why we did that is because we first needed to do that in order to make the interquartile range. And then finally, we need those quartiles in order to make and interpret a box and whisker plot. Okay, this isn't the roller coaster I'm going to, but I'm going to one and I guarantee you it is skewed right.


and you just started heading south fast as you could are you got any sunshine down there oh it's wonderful how are you oh i'm harassed to death and i don't know whether i want to survive or not but i may go to the weekend anyway well as he thinks it's just wonderful he gets to sleep with the other ladies well thank you dear i uh wanted to um i just heard that uh the uh you were going to probably go to uh memorials at the president magna carter running me then i wanted to uh suggest that if you cared to that you and your party take one of the seven of sevens and i thought i might ask bobby and teddy if they wanted to go to represent me along with the secretary of state justice who already going to be over there and you might want to take any other members of the family or anybody in the party you wanted to and if you should uh if you would care to do that the plane would be at your disposal in your direction anytime you wanted to i told teddy and i couldn't get you and bobby is not available but i'll tell him when he comes back in other words i the government would be represented by uh bobby and teddy and chief justice and a rust they're going to be over there anyway he wants to go with you would be whoever you want to take in your own party and if you'd like to do that you just let me know and i'll have it all set up for you and it'll be at your disposal whenever you want it for whatever time you want it so nice but that's a wasting tax no no it's not at all it's very important to us and very important to the country and you uh you just let me know how you feel if you have a chance to think about you know saying the thing this the nicest thing i ever heard of just quit being so illusive and uh i've been too long since this oh yeah there's that horrible night you know water jinkins and i was trying to think of all the terrible things there i was sitting there with one of the sweet beautiful creatures of my life and uh all the time my mind was down here about who was going to tell you that night but uh maybe our paths will cross before long and whenever or wherever i can do anything you know i'm as close as the phone dear i know thank you mr president listen that's the nicest thing i ever heard of well you just you just let us know anything dear thank you give my love to you i will good bye


Welcome back to ACS Part 4. In this video, we'll discuss the treatment for STEMI and non-STEMI. Keep in mind that there will be lots of new medications that are constantly on the rise in this field. And therefore, this video will mostly talk about the principles rather than specific medications. Here are the five overarching principles. Patients in STEMI should be given oxygen, an anti-platelet agent, an antithrombin agent, their vessel needs to be opened up quickly, and then there are other treatment for symptoms only. Let's go into each of these. Supplemental oxygen should be given to patients to achieve a saturation above 92%. Next, anti-platelet agent. Anti-platelet includes aspirin, clopidogrel, or new drug called tecagrelor. Depending on the patient, some cardiologists will also put the patient on a glycoprotein 2B3A inhibitor. Next, antithrombotic agents. They include unfractionated heparin. Other choices include low molecular weight heparin. They can also include fonda parenox. Again, it can be very institution-specific so check with your staff. The main treatment for ST elevation MI is to open the vessel. This is done by percutaneous coronary intervention, or PCI. In PCI, a small guide wire is inserted into the site of the blocked coronary artery. A balloon is inflated. A stent is kept in place in the same spot to allow for regular flow through the coronary artery. This is an image taken during the angiogram. As the dye is running through the coronary artery, you can see that there is a section that has a much narrower lumen. Now here, the guide wire is inserted and the balloon is inflated across the blocked section. You can see on the left is the before shot during the angiogram, the narrow lumen. And on the right, that lumen has opened up. If the patient has multiple blocked arteries and if these lesions are not amenable to PCI, they would be candidates for coronary artery bypass graft surgery. There are also other symptom treatment we give for patients who is having a ST elevation MI. They include morphine and nitrates. Both are used for symptom relief only. For a non-stemmy, we have a way to risk stratify the patient. One of the scores is called the timmy risk score. These are used in patients with a non-diagnostic ACG or a normal initial set of cardiac enzymes. This score looks at multiple risk factors to increase the risk of death, MI, or ischemia needing revascularization in the next 14 days. Each of these will give the patient a point. First one is age 65 or older. Second one include more than three known coronary artery disease risk factors such as smoking, diabetes, hypercholesteroemia, hypertension, and family history of coronary artery disease. Next point is known coronary artery disease. Whether they have used aspirin in the past week, severe angina meaning more than two episodes in the past 24 hours. ST segment changes that's more than half a millimeter and positive cardiac markers. The higher the score, the more aggressive the treatment should be. The treatment for a non-stemmy is very similar to the principles we have for stemmy. They include oxygen, anti-platelet such as aspirin, clopidogrel, tachycagrelor, and glycoprotein 2B3A inhibitor in the right patient. Antithrombotic agents such as heparin, lomelagoid-weight heparin, and other agents. Certain patients with N-stemmy will undergo either PCI or eventually coronary artery bypass grafting. In terms of symptom treatment, it's the same. Nitrates and morphine. In summary, discuss the treatment for N-stemmy and stemmy patients. This is a field of constant research. There are new medication being put into use on a regular basis. Therefore, what you choose at the end will largely base on your institution and what's in the literature at the time. Thank you for watching.


Hi everyone Joe for Jasper's casewrakes.com coming at you with a big random number block randomizer a lot of teams right here And this sells out in grain hockey, which is coming up in a separate video right after this Works just like our number blocks. If you're not familiar with these. There's the details right there. Check it out We do those we do those pretty frequently. I think everyone on here knows how that works though Number zero gets any and all redemptions for that group of teams as well. So let's roll it. Let's randomize it four and a three seven times One two three four five six and seven then final time After seven times David Duffy down to Jack B seven times for the numbers and Seven after seven. We've got seven down to zero All right, David, you've got number seven That's your group Mike with two Jack with eight Mark with nine Ryan with four Kathy with five Jeremy with one Kathy with six Ryan with three and Jack B you get zero so any and all redemptions for all those teams down there that big group of teams Including one-of-one redemptions, but Jeremy Anderson you'll get any live one-of-ones for that group of teams down there All right, so let's sort by column B right here And coming up in a separate video will be the ingrained break itself brand-new release check it out jaskiescasebreaks.com