Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

How to Use the Juniper BNG CUPS Controller Utility Commands

SUMMARY After you have installed Juniper BNG CUPS Controller (BNG CUPS Controller), you can perform numerous administrative functions.

Access Juniper BNG CUPS Controller Utility Commands

You can use the BNG CUPS Controller utility script (dbng) to administer the application and to access the CLI that you use for configuring operations. The BNG CUPS Controller installation places the utility script in /usr/local/bin.

The dbng utility script performs the tasks you need to do to manage BNG CUPS but masks the complexity of the kubectl command. This masking of the kubectl commands simplifies your administrative duties.

The dbng utility script uses the Kubernetes kubectl utility commands to do the following:

  • Create and delete objects.
  • Conduct interactive sessions with pod containers.
  • Display the status of the BNG CUPS Controller objects.

Table 1 lists the commands that you can invoke with the dbng utility script and describes the action that each command initiates.

Table 1: BNG CUPS Controller Utility Script Commands

Command Name

Action

sudo -E dbng clean [--docker] [--release software-release] [--dry-run] [--uninstall]

Clean up unneeded releases and Docker cache. To run this command, you need sudo root privileges.

This command offers the following options:

  • docker—Only cleans the local Docker cache, all other files remain.

  • release software-release—Specify a release to clean or clean all possible releases.

  • dry-run—Identifies releases and docker images for removal and prints them to console. This command does not actually clean any releases or the Docker cache.

  • uninstall—Uninstalls all BNG CUPS Controller materials from the disk. The command does not effect the running application.

dbng cli --context context-name [-p|--pipe]

Gives you access to the CLI that you can use to configure BNG CUPS Controller features.

This command offers the following options:

  • context context-name—The Kubernetes context name. Enter the name of the context.

  • pipe—Allows you to pipe input into the command.

dbng contexts [-o|--output json]

Displays the available contexts for control with BNG CUPS Controller.

This command offers the following options:

  • contexts—Lists the available contexts.

  • output json—Allows you to request the output in JSON format.

sudo -E dbng cpi add --context context-name --version software-release label

Deploys a new control plane instance (CPi) pod. To run this command, you need sudo root privileges.

This command offers the following options:

  • context context-name—The Kubernetes context name. Enter the name of the context.

  • version software-release—The software release for the new CPi pod. Enter a release.

  • label—Specify a label that is used for CPi commands.

sudo -E dbng cpi rm --context context-name label

Removes a control plane instance (CPi) pod. To run this command, you need sudo root privileges.

This command offers the following options:

  • context context-name—The Kubernetes context name. Enter the name of the context.

  • label—Specify the CPi's label.

dbng ip --context context-name [-o| --output json] [--detail]

Displays the IP addresses of every service with an external IP address.

This command offers the following options:

  • context context-name—The Kubernetes context name. Enter the name of the context.

  • output json—Allows you to request the output in JSON format.

  • detail—Displays detailed IP information.

sudo -E dbng link --version software-release --context context-name

Links a cluster to a specific software version. To run this command, you need sudo root privileges.

This command offers the following options:

  • version software-release—Specify the software release to link to the cluster specific repository.

  • context context-name—The Kubernetes context name to link to the software release. Enter the name of the context.

sudo -E dbng rename-context --context context-name --new-name new-name

Renames a context. Does not effect the currently running BNG CUPS Controller on the cluster. To run this command, you need sudo root privileges.

This command offers the following options:

  • context context-name—The old Kubernetes context name to rename. Enter the name of the context.

  • new-name new-name—The new name of the Kubernetes context (cluster name). Enter a new name.

sudo -E dbng restart --context context-name [--force] [--wait] service-name

Restarts a specific BNG CUPS Controller service. To run this command, you need sudo root privileges.

This command offers the following options:

  • context context-name—The Kubernetes context name on which to restart the service. Enter the name of the context.

  • force—Forcibly restart the micro-service without validating that it can be safely restarted.

  • wait—Wait for the new pod to fully come up.

  • microservice-name—Enter the microservice name to restart.

