Overview

Prior to the SBC 10.0 release, when duplicate IP Peers were configured, there was a mismatch between the CDB configuration and the application. The CDB accepted duplicate IP Peers, as the IP Peer name was case sensitive prior to the SBC 10.0 release.

For example, the CDB accepts PEER1 and peer1 as two different IP peers, but the application accepts only the IP Peer that was created first. 

To address this problem, from SBC 10.0 release onwards, the IP Peer names are made case insensitive. For example, both the names PEER1 and peer1 point to the same object.

Run the following procedure before upgrading to SBC 10.0. This is because after upgrading to SBC 10.0, you cannot delete duplicate IP Peers.

Run the following procedure even otherwise (not only before upgrading to 10.0) to rectify the duplicate IP Peer issue mentioned above.

Procedure

To resolve a duplicated IP Peer issue, follow the steps below.

Step 1: Copy script to the SBC

Use the following script (i.e., copy the script into the file dupIpPeerCheck.sh as user root), and then change the file permissions using the command chmod 700 dupIpPeerCheck.sh.


Download script file: dupIpPeerCheck.sh script.txt

dupIpPeerCheck Script
#!/bin/bash

staging=/tmp
installLog=$staging/dupIpPeerCheck.out

runValidateConfig()
{
    status=0
    echo -e "\n===========================================================================================================================\n" | tee -a $installLog
    echo " Starting configuration validation for duplicate ipPeer..." | tee -a $installLog

    `/opt/sonus/sbx/tailf/bin/confd_load -F p -P /addressContext/zone/ipPeer/name | grep -A 1 "http://sonusnet.com/ns/mibs/SONUS-IP-PEER/1.0" | grep name | cut -d ">" -f 2 | cut -d "<" -f 1 | sort | uniq -Di  > $staging/duplicateIpPeerList`;

    if [ ! -s $staging/duplicateIpPeerList ]; then
        echo " No duplicate IpPeers found..." | tee -a $installLog
        `/bin/rm -f $staging/duplicateIpPeerList > /dev/null 2>&1`
    else
        status=1
        echo " Found duplicate ipPeer. Please delete the following ipPeers..." | tee -a $installLog
        echo " "
        cat $staging/duplicateIpPeerList | tee -a $installLog
    fi

    echo -e "\n===========================================================================================================================\n" | tee -a $installLog

   
    if [ $status -eq 0 ]; then
        echo " Configuration passed validation - No duplicate IpPeer found. ok to proceed with SW upgrade..." | tee -a $installLog
    else
        echo " Configuration failed validation, duplicate ipPeer found. Please contact Sonus TAC before performing SW upgrade..." | tee -a $installLog
    fi    

    echo -e "\n===========================================================================================================================\n" | tee -a $installLog
}

/bin/rm -f $staging/duplicateIpPeerList > /dev/null 2>&1

runValidateConfig


echo "Validation completed."
echo ""
echo ""

exit 0

Step 2: Run the script

Log on as root user and run the dupIpPeerCheck.sh script.

Run dupIpPeerCheck.sh
[root@vsbcSystem-vsbc1 tmp]# sh dupIpPeerCheck.sh

Step 3: Examine the output of the script

The script output for validating IP Peer is shown in the terminal. Alternatively, you can examine it later in the log file in the path /tmp/dupIpPeerCheck.out.

Step 4: If there is a failure, check the corresponding files for the IP Peer lists

If the SIP IP Peer validation fails then the file /tmp/duplicateSipIpPeeerList is generated.

Step 5: Delete all the IP Peers listed in the corresponding list file

Delete all the duplicate IP Peers listed in the corresponding list file. Recreate the necessary IP Peers as required.

Example Script Output

IP Peers Validation Failed

IP Peers Validation Failed
[root@susan ~]# ./dupTrunkGroupCheck.sh

===========================================================================================================================

Starting configuration validation for duplicate ipPeer...

Found duplicate SIP ipPeers. Please delete the following SIP ipPeers...


PEER1

PeER1

PeeR1

Peer1

peer1

===========================================================================================================================

Configuration failed validation, duplicate ipPeers found. Please contact Sonus TAC before performing SW upgrade...

===========================================================================================================================

Validation completed.

IP Peer Validation Successful

[root@susan ~]# ./dupIpPeerCheck.sh

===========================================================================================================================

Starting configuration validation for duplicate ipPeer...
No duplicate IpPeers found...

===========================================================================================================================

Configuration passed validation - No duplicate IpPeer found. ok to proceed with SW upgrade...

===========================================================================================================================

Validation completed.