# Virtual Box bridged to interface alias without IP.



## ekingston (Jul 17, 2017)

I would like to host a few VMs with VirtualBox (because that's what I use on my Windows desktop) on my FreeBSD home server.

To somewhat simplify things, I would like the guests to use DHCP from my network DHCP server to get their addresses. I think this means I need to bridge the network connection within Virtual Box.

Since my FreeBSD server only has one NIC, I'll need to create some sub-interfaces (I think these are called alias interfaces) on the FreeBSD server.

I've done a bunch of reading but what I'm not clear on is how to create sub-interfaces on FreeBSD without assigning them an IP address.

Any pointers to clear documentation or a walk-through of how to do what I want would be appreciated.


_NOTE:_ for those suggesting bhyve, I may eventually go that route but I've used VirtualBox for years on the desktop (always used either virtual LAN or NAT for the interface) and at this stage I would prefer to minimize the things I'm unfamiliar with.


----------



## IPTRACE (Jul 17, 2017)

Use the following command to create bridge interface on FreeBSD.`ifconfig bridge0 create`Then you can assign the IP address for that interface.
I use byve, so in Virtual Box can be similar approach.
The bridge can be used as hub for the guests interfaces. But firstly, you have to create interface for guest using `ifconfig tap0 create` . Then add this tap to bridge using `ifconfig bridge0 addm tap0` .
This is how I do for my virtualization using bhyve. I presume it's similar with Virtual Box. I hope it could help you.


----------



## SirDice (Jul 18, 2017)

To add to that, this is how to add it to /etc/rc.conf:


```
cloned_interfaces="bridge0 tap0" # this 'creates' the interfaces
ifconfig_bridge0="addm tap0"        # Add tap0 to the bridge
```


----------

