Using aregcmd to Configure AR


To configure AR, you use the aregcmd command-line interface (CLI). Accessing this CLI allows you to enter commands directly into AR. When using aregcmd, you need to know a few important commands. First off, you can think of aregcmd as a modified UNIX command line. You can use the UNIX command cd to change directories, or in the case of AR, configuration objects. You can use the UNIX command ls to list the elements in your current location of AR. To back out of a configuration object, use "cd ..". You'll find that maneuvering through the hierarchy is not that difficult. The following section discusses commands that are more specific to AR.

aregcmd Syntax

We said that the aregcmd command when invoked from the Solaris command line accesses the CLI that AR commands are entered into. The commands entered into aregcmd are not case sensitive and just like the Cisco IOS provide some context-sensitive help and command completion using the Tab key. If the command element that you are requesting is unique, you have to enter only a portion of the command for it to execute. Also, the aregcmd commands are command-line order dependent. This means the arguments are interpreted based on their position on the command line. Also, when aregcmd is invoked without the f option or arguments, it starts in interactive mode and provides a prompt after logging in.

Some commands require you to enter data such as a description or some type of similar value. If you want to leave this option blank, you can do so by placing two single quotes. If an entry has spaces in the value you are entering you must quote the value.

[1] The aregcmd command syntax is

[View full width]

aregcmd [-C <clustername>] [-N <adminname>] [-P <adminpassword>] [-f <scriptfile>] [-v] [-q] [-p] [-n] [<command> [<args>]]

-C specifies the name of the cluster to log into by default

-N specifies the name of the administrator

-P specifies the password

-f specifies a file that can contain a series of commands

-v specifies verbose mode

-q turns off verbose mode

-p specifies prefix mode

-n turns off prefix mode

Note, the verbose (-v) and prefix (-p) modes are on by default when you run aregcmd interactively (not running a command from the command line or not running commands from a script file). Verbose and prefix modes are off otherwise.

When you include a command (with the appropriate arguments) on the command line, aregcmd runs only that one command and saves any changes.

Categories of aregcmd Commands

The aregcmd CLI commands are entered after you are logged onto the AR cluster. To log in to the cluster, you actually invoke the aregcmd CLI. The commands can be grouped into the categories discussed in the following sections.

Navigation Commands

These commands navigate within the Cisco AR hierarchy; commands include cd, ls, pwd, next, prev, filter, and find. We discuss the first three in detail.

The cd and ls commands were already discussed; however, let's recap. The cd command simply allows you to move through the configuration hierarchy. The structure of AR is similar to a directory tree. You would use the cd command to move from one configuration object in the hierarchy to another.

When you move through the configuration hierarchy, you can use the ls command to list the contents of the current level. It is very similar to the UNIX command. If you enter the command followed by a path, it lists elements in the path you specify. No path lists the current locations objects. Optionally, you can add R to the ls command to list all the objects in the current location in the hierarchy, as well as all those below it. This can be handy when you need to gather more information.

The pwd command works just like the UNIX pwd command. This prints the working directory or the absolute path that you are in within the configuration hierarchy.

Object Commands

These commands add or delete objects; commands include add and delete. These commands are pretty simple really. If you wanted to add an administrator to AR, you would simply navigate to the correct configuration object, in this case Administrators. In the Administrators level, you simply use the add command to add the administrator. You can see this in Example 15-1:

Example 15-1. Using the add Command
 [ //localhost ]     LicenseKey = 6N16-SJIV-61RI-VU1G (expires in 65 days)     Radius/     Administrators/  Change to the Administrators level. [ //localhost/Administrators ]     Entries 1 to 1 from 1 total entries     Current filter: <all>     admin/  Note there is only one Admin  Using add to create the new user. Added bcarroll  AR confirms that the admin was added.  Use the the new admin is present in the Administrator level. 

Property Commands

These commands change the value of properties; commands include set, unset, and insert. Property commands are also pretty straightforward. You would use the set command to set parameters such as the default session manager.

Server Commands

These commands manage the server itself; commands include save, validate, start, stop, reload, status, stats, and trace. The save command commits the changes you have made to the configuration database of AR. It does not, however, update the running server so you use the reload command to do that. The validate command validates the configuration of AR. If AR finds an inconsistency, it displays it. The start, stop, and status commands deal with the RADIUS service. The stats command gives global statistics for RADIUS.

You can see an example of the stats command in Example 15-2.

Example 15-2. Using the stats Command
  stats Global Statistics for Radius: serverStartTime = Thu Feb 19 22:34:24 2004 serverResetTime = Thu Feb 19 22:34:25 2004 serverState = Running totalPacketsInPool = 1024 totalPacketsReceived = 0 totalPacketsSent = 0 totalRequests = 0 totalResponses = 0 totalAccessRequests = 0 totalAccessAccepts = 0 totalAccessChallenges = 0 totalAccessRejects = 0 totalAccessResponses = 0 totalAccountingRequests = 0 totalAccountingResponses = 0 totalStatusServerRequests = 0 totalAscendIPAAllocateRequests = 0 totalAscendIPAAllocateResponses = 0 totalAscendIPAReleaseRequests = 0 totalAscendIPAReleaseResponses = 0 totalUSRNASRebootRequests = 0 totalUSRNASRebootResponses = 0 totalUSRResourceFreeRequests = 0 totalUSRResourceFreeResponses = 0 totalUSRQueryResourceRequests = 0 totalUSRQueryResourceResponses = 0 totalUSRQueryReclaimRequests = 0 totalUSRQueryReclaimResponses = 0 totalPacketsInUse = 0 totalPacketsDrained = 0 totalPacketsDropped = 0 totalPayloadDecryptionFailures = 0  

Application Commands

These commands allow user access to the application; commands include login, logout, exit, quit, and help. These commands are pretty much self explanatory. If you recall, during the installation you could install the AR server only, and the CLI could be installed on a separate machine. You can be logged in to one AR and use the login command to access another AR cluster. Remember that a cluster is nothing more than a way to specify an AR server.

Session Management Commands

These commands query the server about currently active user sessions or release active sessions; commands include query-sessions and release-sessions.




Cisco Access Control Security(c) AAA Administrative Services
Cisco Access Control Security: AAA Administration Services
ISBN: 1587051249
EAN: 2147483647
Year: 2006
Pages: 173

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net