![]() |
Using QoS Policy Manager 2.1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Distributing Policies to Network Devices
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Table of ContentsDistributing Policies to Network DevicesUnderstanding Policy Distribution
Changing Distribution Manager Configuration Settings Distributing Policies and QoS Configurations Stopping a Distribution Job Resuming a Stopped Distribution Job Restoring a Database Version Verifying Device Configuration Viewing the Configuration Commands for a Device Reading the Distribution Manager Logs Creating Policy Distribution Reports Deploying Distribution Jobs from an External Program QPM Naming Conventions Distributing Policies to Network DevicesUse the Distribution Manager application to distribute policies to network devices. These sections describe the use of Distribution Manager, and other tasks associated with distribution policies:
Understanding Policy DistributionYou use the Distribution Manager to distribute the device configurations and QoS policies in a database to the network. Each distribution event is called a "job." QPM translates your policies into device commands and enters the commands through the device's command line interface (CLI). Some policies require the creation of access control lists (ACLs), others do not. Through QPM, you can inspect the commands that will be used to configure the devices. During policy distribution, you can view device log messages as QPM configures each device, so that you can identify configuration successes and failures. You can configure up to three ACL ranges for the ACLs created by QPM. You can also configure the Distribution Manager to distribute a job to output files (for IOS devices) as well as to the network devices. For details about Distribution Manager configuration options, see Changing Distribution Manager Configuration Settings. You can restore a previous version of a specific database that was distributed to the network, and then edit it and redistribute it. For details, see Restoring a Database Version. You can verify the device configuration to check whether the policies configured on the devices are consistent with the policies defined in your QoS database. For details, see Verifying Device Configuration. Changing Distribution Manager Configuration SettingsYou can change various Distribution Manager behaviors by setting configuration options.
ProcedureStep 1 In the Distribution Manager, select Devices>Options. Distribution Manager opens the Options dialog box. Step 2 Change the options as desired. Table C-2 describes the settings you can configure for Distribution Manager. Distributing Policies and QoS ConfigurationsWhen you have finished creating your policies and QoS configurations in the QoS database, you can distribute those settings to network devices. The Apply command distributes the QoS configuration only to those devices in the selected job for which the configuration has changed. The Apply to All command distributes the QoS configuration to all the devices of the selected job, regardless of their status (Not-Applied, Unchanged, and so on). The status of each device is changed to Not-Applied, and then the deployment process starts. The Apply command applies (distributes) the first valid Not-Applied job in the tree view to the network, if there is one. If there is no valid Not-Applied job, QPM asks you to select the database from which to create the job, and then applies the job without allowing you to inspect the job contents. The job contains the configuration commands required to deploy your QoS policies and settings to the network. The Apply to All command generates an apply process to all the devices of the selected job, regardless of their status (Not-Applied, Unchanged, and so on). The status of each device is changed to Not-Applied, and then the deployment process starts. Because the deployment is incremental, if nothing has been changed on the device and the database has not been changed, no configuration will be deployed.
Before You BeginMake sure that you saved your changes to the database using Policy Manager. ProcedureStep 1 In the Distribution Manager, select Devices>Create Job to create a job from the QoS database. Distribution Manager opens the Create Job dialog box. Step 2 In the Create Job dialog box, select the database whose changes you want to apply to the network and click OK. Distribution Manager creates a job from the database and adds it to the top of the job list in the all jobs tree view pane. The job contains the configuration commands required to deploy your QoS policies and settings to the network. Step 3 Select the job in the tree view pane. The devices defined in the job are shown in the list view to the right of the tree. Step 4 Distribute the job:
QPM applies the configuration changes defined in the job to the devices. You can monitor the progress of the job in the list view; the device status changes as QPM configures the devices. See Table 8-1 for information about device status. Table 8-1: Distribution Manager Job and Device Statuses
Tips
Related Topics
Stopping a Distribution JobYou can stop the distribution of the job that is currently running. ProcedureStep 1 Distribution Manager stops the job after completing all device configurations that are in progress. If all devices in the job are in the process of being configured, then the job is completed. Related TopicsResuming a Stopped Distribution JobYou can resume the distribution of the last job that you stopped. ProcedureStep 1 Distribution Manager reapplies the configuration changes defined in the job to the devices. You can monitor the progress of the job in the list view; the device status changes as Distribution Manager configures the devices. See Table 8-1 for information about device status. Related Topics
Restoring a Database VersionYou can restore a previous version of a specific database that was distributed to the network. You can edit the restored database and then redistribute it, or you can restore and redistribute the database in a single operation. This feature is very useful when unexpected errors occur as a result of the deployment of a database and there is an immediate need to go back to a previous version of that database. Before You BeginEnsure that you have enabled the Restore to Current option in the Distribution Manager Options dialog. See Table C-2 for more details of this setting. ProcedureStep 1 In the Distribution Manager, select the job you want to restore to the current database version. Step 2 Step 3
Verifying Device ConfigurationYou can verify the device configuration to check whether the policies configured on the devices are consistent with the policies defined in your QoS database. If CLI changes are made on the device after deployment, there might be a mismatch between the database and the device configuration. During verification a DNS resolution check is done for all DNS names that are defined in the policy filter definition. Verification is carried out on the last job that was created. The verification process contains two steps: DNS resolution check, and device configuration check. ProcedureStep 1 QPM verifies the configuration on each device in the database, and displays the verification status, Matched or Mismatched. You can verify a job before creating it by selecting Devices>Verify Device Configuration when there are no valid Not-Applied jobs in the tree view. Devices>Verify Device Configuration always verifies the first valid Not-Applied job, if there is one. If there is not a valid Not-Applied job, the command prompts you to choose a database from which to create the job, and then verifies the newly created job. Viewing the Configuration Commands for a DeviceYou can view the device commands that Distribution Manager will use to configure the devices before and after applying a distribution job. Viewing the commands can help you understand the QoS device commands and their relationship to QPM fields. ProcedureStep 1 Select a job and then, in the list pane, select the device for which you want to see the device configuration commands. Step 2 Select Device>View Commands. Distribution Manager opens the View Commands dialog box with the command stream that will be sent to the device if you apply the job. You can use these commands in the View Commands dialog box:
Related TopicsReading the Distribution Manager LogsDistribution Manager creates logs for the QPM system, for each job that is run, and for each device that it attempts to configure. These logs are shown in the log pane. If the log pane is not visible, select View>Log. Table 8-2: Distribution Manager Logs
Audit Trail of User LogonDistribution Manager maintains an audit trail of user logon for security purposes, enabling the Network Manager to keep track of who made configuration changes.
Figure 8-1: Distribution Manager Audit Trail of User Logon
Distribution Manager Log MessagesThe messages can have these severities: Informational MessagesThese are the informational messages in alphabetical order: Configured successfully. Explanation The device has been successfully configured with the policy and configuration changes defined in the job. Database has been saved. Explanation The database was saved in Policy Manager. The device device-ID in the database-name database was not reachable while upgrading the database. Explanation This device was not reachable while converting the database from QPM version 1.0 to QPM version 1.1 format. The software version, model, and interface types for the device were not verified. These properties were changed to default values in the converted database. Ensure that the device is online and reachable and have QPM verify the device information. Distribution Manager is connected to the QoS Manager Service. Explanation Distribution Manager is communicating with the QoS Manager service. Distribution Manager is disconnected from the QoS Manager Service. Explanation Distribution Manager is not communicating with the QoS Manager service. Job number cancelled by user. Explanation You cancelled the indicated job. Job number ended with status name. Explanation The indicated job has ended as described by the status. See Table 8-1 for a description of job statuses. Job number has started. Explanation The indicated job is now running. Job number was created for database name. Explanation The indicated job was created based on the changes in the indicated database. New database has been saved. Explanation A new database was saved in Policy Manager. Policy Manager is connected to the QoS Manager Service. Explanation Policy Manager is communicating with the QoS Manager service. Policy Manager is disconnected from the QoS Manager Service. Explanation Policy Manager is not communicating with the QoS Manager service. Error MessagesThese are the error messages: Device name is not a Cisco device. Explanation QPM does not support the indicated device. Action Use Policy Manager to remove the device from the database. Cannot identify policy action. Explanation The policy action is not within the range of commands for this device. Action Report this error to Cisco technical support. Configuration error, interface does not exist on the device. Explanation The indicated interface does not exist on the specified device. Action Use Policy Manager to remove the interface from the database. Configuration error, missing device name. Explanation The device name was missing while building the configuration. Action Use Policy Manager to add the device's IP address or host name to the device's QPM properties. Custom queue byte count exceeds the queue byte count limit. Explanation The specified byte size of the custom queue exceeds the maximum supported limit. Action Use Policy Manager to specify a reduced byte count. Error in building the configuration. Explanation The system was unable to build the configuration. Action Check for other error messages and resolve the indicated problems and try again. If that does not resolve the problem, contact Cisco technical support. Failed to find message ID number in message.ini. Explanation The system could not find this message in the message file. Action Report this error to Cisco technical support. Failed to resolve DNS in name policy. Explanation There is a problem with the DNS resolving host names to their IP addresses. Action If there is a problem with the DNS server, try again later. If the URL that you specified does not exist, you should provide a valid URL. Frame-Relay Traffic Shaping configuration in interface name requires a rate value. Explanation A rate value was not specified during FRTS configuration. Action Use Policy Manager to specify a rate value less than or equal to the interface rate. Incomplete policy-name policy statement in database. Explanation Information is missing from the indicated policy in the database. Action Use Policy Manager to correct the policy. Invalid precedence value: value. Explanation A policy contains this value, which is not an acceptable IP precedence. Action Report this error to Cisco technical support. Invalid priority queue level: number. Explanation The priority queue number does not fit within the priority queuing range. Action Report this error to Cisco technical support. Invalid trust value: number. Explanation The configured trust value for the interface is invalid. Action Use Policy Manager to reconfigure the trust value. Job ID number is invalid. Explanation There is no job with the indicated ID number. Action Change the job number to the correct one and try again. Missing parameter in name policy. Explanation The indicated policy is missing one or more parameters. Action Use Policy Manager to correct the policy. No SNMP connection to device. Explanation The system was unable to make an SNMP connection to the indicated device. Action Use Policy Manager to check the SNMP community string in the device's QPM properties. Out of ACL resources for name policy. Explanation There are insufficient resources for the indicated policy on the device. Action Check the device's ACLs to see if there are any that you can delete. If you cannot delete any ACLs, then you cannot apply additional policies to the device. Out of custom queue-list resources. Explanation There are insufficient resources for your custom queuing policies on the device. Action Use Policy Manager to remove some of your custom queuing policies. Try to consolidate policies if possible. Out of priority-list resources. Explanation There are insufficient resources for your priority queuing policies on the device. Action Use Policy Manager to remove some of your priority queuing policies. Try to consolidate policies if possible. Port number in name policy with name protocol should be between 1-65535. Explanation In the NBAR Port Mapping table, the specified protocol for the specified policy has an invalid port number. Action Use Policy Manager to specify a port number within the permitted range. Rate parameter in name policy at name interface is higher than the interface rate. Explanation The target average rate for traffic that the policy covers must not exceed the interface rate. Action Use Policy Manager to specify a rate less than or equal to the interface rate. Telnet communication initialization failed: device, host. Explanation Telnet could not make contact with the device or host. Action Ensure the host is powered on and running correctly, and that the machine running the QoS Manager service is running correctly and connected to the network, and try again. Telnet error: device, host. Explanation The indicated Telnet communications error occurred. This error is returned from the Telnet program. Action Try to resolve the error. See the documentation for Telnet for help. Wrong parameter in name policy at name interface. Explanation One of the parameters for the specified interface is invalid. Action Use Policy Manager to check the parameters defined for the interface. Related TopicsCreating Policy Distribution ReportsYou can create reports of policy distributions and Distribution Manager system messages. You can then print or save the reports to maintain records of system usage. Table 8-3 lists the reports available and the commands for creating them. The reports are created in HTML and displayed in your default web browser. Use the web browser's Print and Save commands to print or save the reports. Table 8-3: Distribution Manager Reports
Tips
Deploying Distribution Jobs from an External ProgramYou can use the distribute_policy.exe program to automate distribution job creation and execution. Using distribute_policy.exe, you can create a program that runs a distribution job without you having to start Distribution Manager manually. You can then use a scheduling program to automate your distribution program. distribute_policy.exe-d database-name -u user-name -m domain-name [ -p password ] [ -b [wait-time-sec ] ] [ -h host-name ] Syntax Description
Return Codes and LogsTable 8-4 describes the codes returned when you run distribute_policy.exe. Use Distribution Manager to view logs for the jobs. Table 8-4: distribute_policy.exe Return Codes
ExamplesThese are examples of using distribute_policy.exe to create and run a job from a QoS database. Example 8-1: Run Job on Same Machine as QoS Manager and Retry Distribute the Edge database using the QPM_User user account with the password secret12, and retry indefinitely at 1 second intervals if another job is running. Run the command from the same machine as the QoS Manager service (machine is called QPM-Main). distribute_policy.exe -d Edge -u QPM_User -m QPM-Main -p secret12 -b Example 8-2: Run Job on Same Machine as QoS Manager and Retry after Five Minutes Distribute the Edge database using the QPM_User user account with the password secret12, and wait five minutes before retrying distribution if another job is running. Run the command from the same machine as the QoS Manager service (machine is called QPM-Main). distribute_policy.exe -d Edge -u QPM_User -m QPM-Main -p secret12 -b 300 Example 8-3: Run Job on Remote Machine and Retry Distribute the Core database using the krj user account in the ENG domain with the password secret12, and retry indefinitely at 1 second intervals if another job is running. QoS Manager runs on a machine named POLICY-PC, which is not the machine on which you are running the command. distribute_policy.exe -d Core -u krj -m ENG -p secret12 -b -h POLICY-PC Example ScriptYou can also run a script to execute distributions as required. The following example is a PERL script that executes the distribute_policy command with two different databases alternately. The first database is deployed every day at 06:00, and the second database is deployed every day at 18:00. The script also demonstrates a possible use of the status code returned by the distribute_policy. use Time::localtime;
$nextDeploy;
#get current hour to decide which database to deploy first.
$currentHour = localtime->hour();
if ($currentHour < 6){
$nextDeploy = "Day";
}
else{
$nextDeploy = "Night";
}
STARTLOOP:
#reset the status code scalar for the current iteration.
$? = -1;
#read current hour.
$hour = localtime->hour();
if ($hour == 6 && $nextDeploy eq "day"){
\Qdistribute_policy -d DataBase1 -u QPM_User -m HOST-MACHINE\Q;
$nextDeploy = "Night";
}
elsif ($hour == 18 && $nextDeploy eq "Night"){
\Qdistribute_policy -d DataBase2 -u QPM_User -m HOST-MACHINE\Q;
$nextDeploy = "Day";
}
if ($? > -1){
#Divide the returned status code by 256 because the code returned from
external commands is multiplied by 256
$? = $? >>8;
print "return value: $?\n";
if ($? == 0){
print "The job was created successfully.\n";
}
if ($? == 1){
print "Cannot connect to \"QoS Manager\".\n";
}
}
sleep 1;
goto STARTLOOP
#End of script.
You can use this script, or a similar one, to deploy one database containing policies to handle heavy traffic load on the devices during day time, and a different database containing other policies for night hours.
Related Topics
QPM Naming ConventionsNaming conventions to configure class-map, route-map, policy-map, and frame-relay-map to the devices must be maintained as much as possible. QPM uses the following naming conventions:
If a name is already used, a counter is concatenated to the end of the name. For policies created from a device group, no duplication of resource's naming is done because the policy name and content of the policy are the same.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|