XCP-ng Networking Explained: From Interface Setup to VLANs and SDN

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
configuring interfaces defining vlans and configuring the pool versus the host and setting static IPS can be a bit confusing when you first start with X cpng or really any hypervisor today we're going to clarify how to configure these how to set up the networking and how to get all of this organized with more than one host or even a single Host this will work either way in this particular demo I am doing it with Two Hosts to show you how it scales but it's really not that difficult once you know where to look for which settings so let's dive into it [Music] are you an individual or forward-thinking company looking for expert assistance with network engineering storage or virtualization projects perhaps you're an internal it team seeking help to proactively manage monitor or secure your systems we offer comprehensive Consulting Services tailored to meet your specific project needs whether you require fully managed or co-managed IT services our experien team team is ready to step in and help we specialize in supporting businesses that need it Administration or it team seeking an extra layer of support to enhance their operations to learn more about any of our services head over to our website and fill out the hire us form at Lauren systems.com let us start crafting the perfect it solution for you if you want to show some extra love for our Channel check out our swag store and affiliate links down below that will lead you to discounts and deals for products and services we discuss on this Channel with the ad read out of the way let's get you back to the content that you really came here for I want to start with defining how this lab is configured we have our YouTube demo pool and then we have server one and server two so each one of these hosts has eth zero plugged in it is both the management interface but it's also the interface that we're going to be using to Define different networks on networks are defined via the pool so the YouTube demo pool and the pool networking is where we start to configure the interface but this does require that all hosts have matching configurations in terms of what eth zero was defined as so we have Port 24 and Port 22 on our switch and you can see the settings over there that the native VLAN is going to be 1721 16160 then we have VLAN 10 and VLAN 1337 both ports 22 and 24 are configured the same on the switch this allows when we Define things to use the pool Network to expect that each one of these servers is plugged into a matching configured switch Port one thing I will note if you have servers that are not the same so the interfaces are not in the order you would like them to be in for the way you want to use it you can rename the interfaces prior to joining them to a resource pool so if you have a host that is not having the right name because maybe you have a 10 gig interface you'd rather have as e zero and it didn't set up that way when you first loaded it you can rename the interfaces prior to bringing them into the resource pool this will allow you to create essentially a homogenized Network across all the different hosts that you have on on there now if you're adding more network interfaces this process repeats so for eth one as you would Define it on each one of the servers you'll also want to make sure whatever ports they plugged into across switches are also defined and matched the same way now I do have this Debian 12 lab which is going to be our demo for when we set up the different networks how we switch them back and forth it's already assigned and running where it says pool wide Network associated with eth zero this is the default naming schema that comes up so we're going to over here to home and we're going to go to pools and we're going to go to our YouTube demo pool and we're going to go to networking and we have this pool wide Network associate with EO for Simplicity we're just going to call this one e zero so we go ahead and hit delete and rename it to e zero this one we're going to leave it as eth one but this is one we're not using so I like to put a not in use right next to it it just makes it clear so let's go back over to our VM that that is a not inuse Network so if we go to network you can see this one now just says e zero and we can go to the not and use one but obviously like the name suggest it's not one I should be using name it however works for you I just like not and use to keep it simple and yes you can rename these while they're attached to all of the different virtual machines it will dynamically rename them go back over here to our home pools and keep defining the networks so we have the not in use and if we want to give it a more description you you can do that as well you can simply add different descriptions to make these easier to figure out which networks are which and we can put not in use on this as well now let's define a network so we go here to the add a network we're adding it to this demo pool if you have more than one pool they would all show up in a list here they do have a link to the documentation if you're setting these up as bonded we're not for this particular example but if you were you would select the different interfaces that are involved in bonding this to the network we're going to turn turn it off for now we want to select this e zero the eth one is not plugged in it shows red because well there's nothing plugged into it right now on any of the hosts but EO does what we want to call this let's start with that first VLAN 1337 and we can call it that and maybe this is our 1337 hacking VLAN however you want to Define it it's completely up to you we're not going to mess with the MTU but we wanted to do this give it a VLAN definition we're not going to worry about the network block device that's out of scope of this particular video but this is where if you have an MBD connection you'd select that and you hit create network now that we've defined the network let's go over to our hosts and go to server one we see the network defined we go over here to the host and go over server two the Network's defined because we defined in a pool it automatically propagates to all the hosts within this pool which also means any of the VMS on any of those hosts when we go to networking we'll have that as an option so we can see our vlam 1337 we can switch to it once again there's no need to restart the hosts or the VMS when you're adding networks so we've now changed it and we have an IP address in that 1921 16813 range now let's go back over to the pool and go to a network and add one more select EO again and this is our NSF W Network put the same description this had a VLAN tag of 10 so ahead and create network go back over to the VM choose the network and there's our NSFW now one thing to note now when we do this it's going to get an IP address in the 192168 range which is the dhp server that is providing the NSFW and I want to go back over to the pool the YouTube demo pool Network and point out that if I were to try to delete this network are you sure you want to delete this and we hit okay it will actually give me an error because it lets me know that it's in you use by that particular VM so this is something that does stop you if you want to delete a network you have to remove this network from one of the virtual machines in order to do it so if we switch it over to this now we don't have this network attached to this VM we can go back over to the pool Network and then we can go ahead and delete it and this is how we can remove a network and it'll remove it from everywhere at the same time now the networks you create under the pool don't just work for the virtual machines they can also be applied to the XC PNG host themselves let's go over here to home hosts and we're going to choose this particular server we'll go to networking and we see we have Eero there's our VLAN 1337 and we have EO with management and there is the IP address assigned it is actually assigned via DHCP but we could switch that to static by choosing this and then assigning a static IP we're going to cancel that and we're going to change this one over to static and then we can assign an IP address in here and this is 1 1921 168.3 13 Dot and we'll just say 13 then we'll set a net mask and we'll leave the DNS and Gateway blank because we don't want this to have a Gateway an example of use case might be a storage Network where you'll assign it either an interface or on a VLAN that you have dedicated to storage and now I've assigned a static IP address so this is the management interface and where the management is but now this IP address within this host is actually usable to address things on the network it's attached to and if you want to remove it just simply change it back over here to none and it goes away now while you can change the management interface IP address within Zen Orchestra if you want to change which interface the management is attached to you want to do that from the EXO console either by sshing in or directly from the machine's interface so we're going to go here we're going to configure management interface have you log in put the password in and then you can select a different interface or even renew the lease on here this is also good if you ever lock yourself out and all of the interfaces such as Eero .10 and 1337 the different interfaces we created are all going to be recognized in here and you can attach the management interface to any of these once you select the interface press enter and you can choose to set it through dhtp mainly assign host name of DHCP or static and it'll go through the steps to configure any of these options now that we've covered the basics let's dive into the software defined networking controller this allows you to create cross host or crosspool adapters to attach to your virtual machines that will allow them to communicate over an in R to Tunnel this is what they refer to as their Global private networks this is actually a project that started all the way back in 2019 and in 2024 has become really easy to implement couple prerequisites here they have a few dedicated Dev blogs if you want to dive into all the technology behind it they're actually really interesting reading but these things are really important as a prerequisite and that's that vxlan and GRE the protocols they chose to implement here are using extra encapsulation and they require extra bits on a network packet if you you create a global private network with a default MTU at 1500 you won't be able to use it as is in your virtual machines unless you configure a smaller MTU for each virtual interface in your vm's operating system for Simplicity of the demo I'm just going to take the OS the two de and servers I created for this demo and set them to a MTU of 14400 alternatively you can update your network equipment to accept larger than 1500 MTU and then you could pass it along that way so there's two different ways of doing it to me it's just simpler to do it inside the virtual machine but ultimately comes down to how you want to configure and set this up next before we go down to network creation there are some prerequisites here though that do remind you once again that if you choose e zero for example for each of these they all need to be able to talk to each other because that is the interface by which they will create the encrypted tunnel and communicate it but it's also really important that you can't just install this and expect it to work unless you go to each host that you plan to load this on so you want to do a yum install open V switch and enable this in the host that you want to add so all the host that you have in your resource pool you will just go into them one by one and enable it doesn't this does not require any rebooting or restarting so this won't disrupt existing VMS that you have on there this will just enable and start the features to have the encrypted tunnels working now I am using the self-compiled version of Zen Orchestra we're going to go settings and we're going to go plugins and if you didn't change anything when you did the self-compiled version and you followed all the instructions it would have installed all the plugins including the sdn controller so I'll go ahead and expand this out you don't have to specify a certificate directory unless you want to create your own certificates if you don't Supply a directory where these are it will autocreate them now that we know that this is enabled it's set to autoload at server start and there's nothing else we have to do here we're going to go ahead and create a new network by going over to the pools so go to pool we're going to choose the YouTube demo pool or go to network and we want to add one more Network we're going to choose a private Network and then we're going to put in the name here vxlan demo VX Lam demo we're going to leave the MTU here at 1500 because I'm going to be changing this inside of my virtual machines I'm going to go ahead and choose VXL but you can choose GRE if you'd prefer that one but either one works fine we choose encrypted because why not have all the communication encrypted between them and then we choose which server is the preferred Center and you don't have to choose this if not it'll figure it out itself now if we wanted to add another Pool I do have another Pool I attach for this demonstration so if I chose this XC PNG ryzen pool and we have e z on that one for that particular host it is important that this host can also talk to eth zero on the other host because that's how they plan to communicate between these different cpng G hosts in order to get this to work cross pool I'm not going to actually create a cross pool but that's the option if you wanted to do that and from there we simply hit create Network now that we've created the network we can choose it just like any other network and I've set it to this vxlan demo one now the IP address on here was set statically and I want to show this setting in the operating system so we're going to go here to the console and this is just the source network interfaces you see the enx Z interface and then we have the enx1 interface and I've set it to be static so this is dhtp just like it was but this is static so as I change this even if I put it to a different network like if we put it down to e zero it's going to keep its IP address because it's statically set in the operating system but when we set it to vxlan and this is our Debian 12 on server 2 it's got an IP address of 1921 16824 and we go to our Debian on server one we go to network and we have a 1921 16825 we can go over here to the console of this one and we're able to Ping the other IP address across the tunnel so the sdn just shows up as an adapter there's nothing else I had to do inside of this Debian system it just shows up as another network interface but this is a network interface that is attached via the sdn cross pool and cross host so as we attach these we don't have to worry about networking between these individual devices as far as the OS is concerned allowing this communication maybe you want to use this for a management Network or for some specialized communication that you have between each of your servers I will leave a link down below to the documentation they have quite a bit of it over at xcp on how all this works in case there's any details you want to look at a little bit closer including some of the details around the software defining networking I think that's a really cool feature I also like that you do not have to restart any of the virtual machines or the hosts when you're changing or modifying these networks I will note that this Debian VM that I had for the demo did have the management tools installed that is a prerequisite whether you're running Windows or a Linux VM that it does have the those tools installed to make Network swapping really easy and of course that's why it updates the IP address inside of Zen because the tools are what enable that to work nonetheless love hearing for you leave your thoughts and comments down below I do encourage you to join the forums not just mine but the xcp and forums the team over at Vates is very active there and it's a great place to engage with them on all the xcp and related topics and of course watch the development in real time seeing as it's open source and see how they engage with the community it's where you'll find me as well also you a playlist linked down below to all the different videos I've created around xcp Zen Orchestra and the entire Zen ecosystem like And subscribe to see more content from this channel subscribe to my newsletter over at lawen systems.com or connect me with whatever socials you'll find there all right and [Music] thanks [Music]
Info
Channel: Lawrence Systems
Views: 14,969
Rating: undefined out of 5
Keywords: LawrenceSystems, XCP-ng Networking, xen server, xen orchestra, xcp-ng xen orchestra, xcp-ng vlans, open source, xenserver tutorial, xenserver network configuration, xenserver 8.2, xenserver installation, xenserver vs xcp-ng, xenserver 8 installation, xen orchestra tutorial, XCP-ng vlan, xcp-ng sdn, xcp-ng vswitch, xcp-ng vdi, xcp-ng network, xenserver installation and configuration
Id: H5PJ_tHQlZk
Channel Id: undefined
Length: 16min 6sec (966 seconds)
Published: Tue Feb 13 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.