sudo -E dbng rollout --context context-name [--service service name --version software-release]

Upgrade a BNG CUPS Controller service. To run this command, you need sudo root privileges.

This command offers the following options:

  • context context-name—The Kubernetes context name on which to roll out the new software version. Enter the name of the context.

  • sevice service name—The microservice name to roll out. Enter the microservice's name.

  • version software-release—The software release to roll out. Enter the software release number.

sudo -E dbng setup --context context-name [--bbecloudsetup] [--update] [--ssh ip-address:port-number]

Sets up the BNG CUPS Controller application as part of the installation process. To run this command, you need sudo root privileges.

This command offers the following options:

  • context context-name—The Kubernetes context name on which to run startup. Enter the name of the context.

  • bbecloudsetup—Use the values for a BBE Cloudsetup deployed cluster. This option is only valid if you are running a BBE Cloudsetup deployed cluster.

  • update—You will only be prompted for missing values during setup.

  • ssh ip-address:port-number—Enables SSH. Enter the SSH IP address and port number. The IP address must be the IP address that you SSH to. The IP address can also be a DNS name.

dbng shell --context context-name [-p|--pipe] microservice-name

Connects you to a running microservice.

This command offers the following options:

  • microservice-name—The name of the microservice that you want to connect to.

  • context—The Kubernetes context name. Enter the name of the context.

  • pipe—Allows you to pipe input into the command.

sudo -E dbng start --context context name

Starts a specific BNG CUPS Controller service. To run this command, you need sudo root privileges.

This command offers the following option:

  • context context name—The Kubernetes context name on which to start a BNG CUPS Controller. Enter the name of the context.

dbng status --context context name [-o|--output json] [--terse] [--detail]

Displays the current status of the BNG CUPS Controller services.

This command offers the following options:

  • context context name—The Kubernetes context name. Enter the name of the context.

  • output—Allows you to request the output in JSON format.

  • terse—Displays a summarized output of the health of the system.

  • detail—Displays information for each pod.

sudo -E dbng stop --context context name [--now]

Stop all BNG CUPS Controller services. To run this command, you need sudo root privileges.

This command offers the following option:

  • context context name—The Kubernetes context name on which to stop a BNG CUPS Controller. Enter the name of the context.
  • now—Stops the BNG CUPS Controller immediately, instead of waiting for the two minute delay.

dbng storage --context context-name [-o|--output json] [--terse]

Provides the status of the storage drivers for BNG CUPS Controller.

This command offers the following options:

  • context context-name—The Kubernetes context name. Enter the name of the context.

  • output—Allows you to request the output in JSON format.

  • terse—Displays a summarized output of the storage health.

sudo -E dbng unlink --context context-name

Unlink components associated with the context. To run this command, you need sudo root privileges.

This command offers the following options:

  • context context-name—The Kubernetes context name to uninstall. Enter the name of the context.

dbng version [--context context name] [-o|--output json] [--detail] [--compare] [--release release-number]

Displays the version of the following:

  • Every running microservice in the BNG CUPS Controller instance.

  • The BNG CUPS Controller utility.

  • All available BNG CUPS Controller software releases on the system.

This command offers the following options:

  • context context name—The Kubernetes context name. Enter the name of the context.

  • output—Allows you to request the output in JSON format.

  • detail—Displays all available software versions.

  • compare—Compares the designated release to the currently running BNG CUPS Controller release.

  • release release-number—Displays microservice information for the requested release.

Use the following general syntax to issue a command:

  • For a short option:

  • For a long option:

To display a list of available commands with a brief description, use either the h or help option:

To display the options for a specific command:

Start or Stop BNG CUPS Controller Services

Use the dbng utility script to start or stop all BNG CUPS Controller services.

  • To start all BNG CUPS Controller services:

  • To stop all BNG CUPS Controller services:

Check the Status of BNG CUPS Controller Services

