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

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 --cluster-repos

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

This command offers the following options:

  • h, help—Shows the help message and exit.

  • log [error, warning, info, debug]—Adjusts the log level.

  • no-color—Prints messages without colors.

  • 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 affect the running application.

  • cluster-repos—Clean the cluster repository of the clusters that have been removed.

dbng cli --context [context-name | multi-cluster-context-name] --workload-context workload-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—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • workload-context workload-context-name—(Optional) The workload context name to connect to. If the this command is not specified, you will be connected to one of the running management pods (one on each workload cluster that are equal peers).This option is only used for multiple geography setups.

  • 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 | multi-cluster-context-name] -h --log --version software-release --ip-aaa ip-address cpi-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—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • h, help—Shows the help message and exit.

  • l, log [error, warning, info, debug]—Adjusts the log level.

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

  • name—Name of the new CPi.

  • --ip-aaa ip-address—You use the ip-aaa option to specify a single external IP address to use for the RADIUS listener port on the CPi. The address remains the same across multiple geography switchovers. The ip-aaa option requires a L3-enabled MetalLB instance. MetalLB BGP peering is used to direct traffic to the CPi on the active workload cluster.

  • cpi-label—Specify a label that is used to identify the CPi .

sudo -E dbng cpi rm --context [context-name | multi-cluster-context-name] cpi-label

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

This command offers the following options:

  • context—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • cpi-label—Specify the CPi's label.

dbng ip --context [context-name | multi-cluster-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—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

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

  • detail—Displays detailed IP information.

Single geography setup use:sudo -E dbng link --version software-release --context context-name --from-running

Multiple geography setup use:

sudo -E dbng link --context multi-cluster-context-name --version software-release --from-running --workload-contexts workload-1-context-name workload-2-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—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • from-running—Attempts to match the software releases of the running BNG CUPS Controller. The from-running option is used to recover the version and user settings from a running application deployment. This can help you recover a failed jump host or for synchronizing a network of jump hosts.

  • workload-contexts workload-1-context-name workload-2-context-name—The two workload context names. Used with a multiple geography setup only. Enter the name of the context.

sudo -E dbng rename-context --context [context-name | multi-cluster-context-name] --new-name new-name

Renames a context. The command does not affect the BNG CUPS Controller that is currently running on the cluster. To run this command, you need sudo root privileges.

This command offers the following options:

  • context—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

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

sudo -E dbng restart --context [context-name | multi-cluster-context-name] --workload-context workload-context-name --force --wait microservice-name

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

This command offers the following options:

  • context—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • workload-context workload-context-name—The name of the workload context on which the microservice instance should be restarted. This option is only used for multiple geography setups.

  • force—Forcibly restart the microservice 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 | multi-cluster-context-name] --workload-context workload-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—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • workload-context workload-context-name—The workload context name to roll out. This option is only used for multiple geography setups and is only used during the upgrade process.

  • sevice service name—The microservice name to roll out. Enter the microservice's name. This option is only used during the upgrade process.

  • version software-release—The software release to roll out. Enter the software release number. This option is only used during the upgrade process.

sudo -E dbng setup --context [context-name | multi-cluster-context-name] --help --log info --no-color --bbecloudsetup --update --ssh ip-address:port-number --secrets --verbose --config file-name --template file-name --mandatory --optional

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—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • h, help—Shows the help message and exit.

  • l, log [error, warning, info, debug]—Adjusts the log level.

  • no-color—Prints messages without colors.

  • bbecloudsetup—Fills in operational parameters that align with a BBE Cloudsetup utility created cluster so that you do not have to interact with BNG CUPS Controller during the setup process. (See the BBE Cloudsetup Installation Guide for cluster installation instructions.)

    Note:

    Only use either the bbecloudsetup option or the template file-name option. Do not use both options.

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

  • ssh ip-address:port-number—Enables SSH towards the control plane instance. Enter the SSH IP address and port number on which the control plane instance is listening for SSH (when enabled in the configuration). The IP address can also be a DNS name.

  • secrets—Updates the keys, certificates, and secrets used by the BNG CUPS Controller.

  • verbose—Provides a detailed description before each prompted question.

  • config file-name—The initial configuration file that you want BNG CUPS Controller to use at startup.

  • template file-name—A YAML formatted file that contains a subset of the configuration file that is created during setup. The values that are entered in the template file are used automatically by the setup process. When you use the template option, you are not required to manually enter the information contained in the template file during the setup process. You should only use the template option when using Red Hat OpenShift Container Platform to create the cluster or when creating a multiple geography cluster. Table 3 describes the information that you need to enter into the template configuration file.

    Note:

    Only use either the bbecloudsetup option or the template file-name option. Do not use both options.

  • mandatory—Only asks required questions during setup.

  • optional—Only asks questions that are not required during setup.

dbng shell --context [context-name | multi-cluster-context-name] --workload-context workload-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—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • workload-context workload-context-name—The workload context name for which you want to attach to the shell of a particular subsystem. This option is only used for multiple geography setups.

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

sudo -E dbng start --context [context-name | multi-cluster-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

  • context—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

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

Displays the current status of the BNG CUPS Controller services.

This command offers the following options:

  • context—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • 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 | multi-cluster-context-name] [--now]

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

This command offers the following option:

  • context—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • now—Stops the BNG CUPS Controller immediately, instead of waiting for the two minute delay.

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

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

This command offers the following options:

  • context—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • 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 | multi-cluster-context-name]

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

This command offers the following options:

  • context—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

dbng version --context [context-name | multi-cluster-context-name] --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—Enter either of the following:

    • context-name—The Kubernetes context name of the cluster for a single cluster setup.

    • multi-cluster-context-name—The context name for a multiple geography setup. The multi-cluster-context-name is a user-defined string applied to the link command that serves as a common reference for the two workload clusters.

  • 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 in Table 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.

In multiple geography setups, you will see two scache services.

bngd

The BNG director service—Serves as the central coordinator for the BNG CUPS Controller.

mgmt

The management microservice—Provides a centralized operator management interface to the BNG CUPS Controller.

dbng-operator

The DBNG operator—It is a Kubernetes operator that collects Kubernetes pod health information for the bng director. The information collected is displayed in the show health operational command's outputs.

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 Controller 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 Controller CLI Operational Commands.