# multiple bridges with one nic



## robot468 (Aug 31, 2022)

I'm trying to create bridge for vpn server, but i already have bridge with my nic, created by vm-bhyve. When adding nic to second bridge, i got

```
ifconfig: BRDGADD igb0: Device busy
```

I did not find anything about this restriction in the ifconfig or if_bridge documentation. Maybe I missed something? Where can I read about it?


----------



## SirDice (Aug 31, 2022)

robot468 said:


> I'm trying to create bridge for vpn server


Why not attach it to the existing bridge?


----------



## robot468 (Aug 31, 2022)

SirDice said:


> Why not attach it to the existing bridge?


Because it auto-created and managed by vm. The vm configuration can change and this will break the scheme. I don't like this kind of solution.


----------



## SirDice (Aug 31, 2022)

robot468 said:


> Because it auto-created and managed by vm. The vm configuration can change and this will break the scheme.


Create a static defined bridge in rc.conf, import that 'custom' bridge in vm(8)?









						Virtual Switches · churchers/vm-bhyve Wiki
					

Shell based, minimal dependency bhyve manager. Contribute to churchers/vm-bhyve development by creating an account on GitHub.




					github.com


----------



## robot468 (Aug 31, 2022)

SirDice said:


> Create a static defined bridge in rc.conf, import that 'custom' bridge in vm(8)?


Yes, that looks like a solution, thank you. But still, maybe you know where i can read about bridge limitations?


----------



## SirDice (Aug 31, 2022)

robot468 said:


> But still, maybe you know where i can read about bridge limitations?


Don't know the exact details but it has something to do with the way a bridge is "hooked" into the interface's stack. A second bridge would need to hook in on the same spot, which is not possible. So it has to hook before or after the first bridge's hooks. This would lead to issues with traffic that's going out of one bridge and not appearing on the other.


----------

