Technical Helpweb

Dialogic® PowerMedia™ Extended Media Server (PowerMedia XMS) - more articles

Media server fails to properly route RTP packets in load balancing mode

Symptom: 

When running the MSML media server on Dialogic® PowerMedia™ Host Media Processing Software Release 4.1LIN, or when the Dialogic® PowerMedia™ Extended Media Server (XMS) is running in RTP loadbalancing mode, the MSML media server will load balance the RTP connections over the different Ethernet interfaces. For example, if the RTP for call 0 goes out on eth0, the RTP for call 1 should go out on eth1. The MSML media server achieves this by assigning the source IP address of each RTP stream to the IP address of one the interfaces. So RTP stream for call 0 will have as source IP address, the IP address of eth0.

Although everything appears to be set correctly with each RTP connection having the correct source IP address, all streams go out on the same interface, which is not as expected. Hence load balancing is not achieved.


Reason for the issue:

The operating system routes outgoing packets by finding the best match in its routing table for the destination address of the outgoing packet. Routing is not done based on the source address. So, for equal routes defined on 2 different interfaces, the system will always choose the first route, and consequently the packets will always go out on the same interface whatever the src IP address.

Solution: 

It is necessary to configure the system with policy-based routing entries that perform routing based also on the source IP address.

For example, on Red Hat or CentOS systems only with 2 ethernet interfaces used for RTP streaming configured in Load Balancing mode, add the following 2 lines in /etc/iproute2/rt_tables

200 tbleth0
201 tbleth1

Add the following rule for IF1 source-based routing in file /etc/sysconfig/network-scripts/rule-eth0 

# RTP traffic
from <IP of eth0> table tbleth0

Similarly for eth1 source-based routing in /etc/sysconfig/network-scripts/rule-eth1

# RTP traffic
from <IP of eth1> table tbleth1

Then, depending on the requirements (such as location of the remote RTP endpoints), add some routes.

Add the following in the file /etc/sysconfig/network-scripts/route-eth0

# RTP routing 
default via ip_gateway dev eth0 table tbleth0

The same thing for eth1 /etc/sysconfig/network-scripts/route-eth1

# RTP routing
 default via ip_gateway dev eth1 table tbleth1


Finally, restart the network service

service network restart


 

Related Documentation: 

Note that Dialogic is not responsible for the content on the third-party website listed below
Policy Routing With Linux - Online Edition
  
 




Feedback

Please rate the usefulness of this page:  
0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page:

First published: 25-Nov-2013
Open access: Product rule: open; Page rule: Auto