Steel-Belted Radius Carrier Node Administration Scripts
Several types of scripts effect different areas of SBR Carrier operation.
Using IP Address and IP Address Pool Scripts
Using IP Address and IP Address Pool Scripts
To set up or modify the IP Address Pool, you use specific administration scripts that modify the IP Address Pool table in the SSR database. You must place all Steel-Belted Radius Carrier nodes into management mode before you work on the IP address tables. When a SBR Carrier node is in management mode, caching is disabled, and that slows down performance, so we recommend that you schedule IP pool maintenance for off-peak hours.
You can modify configuration parameters (other than the ManagementMode parameter in dbclusterndb.gen) without putting the servers into management mode. When you change other settings on the Steel-Belted Radius Carrier node, the server enters and exits management mode silently when appropriate.
You must place all of the cluster’s SBR Carrier nodes in management mode to execute these scripts because they write IP address information into the database:
See AddPool.sh
See AddRange.sh
See ClearCache.sh
See DelPool.sh
See DelRange.sh
See RenamePool.sh
See RestoreIP.sh
You can execute these IP-related scripts without entering management mode because they do not write information to the database:
See Monitor.sh
See ShowAddrs.sh
See ShowCaches.sh
See ShowPools.sh
See ShowRanges.sh
Using Management Mode
Using Management Mode
You must place all SBR Carrier servers that are the front end for a SSR cluster into management mode before you modify any part of the SSR IP address tables.
Placing a SBR Carrier Server into Management Mode
To place a SBR Carrier server into management mode, as root:
Edit /opt/JNPRsbr/radius/dbclusterndb.gen.
Scroll down the file past the opening comments and the management mode comments to the ManagementMode entry:
... (comments) ;-------------------------------------------------------------------------- ; ManagementMode=<0|1> (0=false, 1=true); default=0 {updatable} ... (comments)
;-------------------------------------------------------------------------- ManagementMode = 0
Set the value of the ManagementMode parameter to 1.
Save the file.
Restart the process.
Either:
Execute a HUP command.
Execute: /opt/JNPRsbr/radius/sbrd hup.
Scan or tail the server log to confirm that it contains this entry:
DB Cluster plugin has entered Management Mode
Repeat this procedure on each SBR Carrier node in the cluster before executing the IP address database command scripts.
Removing a SBR Carrier Server from Management Mode
Remove all SBR Carrier servers associated with an SSR cluster from management mode after you reconfigure your SSR IP address tables. To remove a SBR Carrier server from management mode:
To place a SBR Carrier server into management mode, as root:
Edit /opt/JNPRsbr/radius/dbclusterndb.gen.
Scroll down the file past the opening comments and the management mode comments to the ManagementMode entry:
... (comments) ;-------------------------------------------------------------------------- ; ManagementMode=<0|1> (0=false, 1=true); default=0 {updatable} ... (comments)
;-------------------------------------------------------------------------- ManagementMode = 1
Set the value of the ManagementMode parameter to 0.
Save the file.
Restart the process.
Either:
Execute a HUP command.
Execute: /opt/JNPRsbr/radius/sbrd hup.
Scan or tail the server log to confirm that it contains this entry:
DB Cluster plugin has left Management Mode
Repeat this procedure on each SBR Carrier node in the cluster.
ClearCache.sh
ClearCache.sh
The ClearCache.sh script lets you mark the cached addresses associated with a specified SSR node (or all cached addresses) as uncached.
Syntax
All SBR Carrier nodes must be in management mode before you execute this script.
Options
Table 83: ClearCache.sh Options
Option | Description |
---|---|
-a | Specifies that all cached addresses should be marked uncached. |
nodeid | Specifies that all cached addresses associated with the specified SSR node should be marked as uncached. The value you enter for nodeid is the SSR node identifier specified in the config.ini file on the database management server. |
-h | Displays help for the ClearCache.sh script. |
Example
The following example (1) uses the ShowAddrs.sh script to list the address cache list for Node 24, which contains four IP addresses; (2) uses the ClearCache.sh script to clear the address cache for Node 24; and (3) uses the ShowAddrs.sh script to show that no IP addresses remain in the address cache list for Node 24.
hadm$- ShowAddrs.sh IpAddrs: +-----------------+-----------------+-------+-------+---------------------+ | IpAddress | Pool | Cache | InUse | LastUse | +-----------------+-----------------+-------+-------+---------------------+ | 0. 0. 0. 10 | B-GOLD | 0 | 0 | 2005-11-02 14:08:36 | | 0. 0. 0. 11 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 12 | B-GOLD | 0 | 0 | 2005-11-02 14:08:47 | | 0. 0. 0. 13 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 14 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 15 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | +-----------------+-----------------+-------+-------+---------------------+ hadm$- ClearCache.sh 24 hadm$- ShowAddrs.sh IpAddrs: +-----------------+-----------------+-------+-------+---------------------+ | IpAddress | Pool | Cache | InUse | LastUse | +-----------------+-----------------+-------+-------+---------------------+ | 0. 0. 0. 10 | B-GOLD | 0 | 0 | 2005-11-02 14:08:36 | | 0. 0. 0. 11 | B-GOLD | 0 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 12 | B-GOLD | 0 | 0 | 2005-11-02 14:08:47 | | 0. 0. 0. 13 | B-GOLD | 0 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 14 | B-GOLD | 0 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 15 | B-GOLD | 0 | 0 | 0000-00-00 00:00:00 | +-----------------+-----------------+-------+-------+---------------------+
Usage Notes
The ClearCache.sh script is intended for use in situations where a SBR Carrier server has failed and you want to recover the addresses associated with the node. If you execute the ClearCache.sh script against an operational node, SBR Carrier cannot track which addresses from that node have been issued, potentially resulting in addresses being assigned to more than one user.
ShowCaches.sh
ShowCaches.sh
The ShowCaches.sh script enables you to display detailed information about IP address pool caches.
Syntax
Options
Table 84: ShowCaches.sh Options
Option | Description |
---|---|
-h | Displays help for the ShowCaches.sh script. |
Example
The following example shows the combined output
of the ShowCaches.sh script and the ShowPools.sh script using the -r option.
hadm$- ShowPools.sh; ShowRanges.sh; ShowPools.sh -v; ShowPools.sh -vr; ShowCaches.sh IpPools: +----------------+------+-------+ | Name |Ord |Count | +----------------+------+-------+ |(z o m b i e) | 0 | 0 | |A-PLATINUM | 1 | 1,775 | |B-GOLD | 2 | 1,429 | |C-SILVER | 3 | 1,540 | |D-BRONZE | 4 | 1,375 | |E-ZINC | 5 | 1,966 | +----------------+------+-------+ Total Pools : 5 + 1 zombie pseudo-pool. Total Ranges: 10 + 0 zombie pseudo-ranges. Total Addrs : 8,085 + 0 zombie pseudo-addrs. IpRanges: +----------------+-----------------+-----------------+----------+ |Pool |StartAddr |EndAdd |Count | +----------------+-----------------+-----------------+----------+ | (z o m b i e) |(v a r i o u s) | (v a r i o u s) | 0 | | A-PLATINUM | 51. 11.158.213 | 51.11.160.187 | 487 | | A-PLATINUM | 114. 90.189. 68 | 114.90.190.234 | 423 | | A-PLATINUM | 118.218. 81. 77 | 118.218.84.173 | 865 | | B-GOLD | 34.201.180.235 | 34.201.186.127 | 1,429 | | C-SILVER | 60.103.156.174 | 60.103.162. 43 | 1,406 | | C-SILVER | 72.138.136.244 | 72.138.137. 82 | 95 | | C-SILVER | 73. 45. 8. 88 | 73.45.8.126 | 39 | | D-BRONZE | 212.182.252.126 | 212.183.1.141 | 1,296 | | D-BRONZE | 255. 65.167.181 | 255.65.168.3 | 79 | | E-ZINC | 218. 88. 62.250 | 218.88.70.167 | 1,966 | +----------------+-----------------+-----------------+----------+ IpPools: +----------------+------+-------+------+--------+---------+ | Name |Ord |Count |%Free |%Cache |%InUse | +----------------+------+-------+------+--------+---------+ |(z o m b i e) | 0 | 0 | ---- | ---- | ---- | | A-PLATINUM | 1 | 1,775 | 66.2 | 33.8 | 0.0 | | B-GOLD | 2 | 1,429 | 58.0 | 42.0 | 0.0 | | C-SILVER | 3 | 1,540 | 61.0 | 39.0 | 0.0 | | D-BRONZE | 4 | 1,375 | 56.4 | 43.6 | 0.0 | | E-ZINC | 5 | 1,966 | 69.5 | 30.5 | 0.0 | +----------------+------+-------+------+--------+---------+ IpPools: +----------------+------+------+------+---------+---------+ | Name |Ord |Count |%Free |%Cache |%InUse | +----------------+------+------+------+---------+---------+ |(z o m b i e) | 0 |0 |0 | 0 | 0 | | A-PLATINUM | 1 |1,775 |1,175 | 600 | 0 | | B-GOLD | 2 |1,429 |829 | 600 | 0 | | C-SILVER | 3 |1,540 |940 | 600 | 0 | | D-BRONZE | 4 |1,375 |775 | 600 | 0 | | E-ZINC | 5 |1,966 |1,366 | 600 | 0 | +----------------+------+------+------+---------+---------+ IpCaches: +-------------+------+---------+---------+ | Pool | Node | Count |%Cache | +-------------+------+---------+---------+ | A-PLATINUM | 30 | 250 | 14.08 | | A-PLATINUM | 31 | 150 | 8.45 | | A-PLATINUM | 32 | 200 | 11.27 | | B-GOLD | 30 | 250 | 17.49 | | B-GOLD | 31 | 150 | 10.50 | | B-GOLD | 32 | 200 | 14.00 | | C-SILVER | 30 | 250 | 16.23 | | C-SILVER | 32 | 150 | 9.74 | | C-SILVER | 32 | 200 | 12.99 | | D-BRONZE | 30 | 250 | 18.18 | | D-BRONZE | 31 | 150 | 10.91 | | D-BRONZE | 32 | 200 | 14.55 | | E-ZINC | 30 | 250 | 12.72 | | E-ZINC | 31 | 150 | 7.63 | | E-ZINC | 32 | 200 | 10.17 | +-------------+------+---------+---------+ hadm$-
This output shows five pools and ten ranges. There are three SBR Carrier servers attached to the cluster (node IDs 30, 31, and 32). It also shows the state right after all three SBR Carrier servers have been booted, with each node caching its “high-water mark” of addresses, and no addresses yet “in use”.
Node 30 has a high-water mark of 250 for each pool, Node 31 has 150, and Node 32 has 200. The “%Cache” column in the ShowPools.sh script is cumulative over SBR Carrier servers, while “%Cache” in the ShowCaches.sh script is per-SBR Carrier server (finer granularity); the latter adds up to the former, for each pool.
AddPool.sh
AddPool.sh
The AddPool.sh script adds a named IP address pool to the IpPools database table.
Syntax
All SBR Carrier nodes must be in management mode.
Options
Table 85: AddPool.sh Options
Option | Description |
---|---|
poolname | Address pool names can be entered in lower, mixed, or upper case, but names are converted to all capitals before the pool is created. User-created address pool names cannot include spaces or tab characters. |
-h | Displays help for the AddPool.sh script. |
Example
To add an IP address pool called GOLD to the database and then show it, enter the following commands:
hadm$-- AddPool.sh GOLD SBRs must be offline or in ManagementMode; OK? <yes|no> yes hadm$-- ShowPools.sh IpPools: +---------+------+------+ |Name |Ord |Count | +---------+------+------+ |(zombie) |0 |0 | | GOLD |1 |0 | +---------+------+------+ Total Pools: 1 + 1 zombie pseudo-pool. Total Ranges: 0 + 0 zombie pseudo-ranges. Total Addrs: 0 + 0 zombie pseudo-addrs.
Usage Notes
When an IP address pool is created, the script assigns the pool a permanent identification number (“ordinal”) in the range 1–65535. Ordinals are assigned in “wrap-around” fashion, where ordinals of increasing values are used before ordinals of lower value are re-used. When ordinals wrap around, values that are still in use are skipped.
Ordinal number 0 is reserved for the zombie address pool.
RenamePool.sh
RenamePool.sh
The RenamePool.sh script enables you to change the name assigned to an IP address pool in the IpPools database table. The RenamePool.sh script does not change the status of IP address ranges associated with a pool or the status of IP addresses in the pool. You cannot rename a zombie pool.
Syntax
All SBR Carrier nodes must be in management mode.
Options
Table 86: RenamePool.sh Options
Option | Description |
---|---|
oldname | Current name of the IP address pool that you want to rename. |
newname | New name you want to assign to the IP address pool. Address pool names can be entered in lower, mixed, or upper case, but names are converted to all capitals before the pool is created. User-created address pool names cannot include spaces or tab characters. |
-h | Displays help for the RenamePool.sh script. |
Example
The following example lists the address pools configured for Steel-Belted Radius Carrier high availability, changes the name of the GLOD pool to GOLD, and confirms the correction was accepted.
hadm$-- ShowPools.sh
IpPools: +---------+------+------+ |Name|Ord|Count| +---------+------+------+ |(zombie)|0|0| | GLOD|2|0| +---------+------+------+ Total Pools: 1 + 1 zombie pseudo-pool.
Total Ranges: 0 + 0 zombie pseudo-ranges.
Total Addrs: 0 + 0 zombie pseudo-addrs.
hadm$-- RenamePool.sh GLOD GOLD hadm$-- ShowPools.sh
IpPools: +---------+-------------+ |Name |Ord |Count| +----------+------------+ |(zombie) |0 |0 | | GOLD |1 |0 | +---------+-------------+ Total Pools: 1 + 1 zombie pseudo-pool.
Total Ranges: 0 + 0 zombie pseudo-ranges.
Total Addrs: 0 + 0 zombie pseudo-addrs.
DelPool.sh
DelPool.sh
The DelPool.sh script enables you to delete an IP address pool in the IpPools database table. When you use the DelPool.sh script to delete an address pool, Steel-Belted Radius Carrier high availability moves the IP addresses in that pool to the zombie pool to preserve their usage statistics.
Syntax
All SBR Carrier nodes must be in management mode.
Options
Table 87: DelPools.sh Options
Option | Description |
---|---|
poolname | Name of the IP address pool that you want to delete. |
-a | Deletes all IP address pools in the IpPools database and corresponding ranges from the IpRanges table. |
-z | Indicates whether zombie addresses are to be created. |
-h | Displays help for the DelPool.sh script. |
Example
The following example lists the address pools configured for Steel-Belted Radius Carrier high availability, deletes the C-SILVER address pool, and confirms the correction was accepted.
hadm$- DelPool.sh C-SILVER hadm$- ShowPools.sh IpPools: +-----------------+--------+---------------+--------+--------+--------+ | Name | Ord | Count | %Free | %Cache | %InUse | +-----------------+--------+---------------+--------+--------+--------+ | (z o m b i e) | 0 | 0 | ---- | ---- | ---- | | B-GOLD | 1 | 15 | 46.6 | 46.6 | 6.6 | +-----------------+--------+---------------+--------+--------+--------+.
Usage Notes
You cannot delete the zombie pool.
ShowPools.sh
ShowPools.sh
The ShowPools.sh script displays the name and ordinal number of a specified IP address pool or all IP address pools, along with statistics for how many addresses are configured in the pool and how many addresses are currently in an available, cached, or assigned state.
Syntax
Options
Table 88: ShowPools.sh Options
Option | Description |
---|---|
-v | Displays output in percentages for the ShowPools.sh command in verbose mode. The percentages always add to 100% per pool. |
-r | Displays output in raw numbers instead of percentages. When invoked with the -v option, you can use any format: -vr, -rv, -v -r, or -r -v. If the -r option is used without the -v option, the command is ignored. |
-p Poolname | Displays output of the specified IP address pool in raw numbers, when invoked with the -r, -vr, -rv, -v -r, or -r -v option. The output also contains the statistics for the total number of IP pools, pool ranges, and IP addresses in the database. When invoked with the -v option, this script displays the output of the specified IP address pool in percentages. Note: The exact pool name should be used for Poolname. Wildcard characters (such as *) are not allowed in the script. |
-h | Displays help for the ShowPools.sh script. |
Example
The following example lists the address pools configured for Steel-Belted Radius Carrier high availability.
hadm$- ShowPools.sh -v IpPools: +----------------+------+------+------+---------+---------+ |Name |Ord |Count |%Free |%Cache |%InUse | +----------------+------+------+------+---------+---------+ |(z o m b i e) |0 |0 |---- |---- |---- | |POOL1 |1 |10 |0.0 |100.0 |0.0 | |POOL2 |2 |20 |0.0 |100.0 |0.0 | |POOL3 |3 |255 |0.0 |100.0 |0.0 | +----------------+------+------+------+---------+---------+ hadm$- ShowPools.sh -r IpPools: +----------------+------+------+ |Name |Ord |Count | +----------------+------+------+ |(z o m b i e) |0 |0 | |POOL1 |1 |10 | |POOL2 |2 |20 | |POOL3 |3 |255 | +----------------+------+------+ Total Pools : 3 + 1 zombie pseudo-pool. Total Ranges: 3 + 0 zombie pseudo-ranges. Total Addrs : 285 + 0 zombie pseudo-addrs. hadm$- ShowPools.sh -v -p POOL1 IpPools: +----------------+------+------+------+---------+---------+ |Name |Ord |Count |%Free |%Cache |%InUse | +----------------+------+------+------+---------+---------+ |POOL1 |1 |10 |0.0 |100.0 |0.0 | +----------------+------+------+------+---------+---------+ hadm$- ShowPools.sh -r -p POOL1 IpPools: +----------------+------+------+ |Name |Ord |Count | +----------------+------+------+ |POOL1 |1 |10 | +----------------+------+------+ Total Pools : 3 + 1 zombie pseudo-pool. Total Ranges: 3 + 0 zombie pseudo-ranges. Total Addrs : 285 + 0 zombie pseudo-addrs.
Usage Notes
The output of the ShowPools.sh script is sorted alphabetically by pool name.
The Count field displays the total number of IP addresses in the pool. If an address pool consists of more than one address range, the Count field displays the sum of the number of addresses in each range. When the Count field is zero, the percentage fields are represented with dashes because the quotient InUse/Count does not exist.
The Free, Cache, and InUse fields, which are populated when the -v (verbose) option is used, display the percentage of addresses in an address pool that are in each state.
The Free field displays the percentage of addresses that are available for caching or assignment.
The Cache field displays the percentage of addresses that have been cached by a Steel-Belted Radius Carrier node.
The InUse field displays the percentage of addresses in the pool that are currently assigned to users.
AddRange.sh
AddRange.sh
The AddRange.sh script adds an IP address range to the IpRanges database table. The new range cannot intersect with an existing range. If no zombie addresses exist in the new range, the AddRange.sh script will run quickly; otherwise it will run slowly.
Syntax
All SBR Carrier nodes must be in management mode.
Options
Table 89: AddRange.sh Options
Option | Description |
---|---|
poolname | Specifies the name of the IP address pool to which you want to add an IP address range. Address pool names can be entered in lower, mixed, or upper case, but names are converted to all capitals before the script continues. |
startaddr | Specifies the first IP address in the IP address range. Enter IP addresses in dotted decimal format. |
count | Specifies the number of addresses in the address range. You must enter a count argument if you do not enter an endaddr argument. |
endaddr | Specifies the last IP address in the IP address range. Enter IP addresses in dotted decimal format. You must enter an endaddr argument if you do not enter a count argument. |
-u | “Unzombifies” the addresses in the Current Sessions Table and updates the corresponding Sbr_IpPoolOrdinal’s in the Current Sessions Table. |
-h | Displays help for the AddRange.sh script. |
Example
The following example adds an address range consisting of 15 addresses to the B-GOLD pool and confirms the address range was added.
hadm$- AddRange.sh B-GOLD 192.168.0.0 15 hadm$- ShowPools.sh IpPools: +-----------------+--------+---------------+--------+--------+--------+ | Name | Ord | Count | %Free | %Cache | %InUse | +-----------------+--------+---------------+--------+--------+--------+ | (z o m b i e) | 0 | 0 | ---- | ---- | ---- | | B-GOLD | 1 | 15 | 100.0 | 0.0 | 0.0 | +-----------------+--------+---------------+--------+--------+--------+
Usage Notes
When the AddRange.sh script is executed, it determines the status of the addresses in the range. If the addresses do not exist in the IpAddrs database table, the AddRange.sh script adds them to the table. If the addresses exist in the IpAddrs database table and are flagged as zombies, the script updates the pool ordinal of each address to reflect its address pool assignment.
DelRange.sh
DelRange.sh
The DelRange.sh script enables you to delete an IP address range from the IpRanges database table and delete the addresses in the IP address range from the IpAddrs database table.
Syntax
All SBR Carrier nodes must be in management mode.
Options
Table 90: DelRange.sh Options
Option | Description |
---|---|
startaddr | Specifies the starting IP address of the range you want to delete. |
-a | Deletes all ranges. |
-z | Indicates whether zombie IP addresses were created. |
-h | Displays help for the DelRange.sh script. |
Example
The following example removes the address range starting with 192.168.0.0 from the B-GOLD pool and confirms the address range was deleted.
hadm$- ShowRanges.sh IpRanges: +-----------------+-----------------+-----------------+---------------+ | Pool | StartAddr | EndAddr | Count | +-----------------+-----------------+-----------------+---------------+ | B-GOLD | 0. 0. 0. 10 | 0. 0. 0. 15 | 6 | | B-GOLD | 192.168. 0. 0 | 192.168. 0. 14 | 15 | +-----------------+-----------------+-----------------+---------------+ hadm$- DelRange.sh 192.168.0.0 hadm$- ShowRanges.sh IpRanges: +-----------------+-----------------+-----------------+---------------+ | Pool | StartAddr | EndAddr | Count | +-----------------+-----------------+-----------------+---------------+ | B-GOLD | 0. 0. 0. 10 | 0. 0. 0. 15 | 6 | +-----------------+-----------------+-----------------+---------------+
Usage Notes
You are not prompted to confirm that you want to delete an address range when you execute the DelRange.sh command.
When you execute the DelRange.sh script, Steel-Belted Radius Carrier high availability transfers the addresses in the deleted range to the zombie pool to preserve their usage statistics.
Put your SBR Carrier servers into management mode before you execute DelRange.sh.
ShowRanges.sh
ShowRanges.sh
The ShowRanges.sh script enables you to display the starting and ending address of each IP address range, the number of addresses in the range, and the name of the pool to which a range belongs.
Syntax
Options
Table 91: ShowRanges.sh Options
Option | Description |
---|---|
-r | Orders the range primarily by range start/end addresses, and secondarily by pool name. |
-c | Orders the range primarily by count, and secondarily by range or pool name according to how the -r argument was specified. |
-h | Displays help for the ShowRanges.sh script. |
Example
The following example displays the output of the ShowRanges.sh script, which indicates that the B-GOLD IP address pool consists of one range of 15 IP addresses.
hadm$- ShowRanges.sh IpRanges: +-----------------+-----------------+-----------------+---------------+ | Pool | StartAddr | EndAddr | Count | +-----------------+-----------------+-----------------+---------------+ | B-GOLD | 192.168. 0. 0 | 192.168. 0. 14 | 15 | +-----------------+-----------------+-----------------+---------------+
Usage Notes
The output of the ShowRanges.sh script is sorted alphabetically by pool name, with ranges within an address pool being sorted numerically.
IP addresses in the output of the ShowRanges.sh script are padded with spaces to improve readability. Before you can use an IP address copied from the ShowRanges.sh output as an argument for another command (such as AddRange.sh, DelRange.sh, DelSession.sh, ShowAddrs.sh, or ShowSessions.sh), you must remove the embedded spaces.
KillZombieAddrs.sh
KillZombieAddrs.sh
A zombie address or pseudo-address is an entry in the IpAddrs database table that is not associated to any pool defined in the IpPools database table. A zombie pool is defined in the ipAddrs database table and given an ordinal number of 0 with the name “(z o m b i e)”. No other pool can have space-characters or lowercase characters in its name.
When you change pool settings, some addresses may be shuffled amongst different address pools. As a result, some addresses may become disassociated from any defined pool. These zombie addresses are held in the zombie pool (a temporary holding tank for addresses not currently assigned to a pool). The zombie pool preserves the LastUse timestamp on these addresses to support SSR aging strategy, which enables the addresses to be moved from one pool to another.
The KillZombieAddrs.sh script deletes all zombie addresses from the IpAddrs and IpRanges database tables and the zombie address pool. After completing the reconfiguration, if you do not want to preserve the usage statistics for the affected addresses, run the KillZombieAddrs.sh script to delete the IP address pools or ranges (Steel-Belted Radius Carrier high availability puts the affected IP addresses in the zombie address pool). The KillZombieAddrs.sh script also updates the IpPools database table to remove zombie address information.
You cannot remove selected addresses (while leaving others) with the KillZombieAddrs.sh script.
Syntax
All SBR Carrier nodes must be in management mode.
Options
Table 92: KillZombieAddrs.sh Options
Option | Description |
---|---|
-h | Displays help for the KillZombieAddrs.sh script. |
Example
The following example displays the output of the ShowPools.sh and ShowAddrs.sh scripts before and after the KillZombieAddrs.sh script is executed.
hadm$- ShowPools.sh -v IpPools: +-----------------+--------+---------------+--------+--------+--------+ | Name | Ord | Count | %Free | %Cache | %InUse | +-----------------+--------+---------------+--------+--------+--------+ | (z o m b i e) | 0 | 5 | 80.0 | 20.0 | 0.0 | | B-GOLD | 1 | 6 | 33.3 | 66.6 | 0.0 | +-----------------+--------+---------------+--------+--------+--------+ hadm$- ShowAddrs.sh IpAddrs: +-----------------+-----------------+-------+-------+---------------------+ | IpAddress | Pool | Cache | InUse | LastUse | +-----------------+-----------------+-------+-------+---------------------+ | 0. 0. 0. 10 | B-GOLD | 0 | 0 | 2005-11-02 14:08:36 | | 0. 0. 0. 11 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 12 | B-GOLD | 0 | 0 | 2005-11-02 14:08:47 | | 0. 0. 0. 13 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 14 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 15 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 192.168. 0. 0 | (z o m b i e) | 0 | 0 | 2005-11-02 14:06:42 | | 192.168. 0. 1 | (z o m b i e) | 0 | 0 | 2005-11-02 14:07:05 | | 192.168. 0. 2 | (z o m b i e) | 0 | 0 | 2005-11-02 14:07:33 | | 192.168. 0. 3 | (z o m b i e) | 0 | 0 | 2005-11-02 14:07:28 | | 192.168. 0. 4 | (z o m b i e) | 23 | 0 | 2005-11-02 13:52:49 | +-----------------+-----------------+-------+-------+---------------------+ hadm$- KillZombieAddrs.sh -v hadm$- ShowPools.sh IpPools: +-----------------+--------+---------------+--------+--------+--------+ | Name | Ord | Count | %Free | %Cache | %InUse | +-----------------+--------+---------------+--------+--------+--------+ | (z o m b i e) | 0 | 0 | ---- | ---- | ---- | | B-GOLD | 1 | 6 | 33.3 | 66.6 | 0.0 | +-----------------+--------+---------------+--------+--------+--------+ hadm$- ShowAddrs.sh IpAddrs: +-----------------+-----------------+-------+-------+---------------------+ | IpAddress | Pool | Cache | InUse | LastUse | +-----------------+-----------------+-------+-------+---------------------+ | 0. 0. 0. 10 | B-GOLD | 0 | 0 | 2005-11-02 14:08:36 | | 0. 0. 0. 11 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 12 | B-GOLD | 0 | 0 | 2005-11-02 14:08:47 | | 0. 0. 0. 13 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 14 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | | 0. 0. 0. 15 | B-GOLD | 24 | 0 | 0000-00-00 00:00:00 | +-----------------+-----------------+-------+-------+---------------------+
ShowAddrs.sh
ShowAddrs.sh
The ShowAddrs.sh script enables you to display the contents of the IpAddrs database table.
Syntax
Options
Table 93: ShowAddrs.sh Options
Option | Description |
---|---|
-a | If the -a argument is entered, information about IP addresses associated with all nodes is displayed. |
startaddr | If used without an endaddr argument, only information about the specified address is displayed. If used with an endaddr argument, only information about addresses in the specified address range is displayed. If used with the count argument but without an endaddr argument, only addresses within the startaddr...startaddr+count-1 are displayed. |
count | Specifies the number of addresses in the address range. |
endaddr | Specifies that only information about addresses in the address range between startaddr and endaddr is displayed. You cannot use the endaddr argument without a startaddr argument. |
-o | Displays the output as an unordered list. You can use this argument when the IpAddr table is very, very large and you want to maximize efficiency. If used with a startaddr argument, displays only that address only. If used with startaddr and endaddr arguments, displays only those addresses between the specified address range. If used with the count argument and an addr argument, only addresses within the startaddr...startaddr+count-1 are displayed. |
-h | Displays help for the ShowRanges.sh script. |
Example
The following example displays the output of the ShowAddrs.sh script, which lists the status of each IP address configured in the Steel-Belted Radius Carrier high availability database. The following example indicates that node 24 has four IP addresses in its cache, that node 23 has three IP addresses in its cache, and that one IP address is currently in use by node 24.
hadm$- ShowAddrs.sh IpAddrs: +-----------------+-----------------+-------+-------+---------------------+ | IpAddress | Pool | Cache | InUse | LastUse | +-----------------+-----------------+-------+-------+---------------------+ | 192.168. 0. 0 | B-GOLD | 24 | 0 | 2005-11-02 13:53:02 | | 192.168. 0. 1 | B-GOLD | 24 | 0 | 2005-11-02 13:52:47 | | 192.168. 0. 2 | B-GOLD | 24 | 0 | 2005-11-02 13:52:47 | | 192.168. 0. 3 | B-GOLD | 24 | 0 | 2005-11-02 13:52:47 | | 192.168. 0. 4 | B-GOLD | 23 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 5 | B-GOLD | 23 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 6 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 7 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 8 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 9 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 10 | B-GOLD | 0 | 24 | 2005-11-02 13:53:08 | | 192.168. 0. 11 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 12 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 13 | B-GOLD | 23 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 14 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | +-----------------+-----------------+-------+-------+---------------------+
Output Notes
Table 94: ShowAddrs.sh Output Fields
Field | Description |
---|---|
IPAddress | Identifies the IP address in dotted-decimal format (with space padding for readability). |
Pool | Identifies the pool using the IP address. |
Cache | Identifies the SSR node ID of the SBR Carrier server that has cached the IP address. A value of 0 indicates the address is not cached. |
InUse | Identifies the SSR node ID of the SBR Carrier server that assigned the IP address to a user. |
LastUse | If the address is in a cache (if the Cache field is not 0), identifies the date and time on which the IP address was last cached by a server. If the address is currently assigned to a user (if the InUse field is not 0), identifies the date and time on which the IP address was assigned to the user or on which the time stamp was updated. If the address is currently available (if the Cache and InUse fields are 0), identifies the date and time on which the IP address was freed at the end of a user session. |
Usage Notes
If SBR Carrier does not receive an Accounting-Stop message for an address in the InUse column, it does not return the address to the pool of available addresses immediately. SBR Carrier sweeps the Current Sessions Table periodically for stale sessions, where the StaleSessionTimeoutSecs setting in radius.ini specifies the period. To remove an address from the InUse column manually, use the DelSession.sh command.
BackupIP.sh
BackupIP.sh
The script enables you to create a backup of IP address pools in your SSR database. You can make multiple backup copies using this script. During the backup process, the values of Cache and InUse columns in the database are set to 0 in order to aid the restoration of the IP address pools after the database creation.
Syntax
Options
Table 95: BackupIP.sh Options
Option | Description |
---|---|
filename | Specifies the filename in which you want to backup IP address pools. |
-h | Displays help for the BackupIP.sh script. |
Example
The following example (1) lists the address pools configured for Steel-Belted Radius Carrier high availability and (2) creates a backup of the address pools in the filename called Backup1.
hadm@- ./ShowPools.sh IpPools: +--------------------+--------+------------+ | Name | Ord | Count | +--------------------+--------+------------+ | (z o m b i e) | 0 | 0 | | POOL1 | 4 | 1,000 | | POOL2 | 2 | 1,000 | | POOL3 | 3 | 500 | +--------------------+--------+------------+ Total Pools : 3 + 1 zombie pseudo-pool. Total Ranges: 3 + 0 zombie pseudo-ranges. Total Addrs : 2,500 + 0 zombie pseudo-addrs. hadm@- ./BackupIP.sh Backup1 Backup Process Started Backup Process Completed
Usage Notes
The backed up file can be restored using the RestoreIP.sh script.
RestoreIP.sh
RestoreIP.sh
The script enables you to restore the IP address pools from the backup file you created in your SSR database.
Syntax
Options
Table 96: RestoreIP.sh Options
Option | Description |
---|---|
filename | Specifies the filename that contains the backup. |
-h | Displays help for the RestoreIP.sh script. |
Example
The following example displays the output of the ShowPools.sh script before and after the RestoreIP.sh script is executed.
hadm@- ./ShowPools.sh IpPools: +--------------------+--------+------------+ | Name | Ord | Count | +--------------------+--------+------------+ | (z o m b i e) | 0 | 0 | | POOL1 | 4 | 1,000 | +--------------------+--------+------------+ Total Pools : 1 + 1 zombie pseudo-pool. Total Ranges: 1 + 0 zombie pseudo-ranges. Total Addrs : 1,000 + 0 zombie pseudo-addrs. hadm@- ./RestoreIP.sh Backup1 WARNING - Please confirm that DestroyDB.sh and CreateDB.sh scripts has been executed; OK <yes|no> yes SBRs must be offline or in ManagementMode; OK? <yes|no> yes Restoring Process Started Restoring Process Completed. hadm@- ./ShowPools.sh IpPools: +--------------------+--------+------------+ | Name | Ord | Count | +--------------------+--------+------------+ | (z o m b i e) | 0 | 0 | | POOL1 | 5 | 1,000 | | POOL2 | 6 | 1,000 | | POOL3 | 7 | 500 | +--------------------+--------+------------+ Total Pools : 3 + 1 zombie pseudo-pool. Total Ranges: 3 + 0 zombie pseudo-ranges. Total Addrs : 2,500 + 0 zombie pseudo-addrs.
Usage Notes
Executing the RestoreIP.sh script deletes the existing database, creates a new database, and restores the IP address pools from the backup file you created in your SSR database.
The values in the ord column may get changed after restoring the IP pools.
Place the SBR Carrier servers into management mode before you execute RestoreIP.sh.