Use the dbng status utility script to check the status of each BNG CUPS Controller service (functional component) listed inTable 2. The status shows whether a service is running, has exited, or has not started. It also displays the service name on the Kubernetes pod. You can compare uptime for the services to quickly see whether any service has been restarted.

Table 2: Services Displayed with the Status Command

Service

Description

cpi-label The BNG CUPS Controller instance service—Implements the subscriber management control plane, which includes control plane protocols; authentication, authorization, and accounting (AAA); and supporting infrastructure.

The label is defined by you, when you run the dbng cpi add command.

scache The state cache service—Provides an on-cluster backing storage for subscriber service states generated by the cp service. Use this service for state recovery in the event of a restart of the cp service.

To check the status of controller services, display the service status:

For example:

Juniper BNG CUPS Logging

Juniper BNG CUPS uses the Broadband Edge (BBE) Event Collection and Visualization application for logging purposes.

BBE Event Collection and Visualization collects syslog events and records them in a time-series database. You can view the recorded events through the BBE Event Collection and Visualization Dashboard. The BBE Event Collection and Visualization Dashboard is a GUI-based visualization tool that enables you to view recorded events according to a defined filter, which can be within a specific time range. The Dashboard also provides powerful search and visualization tools through which you can correlate recoded events from multiple sources. To install BBE Event Collection and Visualization, see Broadband Edge Event Collection and Visualization Installation Guide.

Uninstall and Remove BNG CUPS Controller

Use the dbng utility script to uninstall the BNG CUPS Controller configuration. The unlink command reverts the actions you performed when setting up BNG CUPS Controller. This script returns BNG CUPS Controller to the state it was in immediately after you installed the application but before you did any setup configuration.

To uninstall BNG CUPS Controller:

  1. On the jump host where you installed BNG CUPS Controller, run the stop command.
  2. Run the unlink command.
  3. Run the clean command.

How to Access BNG CUPS Controller Configuration and Operational Commands

Access the BNG CUPS Controller CLI

You use the BNG CUPS Controller command-line interface (CLI) to configure BNG CUPS Controller and to monitor its operations. This section describes how to access the CLI.

To access the BNG CUPS Controller CLI prompt:

  1. Enter the following dbng utility script command.
  2. Enter a question mark to see the available top-level CLI commands. This command yields a subset of the Junos OS top-level commands.

    The CLI available for BNG CUPS Controller is a subset of the Junos OS CLI. For an overview of Junos OS CLI basics, see Day One: Exploring the Junos CLI. For more detailed information, see the CLI User Guide.

Access and Use CLI Configuration Statements

You use configuration statements to configure, set, manage, and monitor BNG CUPS Controller properties.

To configure BNG CUPS Controller components:

  1. Use the BNG CUPS Controller utility command dbng cli to access the top-level CLI prompt.
  2. Access configuration mode to configure BNG CUPS Controller and the information that BNG CUPS Controller uses to configure a managed router.
  3. Enter CLI statements to configure the Juniper BNG CUPS components (BNG CUPS Controller and BNG User Planes).
  4. Save and activate the configuration. This command succeeds only when no configuration syntax errors exist.
  5. (Optional) Exit configuration mode and return to the top-level CLI prompt.

    For a list of supported configuration statements, see Juniper BNG CUPS CLI Configuration Statements.

Access and Use CLI Operational Commands

You use operational commands to display the current status of Juniper BNG CUPS. You enter operational commands to monitor and to troubleshoot the BNG CUPS Controller and the BNG User Planes.

To monitor BNG CUPS Controller, view BNG CUPS Controller configuration and statistics, or run certain operations manually:

  1. Use the BNG CUPS Controller utility command dbng cli to access the top-level CLI prompt.
  2. Enter specific commands.
    • Use show commands to display statistical information.

    • Use request commands to manually initiate certain BNG CUPS Controller operations.

    For a list of supported operational commands, see Juniper BNG CUPS Operational Commands.