$ifsrc and $ifdst does not seem to work on IP layer.

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

$ifsrc and $ifdst does not seem to work on IP layer.

Post by skb007 »

1. Brekeke Product Name and Version:BSS Adv Ver 3.8

2. Java version1.8

3. OS type and the version:RHEL 7.5

4. UA (phone), gateway or other hardware/software involved:Various

5. Your problem:
It appears that $ifsrc and $Ifdest are working on the SIP layer but it does not have any effect on the IP layer. SIP packets go out via the em1 which has been restricted in the sv.properties.

Here are more details:

We have four NIC on the server.

em1: 192.168.1.100 255.255.255.0
em2: 2.2.2.29 255.255.255.240
em3: 2.2.2.30 255.255.255.240
em4: 2.2.2.62 255.255.255.224


em1: This interface is intended for server management only. It has been configured as "net.net1.interface-restrict=192.168.1.100"
em2: This interface is intended for SIP signalling between UAC-BSS. It has been configured as "net.net1.interface=2.2.2.29"
em3: This interface IP address is on same subnet as em1 and it is intended to use for SIP signalling between BSS-UAS. It has been configured as "net.net2.interface=2.2.2.30"
em4: This interface has IP address which is in different subnet than em2/em3. It is intended for medial/rtp only.

We have configured policy based routing on the server where by packets go out via the same interface they came in. RHEL tech support has verified the configuration and it has been tested. If outside ip address pings an IP address of em2/3/4 then the ICMP response goes out via the same interface the packets came in.

Matching Patterns
$request = ^INVITE
$addr = ^4.4.4.4$
To = sip:(.+)@
From = sip:(.+)@

Deploy Patterns
To = sip:%1@5.5.5.5
From = sip:%2@2.2.2.30
$b2bua = true
$rtp = false
$ifsrc = 2.2.2.29
$ifdst = 2.2.2.30


At IP layer, all packets originating from BSS has src IP address of em1 and goes out via em1. However the SIP headers contains the correct IPs. For example, all SIP headers towards UAC side contains the IP address 2.2.2.29 and all SIP headers on the UAS side contains the IP address of 2.2.2.30.
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

To simplify the issue:
UAC sends the INVITE to BSS on em2 interface. All responses from BSS towards UAC are trying to go out via em1 instead of em2.

However if other protcols such as ICMP,HTTP,HTTPS,TELNET,SSH, packets go out using the same interface they came in such as em2.

Somehow BSS is behaving differently.
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

In order to rule out any routing issue on the server, I installed SIPP on the same server and made few test calls by replacing BSS with SIPP and I did not find any issue. But packet s are not routing correctly using BSS.

Any thoughts?
Mohney
Posts: 79
Joined: Tue Nov 20, 2007 12:05 pm

Post by Mohney »

How about tuning of the routing table at Linux?

route add -net <UAC's netaddress> netmask 255.255.255.0 dev em2
route add -net <UAS's netaddress> netmask 255.255.255.0 dev em3
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

Mohney,

Appreciate your response. I had already done that as a temporary solution. I need to know why BSS is behaving this way?
Mohney
Posts: 79
Joined: Tue Nov 20, 2007 12:05 pm

Post by Mohney »

Currently you need to tune OS's route table to meet your requirement.
skb007
Posts: 152
Joined: Mon Oct 05, 2015 10:22 pm
Location: USA

Post by skb007 »

You meat I have to add the static routing as described by Mohney?
Post Reply