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]

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

This command offers the following options:

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

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

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 -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 context-name—The Kubernetes context name. Enter the name of the context.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

  • 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 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 context-name—The Kubernetes context name. Enter the name of the context.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

  • cpi-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.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

  • 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 karmada-context-name --from-running --workload-contexts workload-1-context-name workload-2-context-name --observer-context observer-context-name--version software-release

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.

  • context karmada-context-name—The context name of the Karmada context that is created when Karmada is installed on the management cluster. Used with a multiple geography setup only. Enter the name of the context.

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

  • observer-context management-context-name—The context name for the management cluster. Used with a multiple geography setup only. Enter the name of the context.

sudo -E dbng multi-cluster add-cluster workload-context-name--context karmada-context-name

Adds a workload context to an existing management context. To run this command, you need sudo root privileges.

This command offers the following options:

  • workload-context-name—The context name for the workload cluster that is being added.

  • context karmada-context-name—The context name of the Karmada context that is associated with the management cluster. Enter the name of the context.

Note:

This command is only supported in a multiple geography setup.

sudo -E dbng multi-cluster rm-cluster workload-context-name --context karmada-context-name

Removes a workload context from an existing management context. To run this command, you need sudo root privileges.

This command offers the following options:

  • workload-context-name—The context name for the workload cluster that is being removed.

  • context karmada-context-name—The context name of the Karmada context that is associated with the management cluster. Enter the name of the context.

context karmada-context-name—The context name of the Karmada context that is associated with the management cluster. Enter the name of the context.

Note:

This command is only supported in a multiple geography located setup.

dbng multi-cluster status --context karmada-context-name

Displays the status of the workload clusters from the application’s perspective.

This command offers the following option:

context karmada-context-name—The context name of the Karmada context that is associated with the management cluster. Enter the name of the context.

Note:

This command is only supported in a multiple geography setup.

sudo -E dbng multi-cluster switchover --context karmada-context-name

Initiates a switchover to the other workload cluster. The CPi moves to the other workload cluster. To run this command, you need sudo root privileges.

This command offers the following option:

context karmada-context-name—The context name of the Karmada context that is associated with the management cluster. Enter the name of the context.

sudo -E dbng rename-context --context 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 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.

Note:

If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

sudo -E dbng restart --context 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 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.

Note:

If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

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.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

  • 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 [--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 context-name—The Kubernetes context name on which to run startup. Enter the name of the context.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

  • 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 bbecloudsetup 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. Setuop File Field Descriptions 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 [-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.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

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

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

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.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

  • 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]

Stops 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.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

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

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

  • 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.
  • Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

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.

    Note:

    If you are using this command in a multiple geography setup, you must enter the context name of the Karmada context that is associated with the management cluster.

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

configserver

Configuration file replication.

Note:

This service is only used in a multiple geography setup.

bbe-mirp

The Multi-geo IP Route Prioritization (MIRP) operator is used to facilitate the advertisement of the external AAA address (NAS-IP-Address) to iBGP routers in order to steer inbound AAA traffic to the active workload cluster (see the ip-aaa option for the cpi add command).

Note:

This service is only used in a multiple geography setup.

bbe-observer

Observes multiple cluster scheduling events for generation number calculation.

Note:

This service is only used in a multiple geography setup.

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.