Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
$ifsrc and $ifdst does not seem to work on IP layer.
Author Message
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Sun Dec 16, 2018 4:34 pm    Post subject: $ifsrc and $ifdst does not seem to work on IP layer. Reply with quote

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.
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Tue Dec 18, 2018 10:48 am    Post subject: Reply with quote

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.
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Wed Dec 19, 2018 10:57 am    Post subject: Reply with quote

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?
Back to top
View user's profile
Mohney
Brekeke Talented


Joined: 20 Nov 2007
Posts: 79

PostPosted: Thu Dec 20, 2018 11:01 am    Post subject: Reply with quote

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
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Thu Dec 27, 2018 5:43 pm    Post subject: Reply with quote

Mohney,

Appreciate your response. I had already done that as a temporary solution. I need to know why BSS is behaving this way?
Back to top
View user's profile
Mohney
Brekeke Talented


Joined: 20 Nov 2007
Posts: 79

PostPosted: Wed Jan 16, 2019 12:44 pm    Post subject: Reply with quote

Currently you need to tune OS's route table to meet your requirement.
Back to top
View user's profile
skb007
Brekeke Guru


Joined: 05 Oct 2015
Posts: 152
Location: USA

PostPosted: Wed Jan 16, 2019 1:57 pm    Post subject: Reply with quote

You meat I have to add the static routing as described by Mohney?
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1