Previous Topic: Import Custom Application Mapping RulesNext Topic: Error Messages for Importing Rules


Import Application Mapping Rule Updates

You can create application mapping rules of a single type by importing a properly formatted .csv file. Example .csv files are provided, which show the fields to include in each type of import file.

Follow these steps:

  1. Log in to the NFA console server or stand-alone server as a user who is a member of the Administrators group.
  2. Get the rule ID for the existing rules that you want to update.
    1. Open a command prompt and go to the directory that contains the .csv file. The following command shows the default location:
      cd <install_path>\reporter\racmd
      

      where:

      <install_path> is the product installation path. The product installation path is C:\CA\NFA by default.

      racmd is the directory that contains the .csv import file. The file is written to this directory when you install the product.

    2. Export the rule definitions by entering the following command:
      racmd -export csv
      

      The export file is named getapplicationmapping_<timestamp>.csv. The file is located in the current directory.

      The command returns the status message: Creating csv file. When the operation is complete, the command prompt reappears.

    Note: Rule IDs are specific to the current stand-alone or NFA console system.

  3. Open the export file in a spreadsheet or text editor.

    The export file contains a line for each current application mapping rule, which begins with the rule ID. The line also includes extra information that you can ignore.

  4. Locate and make a note of the ID for each rule that you want to edit.
  5. Prepare the import file:
    1. Open a copy of the example import file for your rule type:
      • All (ToS) rule - tos.csv
      • Host rule with a specified protocol - server-protocol.csv
      • Host rule without a specified protocol - server.csv
      • Subnet rule - subnet.csv
      • NBAR2 rule - nbar2.csv
    2. Add the appID column and rule values, as shown in the following examples:

      Example: First two lines in an import file to add NBAR2 rules

      name,desc,newPort,applicationid
      youtube,Youtube video streaming,65035,82
      

      where:

      name = Rule name
      desc = Rule description
      newPort = Destination port
      applicationID = NBAR2 application ID

      Example: First two lines in an import file to update NBAR2 rules

      appID,name,desc,newPort,applicationid
      35,YouTube,Youtube video streaming,65035,82
      

      where:

      appID = Rule ID

      If you update NBAR2 application mapping rules, do not change the NBAR2 application ID value. If you change this value, the rule will not function as expected.

    3. Other than adding the appID column and values, follow the import mapping guidelines listed in step 4 of Import Custom Application Mapping Rules.
    4. Save the import file.

      We recommend that you save the import file to the same directory that contains the import command: <install_path>\reporter\racmd.

  6. Go to the directory that contains the .csv file:
    cd <install_path>\reporter\racmd
    

    where:

    <install_path> is the product installation path. The product installation path is C:\CA\NFA by default.

    racmd is the directory that contains the .csv import file. The file is written to this directory when you install the product.

  7. Enter the following command:
    racmd -import nbar2_updated.csv
    

    where:

    nbar2_updated.csv is the name of the update file that you just created. If you have moved the .csv file, include the fully qualified path (the path and file name).

    If any errors occur during the import, error messages are shown. If no message is returned, the import succeeded with no problems.

  8. (Optional) Verify that the updated rules are listed correctly on the Applications Definitions page:
    1. Select Administration from the NFA console menu.

      The Administration page opens.

    2. Select Application Definitions in the Administration menu.

      The Application Definitions page opens.

  9. (Optional) Verify that the application traffic is labeled correctly in the following locations: