Brekeke SIP Server Wiki

OS commands for redundancy

Here is the list of default OS commands which the Redundancy function calls for managing Service IP address and Default Gateway IP address.
Since the SIP Server supports Linux and Windows, default commands are different depending on OS. Also each default command can be changed by a property variable specified in [Configuration] [Advanced] page.

These commands will be called with paramaters which indicate command variables expressed as %{name}. Refer to the Command Variable List for more details.

 

Note:

The SIP Server process must have a privilege for executing these commands.
For Linux, “sudo” command will be used for adding/deleting the Service IP address if [Use sudo for commands] setting is on at the [SIP SERVER] > [Configuration] > [System] >[General] section.

 

Default Commands for Linux
Purpose Default Command Property Variable
Add the Service IP address *1 /sbin/ip addr add %{ip}/%{prefix} dev %{if} net.ifmanage.cmd.add
Delete the Service IP address *1 /sbin/ip addr del %{ip}/%{prefix} dev %{if} net.ifmanage.cmd.del
Update neighbours’ ARP caches *2 /usr/sbin/arping -U -c 2 -I %{if} %{ip} net.ifmanage.cmd.arp
Add the Default Gateway IP address *3 /sbin/ip route add default via %{gw} net.ifmanage.cmd.add.gateway

*1. If /sbin/ip command doesn’t exist, /sbin/ifconfig command will be used instead.

*2. If /usr/sbin/arping doesn’t exist, /usr/bin/arping command will be used instead.

If OS is Debian (or its derivatives such as Ubuntu), install arping command with “apt-get install iputils-arping

*3. If /sbin/ip command doesn’t exist, route command will be used instead.

 

Default Commands for Windows
Purpose Default Command Property Variable
Add the Service IP addres
netsh interface ip add address "%{if}" %{ip} %{mask}
net.ifmanage.cmd.add
Delete the Service IP address
netsh interface ip delete address "%{if}" %{ip}
net.ifmanage.cmd.del
Command Variable List
Command Variable Meaning
%{gw} Gateway IP address
%{if} Interface name
%{ip} Service IP address
%{mac} MAC address
%{mask} SubnetMask
%{prefix} Prefix Length

 

 

How to change default commands

Example:Delete the pre-existing default gateway setteing before adding the new gateway IP address.

Set the following property parameter and subsequent new commands at [Configuration] >[Advanced].

net.ifmanage.cmd.add.gateway = /sbin/ip route del default && /sbin/ip route add default via %{gw}

 

 

Yes No
Suggest Edit