bios is a virtual router which installs on most hypervisors um vmware kvm and also the open source xcpng which is the zen server clone the purpose of the bios router is to let you route traffic between different vlans that you may have for your virtual machines i'm going to walk through the steps of installing the virtual router okay so if we go over to vios. io [Music] they give you a lot of information about files what it is and how it works they have options where you can purchase the lts version and you purchase a subscription and that will give you access to technical support and also access to upgrades they also give you links for the actual source code so if you wanted you could download and build your own source code the uh the problem there is you don't get any support so you'd have to get a subscription if you want some type of support they also have what is called a rolling release which means they build bios every night and they make it available for anyone to download the issue there again is you don't get any support so i've been using this rolling release for about two years now i had one in 2019 and it's now time to update that but before we start you look at the supported platforms you see that here it supports hyper-v um kbm which runs on almost every version of linux and also down at the bottom down here where'd it go down at the bottom it supports the xcpng which is the open source version of the zen server hypervisor now before i start i want to show you what i have here um as far as network i have a 24 port unified switch and on that switch i have defined several vlans these vlans are just randomly chosen by me and i assign them to different subnets none of the vlans are special um only vlan 35 here vlan 35 is used uh specifically for backups from the vms to my qnap nas so when you look at my qnap mass it has two ports on the back of it and those two ports are chunked together and all of those vlans can pass across that trunk but i'm only passing uh vlan 35 traffic right now and so it's a virtual switch that will allow me to pass the traffic i also have a vmware esxi server that is the free version of vmware it limits you to what you can do but it's useful for what i want to do with it i just have a very basic virtual machines so i don't need the options like vcenter and all that other stuff while we're waiting for that to load i will switch over to i also have the xcp ng server which is the zen server and that has multiple nics on it here what was that page over here and each of my servers i have one of these network cards it is a let's see here is a gtech 1. 25 gigabit card and it's got four ports on it so when you look at my xcp server those four ports show up as individual nicks so you see um zero one two and three are all intel corporations they're all on that one card and then the nick four is the built-in ethernet interface which is a real tech so i've taken those four ports and i bonded them together and then within that bond i have defined those same vlans so these vlans are available to talk on that switch now if the vmware ever came up which it did not i may have to hit reload there the vmware server also has one of those four port nics in it the physical mixer here so you got um zero through three again that's the four port nick and then you've got one which is the built-in and vmware uses port groups to define the actual vlans so these are the port groups and these are the vlans that they're associated with and we also have on my main machine i should have that same card it's got four ports on it which are these four wired connections and then it has e4 which is the built-in those four ports are combined into a bonded interface which is then shrunk up to that same switch and then i've defined vlans on that bonded interface so each hypervisor the kbm [Music] the vmware and the xcp all have bonded interfaces with the vlans so they can all talk to each other now well the reason we're putting in the bios router is because if we have something on vlan 30 and it wants to talk to vlan 25 something on vlan 25 it's going to use this bios router to make that communication to start the actual install of bios we need to go back over to the bios site that will get rid of that extra window from their main page at the bottom of the screen there are some links there one of the links is for documentation hit that link and go look at the installation and it gives you a description of what's available they have nightly bills that they do every night nightly betas and they have snapshots if you have a subscription with them you can download the latest well the current version and you also get support for that they give you information on building from source you can also click this link for the rolling release which is what i'll get that takes you to a site and you can get current amd and you click the latest version and it downloads an iso file you take that iso file and you install it on your hypervisor now i already have a dios router here so i'm going to shut that one down that's running an older version let me see let me make this larger sorry that you must be roots you have to run sudo okay so i've shut down the existing bias router and i'm going to create a new one and install from that iso and bios is based on debian so i just select the latest release of debian that's listed in my hypervisor i'm going to call this files 2021 and give it a description there and it wants to know where i want to install i'm going to select the iso that i downloaded which is called bios rolling latest and i'll hit next i want to put it on this server it only needs one cpu playing around with the previous version i found that um four gigs was enough to make it transfer at acceptable speeds um i did test with uh one two four eight and 16 gigs and the sweet pot uh sweet spot appeared to be the four gig so i just use four gigs here and um it has what size partition um 10 gigs is more than enough so i'll leave it there now here's the important part the it defaults to network four in my case network four is the outside interface which connects to my inside home network so i want that to be by ethernet 0 but you also need an interface for the internal network what i'm going to do is i'm going to add and i want to add from that bonded network when i add from that bonded network that's going to let me add one interface but then i can add sub-interfaces underneath so i tell it to add from that bonded interface and i hit next and it's going to start it automatically it just gives me a summary here and i hit create now see down at the bottom it's provisioning and creating creating the disk and it shows up here but it's not done yet so i can click it i get the console and when you hit the console it starts up and it wants to boot into a live cd so there's no option around that you have to go ahead and let it boot into the live cd go ahead and let it boot it should come up and give you a login prompt and once you get to the login the default login is bios and the default password is bios so once it's booted i want to look at the interfaces that are there we got our loot back we've got an ethernet zero interface and we've got an ethernet one interface and remember we're going to put uh sub interfaces on ethernet 1 because we use that bonded interface so to start the actual install you have to type install image let's just install image without the sudo okay bias install a local hard drive yes is the default so i hit enter and let it go ahead and auto select unless you know what you're doing i don't so i just let it auto select and it's defaulting to the default uh 10 gig drive it tells me it's going to destroy the data you have to type yes there how big of a root partition the whole thing so hit enter and then it goes through and it creates the file system and it copies all the needed files there now when you install it it asks you for the name of the image i leave it at the default you could make that a name that may mean something to you but i leave it as default and go ahead and install it that's asking where it wants to put the configuration files and i'll just accept the default and hit enter it wants to change the default password for the bios account so i'll give it a password retype it it's going to install grub so hit enter all right you're told it says i'm installing on a zen server would you like to set up the config to prepare for conversion and i'll say no there because i don't know what that means it says done so i will hit reboot are you sure you want to reboot yes starts booting i get my grub screen there and while that's booting um we'll go back to our documentation link under the user guide there's an option here for configuration mode in the quick start talks about setting up the interfaces in ssh and also dhcp i'm going to do a basic installation because all this thing does for me is it routes traffic from one subnet to the other and these are the these are the types of commands that you have to issue and they have all types of documentation here that you can follow so we're going to get to this vios login page we're going to go in this bios and we change the password okay so we boot it and we have no config okay the first thing i want to do is i want to put an ip on that external interface so that i can set this up over ssh when i do a config t not config t that's uh cisco i do a config and you notice the prompt is changed to a pound sign that means you're in configuration mode so what i want to do is put an ip address on interface eth0 and i've already got it copied but i can't paste in this window so i'm going to have to type it is and if you want to ssh to the box you have to put some type of ssh configuration in it and while i'm doing that i can show you that [Music] if you start typing a command and you type a question mark it'll show you all the options that are available there so i know that i'm going to type uh something for ssh and it's a service so i type service then a question mark uh the one i want is ssh i can just keep typing question marks so you have to set up at least one of these options so that ssh will be enabled the easiest one to do is the port which is normally 22.
so all i've done is put an ip on this and i put a um i've turned on the ssh but we also want to put in um the default route so we have to set protocols set protocols and if i do a question mark it just walks me through it it gives me the options it's kind of like a cisco router but i know what i want to type here i want to type static now that is the that is another router that's actually an edge router x that sits on my network so i've got the got the bios router which is a virtual router and its default router is my physical edge router x which would then give me access to the internet so once you've made those changes you have to commit them and it tells you to commit the kit the commit makes the changes you have to type save so that it writes the changes out to your config. boot so i would do a commit here and then i'll do a save now if i didn't do a save i would exit and it tells me the changes haven't been saved that means if i reboot the virtual router for some reason it won't have those settings there because i didn't save them so i'll go back to config and i'll save and it says it saves so let's go and see if we can get to it here got to get out of this screen i'll clear that so i want to see if i can ping i'm going to do that 168. 99 and i can ping it so it's reachable now it may complain about the ssh key changing let me try that here why is it one night yeah see it's complaining because the original bios router a set of ssh keys and my system knows about it so i got to get rid of the original ssh keys and it tells you how to do that by typing this then when i go back and i ssh to it it prompts me for a password here i am at my bios screen and i'm ready to do my initial installation now to do the actual configuration i need to assign ip addresses to the interfaces on the router now vias uses a command called a vif which is a virtual interface to represent the sub-intersect sub-interfaces that are going to be on that bonded interface so i've got that bonded interface that's got four ports on it and i'm going to set up vlan 90 here vlan 20 25 and so on and each one has its own ip address and those interfaces also have a ip version 6 address so once i get all the ip addresses configured i'm also going to add a dhcp server for my actual virtual machine networks that way when i'm building a vm i can just pop it in let it do dhcp and boot up and i can change it to static later and again all of this information is on their documentation page they show you here how to set up dhcp if you want to use the bias router to forward dns queries you can point your via machines to the virus router and it would do dns for you for that um in my case i don't need that but it gives examples on how to use that um it's also a firewall so you can do firewalls so you want to read through all this documentation and it'll give you information on how to get things set up so what we're going to do is we're going to enter configure mode and i'm going to pop my notes over here i'll leave this on top i've already put in the ip and the gateway so i want to put the sub interfaces in and put ip addresses on them and just to show you again if you you start typing commands each one if i put a question mark there it'll give me all the options there and the option i'm going to put in is a vif which is a vlan basically a virtual local area network id but to save time i'm going to paste this in take that and copy it come over here and paste it the same with the version six addresses now i don't need a version six address on uh vlan 40 um because i use that for something else i'm going to paste in the version 6 ip addresses copy there paste it there i also have i have an open vpn server running back on a raspberry pi and that's the subnet that it uses um i also have a gateway going out to what's that going out to i have a gateway going out to a free pbx server that's out in the cloud and i route that through the vpn server over a different open vpn connection but i need to tell this bios router how to get there and this is how i do that i route the traffic for those two networks back to this ip which is a raspberry pi all right i also want to set my default route for ipv6 normally you don't have to do that um it will ipversion 6 will pick up the default route from the gateway router but i like to put it in myself i'll pop that in okay so i've got all that in and i need to save that so i hit commit and i hit save all right i'm on the linux are you still there you are still there that's because you are not okay come back over here this is one of my vm's uh dns one let's see where that is that the vm is here and it is on the it is on vlan 30 by default okay i also have another vm called mirror this is my the vm that mirrors the alma linux repositories and it is on vlan 25 so when i look at the dns one i can see that it's on 30.
21 when i look at the mirror that disconnected me because i changed that so we have to go back so on the mirror side um the mirror vm i should say it's on vlan 25 now if i look at the routes on this vm you can see my default route is 25. 15 which is the bios router that i just set up and if i do the same thing on dns one which is on a different vlan so it's ip route show my default route is 30. 15 now most times the default route usually ends in dot one but i'm using dot 15 because i know that dot 15 represents my bios router i do a lot of testing and stuff so in my lab i have a pf sense appliance and it lists it listens on dot 14 for each one of the subnets so i can switch them out and do testing as i want so um this one's gateway is pointing to 30.
15 and right there and i do a show config all right when i do show config my outside interface which is on my internal network is 99. 11 so if i have anything on my internal network but i want to get to these vlans that are back on my virtual network i have to route them through this 99. 11 but if you can see this virtual interface on vlan 20 is dot 15 here dot 15.
so just a simple test um and what's the mirror ip the mirror ip is 25. 88 well if i'm on dns one which is on the 30van i go to ping 25. 88 if you can ping it that lets me know that my basic routing is working correctly do a trace route if traceroute is on this box you can see it trace routes and it goes to the bios box and hits 25.