Configuring Asterisk guest with 2 NICs

jernej

Member
May 26, 2012
2
0
21
Hello,
I have a server with 2 physical NICs and I would like to deploy an debian based Asterisk guest (OpenVZ based) using both cards. Here is a short description of a current setup.
There is a working vmbr0 with eth0 attached to it and connected to LAN behind a firewall in range of 192.168.1.x/24. All the VM's are using it and it works like charm.
On the same network I have some IP phones, and everything works locally. Now I would like to add a second network interface to the setup, so my Asterisk guest would be able to connect to the VOIP provider. The second network card should get an IP from a VOIP providers DHCP server that is in the 10.x.x.x/24 range (the network cable will go from the second NIC to the VOIP port on ADSL modem).
So in the end I should have a guest with eth0 192.168.1.x/24 connected to LAN with IP phones attached to it and eth1 with an IP of 10.x.x.x/24 (the VMs gateway should also be in that IP range) connected to VOIP provider.
For me the best solution would be to have dedicated second NIC to Asterisk container only, but AFAIK that is not possible. So the question is how to go about it - should I create a second vmbr1 or add a bonding device (with eth0, eth1)? If someone has a similar setup I would appreciate a few lines from /etc/network/interface of both host and guest config....
Thank you in advance!
Jernej
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!