It is possible to use BVR Linux with multiple network interfaces. This can be particularly useful in scenarios where some traffic should go via a public network interface and other traffic should go via a private network interface. For example, BVR may receive calls on the public interface but use the private interface for MRCP sessions.
Configuring Bind Addresses
There are 3 bind addresses that can be configured: SIP, Streaming and MRCP. These can be configured individually using the bind_address option in the [sip], [streaming] and [mrcp] sections. If multiple presentation addresses are to be used in these protocols, the bind_address must be set to "any" so that BVR is able to receive traffic on the specified interface.
For further information on these configuration parameters, please refer to SIP Configuration Options, Streaming Configuration Options and MRCPv2 Configuration Options.
Configuring Presentation Addresses
The presentation address can be set for SIP, Streaming and MRCP in their respective configuration sections ([sip], [streaming] and [mrcp]). However, this may not be flexible for all scenarios such as when multiple network adapters are in use.
For a more flexible solution, BVR has options to configure the presentation addresses based on the subnet of the destination using the [[network]] configuration section (see Network Configuration Options). Within this section are a few parameters:
[[network]] subnet="1.2.3.0/24" presentation_address="1.2.3.4"BVR will set the presentation_address for SIP messages, Streaming and MRCP to "1.2.3.4" when the destination is in the 1.2.3.0-1.2.3.255 IP range.
The "destination" refers to the actual destination the SIP message is sent to and not necessarily the address provided in the To header. This is because the address in the To header is not always necessarily the next hop - for example, when using proxies. It is also possible that the To: header may not even contain an IP address, e.g. if a tel: URI is used (along with a proxy).
Configuring routing tables
Routing tables can be manipulated temporarily using the ip command and can be viewed by running.
ip route
Manipulation of the routing tables should be done while BVR is not running. To avoid any unexpected behaviours, it is also highly recommended that any changes to the routing tables that will affect BVR are added permanently and the system rebooted.
The routing tables can be manipulated temporarily using "ip route add" or permanently by adding an entry to /etc/sysconfig/network-scripts/route-INSERT_DEVICE_NAME_HERE. If adding a permanent route, a restart of the network service will be required by running "service network restart". Note that running this command may cause your SSH session to disconnect. It is recommended that you test any routing changes using the "ip route add" command before adding them as a permanent setting primarily to determine that the system is still usable.
1.1.1.0/24 via 2.2.2.2 dev eth1The via and dev parameters are both optional - for example it is possible to limit all traffic to a specific subnet to just go out on one adapter and ignore the via parameter. To apply this temporarily, run:
ip route add 1.1.1.0/24 via 2.2.2.2 dev eth1and to apply it permanently, open /etc/sysconfig/network-scripts/route-eth1 in your preferred text editor and add the line:
1.1.1.0/24 via 2.2.2.2 dev eth1A route can be temporarily removed by running: ip route del SUBNET So to delete the above, run:
ip route del 1.1.10/24To permanently remove a route, simply remove it from the relevant route file it was added to and restart the network interface.