Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Configuring Tracking Plug-Ins (SRC CLI)

 

You can perform the following tasks to configure tracking plug-ins:

Configuring Flat File Accounting Plug-Ins

Flat file accounting plug-ins write information to a file in a comma-separated format. The SRC software has a default flat file accounting plug-in instance called fileAcct. The fileAcct instance logs all possible attributes for 24-hour periods in the file var/acct/log.

Another item that you can configure for flat files is the names of the headers that appear in the file.

Use the following configuration statements to create flat-file accounting plug-in instances:

To create flat-file accounting plug-ins:

  1. From configuration mode, access the basic RADIUS accounting plug-in configuration. In this sample procedure, the plug-in called fileAcct is configured in the west-region SAE group.

  2. Configure the name and location of the file to which the SAE writes accounting information.

  3. Configure the name of the template that defines header names for attributes listed in accounting files.

  4. Configure the number of hours of information stored in each accounting file.

  5. Configure the fields that you want to record in the accounting file.

  6. (Optional) Verify your configuration.

Configuring Headers for Flat File Accounting Plug-Ins

When the SAE writes data to a flat file, it writes into the first line the headers that identify the attributes in the file. For example, in the following accounting file, the first line lists headers for all attribute fields in the file, and the following lines list the actual data in each field:

You can assign your own names to the headers that appear in the file. To do so, define the header names in a template, and then set up file accounting plug-in instances to use the template. The default template, FileAccounting.std, defines header names for all possible attributes. You can use the default template or create your own templates.

Use the following configuration statements to create a file accounting template:

To set up a file accounting template:

  1. From configuration mode, access the file accounting template configuration. In this sample procedure, the template called std is configured in the west-region SAE group.

  2. Define header names.

    For example:

  3. (Optional) Verify your configuration.

Configuring Basic RADIUS Accounting Plug-Ins

You can use basic RADIUS accounting plug-ins to send accounting information to an external RADIUS accounting server or to a group of redundant servers. To communicate with nonredundant servers, you need to create multiple instances of the plug-in.

Use the following configuration statements to configure RADIUS accounting plug-ins:

To set up basic RADIUS accounting plug-ins:

  1. From configuration mode, access the basic RADIUS accounting plug-in configuration. In this sample procedure, the plug-in called basicRadius is configured in the west-region SAE group.

  2. Configure the mode for load-balancing RADIUS servers.

  3. Specify if and when the SAE attempts to fail back to the default peer.

  4. (Optional) Configure the value of the NAS-IP attribute.

  5. Configure the time the SAE waits for a response from a RADIUS server before it resends the RADIUS packet.

  6. Configure the maximum number of unacknowledged RADIUS messages that the plug-in receives from the RADIUS server before it discards new messages.

  7. (Optional) Configure the source IP address that the plug-in uses to communicate with the RADIUS server. If you do not specify an address, the global default address is used.

  8. (Optional) Configure the source UDP port or a range of source UDP ports used for communication with the RADIUS server. If you do not specify a UDP port, the global UDP port is used.

  9. Configure the value of the User-Name attribute (RADIUS attribute [1]).

  10. Specify whether the SAE sends the MAC address of the subscriber in the Calling-Station-Id attribute.

  11. Configure the default peer, which is the RADIUS server to which the SAE sends packets for this plug-in.

  12. (Optional) Verify your configuration.

Configuring Flexible RADIUS Accounting Plug-Ins

Flexible RADIUS accounting plug-ins provide the same features as basic RADIUS accounting plug-ins. In addition, they allow you to customize RADIUS accounting packets that the SAE sends to RADIUS servers. You can specify which fields are included in the RADIUS accounting packets and what information is contained in the fields.

Use the following configuration statements to configure flexible RADIUS accounting plug-ins:

To set up flexible RADIUS accounting plug-ins:

  1. From configuration mode, access the flexible RADIUS accounting plug-in configuration. In this sample procedure, the plug-in called flexRadiusAct is configured in the west-region SAE group.

  2. Configure the mode for load-balancing RADIUS servers.

  3. Specify if and when the SAE attempts to fail back to the default peer.

  4. (Optional) Configure the maximum time the SAE waits for a response from a RADIUS server.

  5. Configure the time the SAE waits for a response from a RADIUS server before it resends the RADIUS packet.

  6. Configure the maximum number of unacknowledged RADIUS messages that the plug-in receives from the RADIUS server before it discards new messages.

  7. (Optional) Configure the source IP address that the plug-in uses to communicate with the RADIUS server. If you do not specify an address, the global default address is used.

  8. (Optional) Configure the source UDP port or a range of source UDP ports used for communication with the RADIUS server. If you do not specify a UDP port, the global UDP port is used.

  9. Configure the way the SAE handles errors.

  10. Configure the name of the RADIUS server to which the SAE sends packets for this plug-in.

  11. Configure the name of the RADIUS packet template that defines attributes for this plug-in.

  12. (Optional) Verify your configuration.

Configuring Custom RADIUS Accounting-Plug-Ins

The custom RADIUS accounting plug-ins provide the same functions as the flexible RADIUS accounting plug-ins, but are designed to deliver better system performance. To use a custom plug-in, you must provide a Java class that implements the service provider interface (SPI) defined in the RADIUS client library. Use this SPI to specify which fields and field values to include in RADIUS accounting packets. The RADIUS client library is part of the SAE core application programming interface (API).

See the documentation for the RADIUS client library in the SAE core API documentation on the Juniper Networks website at:

https://www.juniper.net/documentation/software/management/src/api-index.html.

For a sample implementation, see the SDK+AppSupport+Demos+Samples.tar.gz file on the Juniper Networks website at: https://www.juniper.net/support/products/src/index.html#sw. The application is located the following directory:SDK/plugin/java/src/net/juniper/smgt/sample/radiuslib/RadiusPacketHandlerImpl.java.

Use the following configuration statements to set up custom RADIUS accounting plug-ins:

To set up custom RADIUS accounting plug-ins:

  1. From configuration mode, access the custom RADIUS accounting plug-in configuration. In this sample procedure, the plug-in called customRadiusAct is configured in the west-region SAE group.

  2. Configure the name of the Java class that implements the RadiusPacketHandler interface in the RADIUS client library.

  3. Configure the URLs that identify a location from which Java classes are loaded when the plug-in is initialized.

  4. (Optional) Enable the plug-in to include the Acct-Status-Type attribute in a RADIUS accounting request packet.

  5. (Optional) Specify that a RADIUS authentication or accounting request must contain all mandatory RADIUS attributes before sending the request packet.

  6. Configure the mode for load-balancing RADIUS servers.

  7. Specify if and when the SAE attempts to fail back to the default peer.

  8. (Optional) Configure the maximum time the SAE waits for a response from a RADIUS server.

  9. Configure the time the SAE waits for a response from a RADIUS server before it resends the RADIUS packet.

  10. Configure the maximum number of unacknowledged RADIUS messages that the plug-in receives from the RADIUS server before it discards new messages.

  11. (Optional) Configure the source IP address that the plug-in uses to communicate with the RADIUS server. If you do not specify an address, the global default address is used.

  12. (Optional) Configure the source UDP port or a range of source UDP ports used for communication with the RADIUS server. If you do not specify a UDP port, the global UDP port is used.

  13. Configure the name of the RADIUS server to which the SAE sends packets for this plug-in.

  14. (Optional) From operational mode, verify your configuration.