- VLAN aware bridges
- VLAN configured within pfSense
Requirements
This first section can be skipped if you already use them in production environments.VLAN Aware bridge
To configure a VLAN aware bridge, you will need to login to your Proxmox VE interface and select the ‘PVE’ node. From here select ‘Settings’ then ‘Network’. :::info You now need to find your ‘internal’ Bridge adaptor, if you’ve followed our previous tutorials this will be vmbr1. :::- Select your internal network adaptor
- Enable the ‘VLAN aware’ tickbox
- Select ‘OK’
- Select ‘Apply Configuration’
Creating a VLAN in pfSense
Now we have created our VLAN aware bridge it’s important that we now create our VLAN within our virtual appliance. Login to your router appliance, from here select ‘Interfaces’.- Select ‘VLANS’
- Select ‘Add’
- Complete the fields as required
- Parent Interface - ‘vmbr1 - lan’
- VLAN Tag - ‘100’
- You do not need to define a priority as we only have one VLAN created.
- Description - ‘PXE’
- Select ‘Interfaces’
- Available Network Ports - (Select your created VLAN)
- Select the newly created ‘OPTX’ interface
- Select ‘Enable’
- IPv4 Configuration - Static
- Static IPv4 Configuration - ‘192.168.100.1’ /24
- Save changes
Firewall Routes
We now need to make a firewall rule to allow the traffic, you can spend the time to refine what traffic you wish to allow from VLAN 100 however for simplicity sake we will allow all traffic using the following steps.- Select ‘Firewall’
- Select ‘Rules’
- Select ‘OPTX’
- Select ‘Add’
- Complete the fields as required
- Action - Pass
- Interface - OPTX
- Address Family - IPv4
- Protocol - ‘Any’
- Source - ‘Any’
- Destination - ‘Any’
- Description - ‘Allow PXE’
- Save the rule
Creating MAAS VM
Our deployment has the following specification:- 2 vCores
- 2GB RAM
- 32GB Storage
- Subnet - 192.168.100.0/24
- Gateway - 192.168.100.1
- IP Address - 192.168.100.2
- Name Servers - 1.1.1.1, 1.0.0.1
- Search Domain - (lab.local) :::
Installing MAAS
Now we’re logged in and have a VM ready for installation we can install the MAAS snap package and test databases to quick start our deployment. If you decide to run this in high availability environments you can have multiple region and rack controllers installed separately compared to the combo install we’re performing in this guide. It’s recommended that you ensure all packages are updated before you install anything via snapd. You can check and install updates using the following command.Configuring MAAS
You will need to fill in all the fields except for importing ssh keys (this can be uploaded from within the panel manually). You can now open a browser and navigate to the MAAS service url and login with the account you just created. Within the UI you have few settings that need to be configured Complete the below fields as required- Region Name - (define own value)
- DNS Forwarder - 1.1.1.1, 1.0.0.1
- Leave Ubuntu archive and extra as default
- Proxy Server - (only configure if you have on-prem proxy)
Configuring MAAS DHCP
In order to get our VMs in VLAN 100 network booting we need to configure a few more settings. These settings are all configured within the ‘Subnets’ tab- Select ‘VLAN’
- Select ‘Edit’
- Complete the fields as required
- VID - 100
- NAME - PXE
- MTU - 1500
- Fabric - fabric-0
- Select ‘Save Summary’
- Ensure ‘MAAS provides DHCP’ is ticked
- Ensure maas.maas is your active rack controller (you can rename this later)
- Configure a DHCP range
.100 - .200should be sufficient - Ensure the Gateway IP is
192.168.100.1
- Select the blue ‘Create VM’ button
- Complete the fields as required
- Node - PVE
- VM ID - (auto)
- NAME - (insert VM name)
- Select ‘Next’
- Complete the fields as required
- Select ‘Do not use any media’
- System tab you can leave as default
- Select ‘Next’
- Create a disk bigger than 8GB
- Complete the fields as required
- Sockets - ‘1’
- Cores - ‘(user defined value)’
- Type - ‘Host’
- Select ‘Next’
- Memory use no less than 2GB
- Select ‘Next’
- Complete the fields as required
- Bridge - vmbr1
- Firewall - Disabled
- VLAN Tag - 100
- Model - auto
- Select ‘Next’
- Select ‘Start after created’
- Select ‘Finish’
smartctl-validate script as this will fail.
Before you can press ‘Start commissioning for machine’ go to the ‘Configuration’ type and set the Power configuration to Manual.
Once you’ve pressed ‘Start commissioning’ power the VM back online and it should resume it’s enrolment process.
:::info
This may feel like it’s more effort than just manually configuring a virtual machine however performing things via MAAS means you don’t need to go through the process of creating multiple VMs you can instead recycle previous ones you no longer use (similar to a VPS control panel for a cloud service provider).
:::
Once this device is enrolled, it will shut down again. This is the final step before we can deploy the server for production.
Select the green button once again but this time select ‘Deploy’, ensure you’re happy with the selected defaults and press start deployment.
You will need to power up the VM one more time and await for the VM to finish deploying.
You can now SSH into your new VM using the IP found within the MAAS UI dashboard, an example command can be found below.