Proxmox VLAN Configuration: Linux Bridge Tagging, Management IP, and Virtual Machines

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
are you new to proxmox networking are you new to proxmox VLAN configuration configuring that management IP to be on a specific VLAN how do you set up the bridging in proxmox what about setting up VLS for your virtual machines and their configuration well this is going to be a fun episode we're going to look at all things proxmox networking and see how we can easily configure proxmox vlans management IP on specific vlans as well as virtual machine VLAN connectivity so let's get started and Dive Right In proxmox uses something called a Linux bridge now the Linux bridge is just a logical construct in proxmox that allows you to connect the physical network adapters into proxmox as well as allowing proxmox itself to be able to understand things like vlans we're going to look at this default bridge and I want to show you guys my proxmox host and out of the box configuration that you will see when you install proxmox so I'm logged into the proxmox host we've got our summary screen showing for the data center I'm going to click the proxmox host itself and there is a network menu option underneath the system menu so if we click Network we can see this default Linux bridge and as you can see by default it's going to show the physical network adapters that you have installed on your proxmox host as well as this Linux bridge and you will see the IP address as well that came configured out of the default installation so if you've allowed DHCP to configure this IP or you assigned a static IP address you're going to see that here if we double click on the Linux Bridge we can see the default name we see that IP address and Gateway displayed here and the bridge ports represent the physical adapter or adapters that back this particular Linux bridge now the Linux Bridge that's installed by default with proxmox is not VLAN aware but don't worry this is just a quick configuration in the default bridge that is installed by default in fact it's just a tick box let's look at that I've got just a simple installation I've got a single network adapter then we've also got the default Linux bridge and this is always labeled this way the vmbr0 now what I want to show you guys if we go to edit we bring up the settings for the default bridge now something that stands out when we're talking about vlans is this VLAN aware option it is unchecked and that's a way that it will default when you come out of a fresh installation of proxmox what we need to do is this simple checkbox and we're telling proxmox we want to make the default Linux Bridge VLAN aware and then simply hit okay you will notice in the output that it will perform the configuration this file that you see in the output is the Etsy network interfaces file before we check that box this configuration did not exist so if we would have opened that file beforehand we wouldn't see the VLAN configuration so after we check the box we will see this configuration Bridge VLAN aware is now yes the bridge vids or VLAN IDs are set to 2 to 4,094 and that's roughly the full range of VLS that can be configured so when we check that VLAN aware check box it will essentially turn this bridge into a trunking bridge meaning this bridge will pass traffic for essentially every VLAN 2 to 494 and we can adjust that as well as we're going to mention uh in just a moment what we need to do now is we need to apply configuration do you want to apply pending Network changing is yes and we will see those changes applied and we can go back in to the edit and we will see VLAN aware is indeed checked so now we understand that once we make that bridge VLAN aware the configuration in that network interfaces file it may be a familiar concept that that bridge is enabled basically like a trunk Port we can specify specific VLS on that Linux Bridge so that that it filters all of the other VLS and that is arguably a more secure configuration so let's see the configuration that we would change to specify specific VLS on the Linux Bridge okay so I'm logged into an SSH session on the proxmox host so what I'm going to do is edit the file that we mentioned earlier so I'm going to edit the Etsy network interfaces file we see the same output that we saw in the guy of roox in the web UI um we can scroll down and you notice the VLAN IDs is set to 2 to 4,094 now let's say we wanted to specify specific vlans well we would do that this way we could go in here and we can say VLAN 10 VLAN 149 VLAN 333 and all we would need to do is save and exit out of that file so now we've essentially restricted those vlans to those specific VLAN IDs for traffic that's passed through the Linux bridge and easy way to instantiate that is just simply reboot the host now let's say that the IP address that you have configured when you install proxmox is just untagged traffic now let's say you don't want your IP address to reside on that untag VLAN so how do we do that how do we peel off that management IP from the default configuration and actually specify specific VLAN that we want to move that management IP to let's look at that next moving that management IP to a specific VLAN okay so now I'm pivoting over to a physical proxmox post so makes it a little bit easier we don't have the abstraction of a virtual machine and some of that nested networking that we need to explain so this is simply a physical proxmox host that's plugged directly into the switch in the home lab here and as you can see this IP address is 10333 .4 now that is an untagged IP address so that's the primary VLAN on this switch so the proxmox host out of the install just simply picked up this 10333 14 IP address so what if I want that IP address as we mentioned earlier the management IP to be on a different VLAN well let's look and see how we can do that so I'm also sshed into this host the 10333 14 host and let's look at that file that we mentioned earlier ETS c network interfaces and we're going to see what looks to be very similar to the other file that we looked at earlier except the IP address is different so here is our IP address our Gateway we can see that we have enabled VLAN aware configuration on that default Bridge as we have the bridge vids 2 through 4,094 now let me show you guys the configuration that we need to enable if we want to swap the VLAN configuration for the management IP and I've got this ready I'm just going to paste it in for sake of time and you guys will see what this configuration needs to look like so now what I have done is we have essentially taken this stanza of configuration along with the address as well as the Gateway and we're creating a sub interface on off of this bridge VLAN so as we can see we are prepending that with VM vmbr0 do 149 now the 149 is the VLAN ID so Auto we're going to enable this to come up automatically which we want it's off of the bridge interface it's VLAN 149 and as we can see that certainly Falls within the two through 494 vlans and then also we've got the IP address that we want to configure figure 14914 and then we have our Gateway so as we can see this is very simple um we are peeling that off once again from the default Bridge ID that is sitting on the untagged VLAN traffic and then we are creating this sub interface that tells it that we want this sub interface and we want this particular IP address for management so what I'm going to do I'm going to exit out and save the changes and we're going to reboot the host and then we're going to see if it correctly assumes that IP address so what I did was launch a continuous ping to 10.1.1 14914 and as we can see it went from destination host unreachable to it is actually peeing now and there we go we've got access to 101149 14 the same physical host that we changed the IP address on so now if we click on the host we go to network we're going to see that we've got that sub Bridge interface so it is a child interface if you will off of the parent Linux bridge and the type that it creates is a Linux VLAN so Linux VLAN and here we see our new IP address that we assign through the network interfaces file we can doubleclick into it as well and we can see this in the guey as well so you can see the IP address the Gateway and we've got the VLAN tag it's and it's gray out since it Knows by the name that this is VLAN 149 now I want to make mention of a couple of things that you want to do that are remnants of the old IP address once you move that IP address to a specific VLAN and reconfigure for this new IP address let's see how to do that now that I am remoted into the new host IP address 10.1.1 14914 I'm going to edit the host file and you can see in the host file that by default when you install the proxmox host it's going to put that original IP address into your host file so I'm going to back out the old IP address and add in the new IP address of the proxmox post now I'm just simply going to save and close that the other area that you want to take a look at is DNS so if you do have a DNS Zone that you have configured your proxmox host to resolve to a specific IP make sure you update that DNS Zone as well as any reverse DNS zones that you have in place just to make everything flow through with the management IP address change so now that we have our proxmox host configured for vlans we've taken advantage of that with the management IP how do we enable vlans for our virtual machines well actually that is very simple it's actually just a field in the VLAN configuration for that particular virtual machine now for configuring vlans for virtual machines running on our proxmox host where we now have vlans enabled so let's expand our host and first off I want to show you guys an existing virtual machine let's say you already had virtual machines running and you want to uh retro add that configuration to an existing virtual machine well just simply click on the virtual machine and then we're going to go to Hardware because we're going to edit the configuration for the network adapter double click on network device and you can see that of course we've got our VM Bridge configured and remember that we have that configuration that essentially sets that bridge as a trunk Port so here we simply just enter the VLAN tag information and click okay simple as that and you can see the tag information is now added to our configuration that displaying in the web UI now it's very similar if we go to create a virtual machine I'm just going to uh name this test vm1 going to click through the wizard select our ISO next let's get over to network and we have basically the same configuration screen that we had when we retro added that configuration we've got the default Bridge selected and here we can assign whichever vlink tag that we want that we have configured of course on the bridge and our physical switch Port that it uplinks the proxmox host and simply click next and finish and as we can see here we can look at the network device see that VLAN tag as it is in the configuration for our network adapter well there you go guys proxmox VLAN configuration you guys can see that it's not too different diffult to establish some basic VLAN connectivity on a proxmox ve host well I am Brandon Lee please do like this video subscribe to the channel check out the vht forums that I have spun up on virtualization how 2 where you can get answers to questions about proxmox esxi home labs and many other subjects and I will see you guys on the next video oh
Info
Channel: VirtualizationHowto
Views: 5,512
Rating: undefined out of 5
Keywords:
Id: stQzK0p59Fc
Channel Id: undefined
Length: 14min 36sec (876 seconds)
Published: Fri Dec 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.