ON THIS PAGE
How to Use the Juniper BNG CUPS Controller Utility and CLI Commands
Access Juniper BNG CUPS Controller Utility Commands
SUMMARY After you have installed Juniper BNG CUPS Controller (BNG CUPS Controller), you can perform numerous administrative functions.
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.
- Provide log access.
- 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.
Command Name |
Action |
---|---|
|
Gives you access to the CLI that you can use to configure BNG CUPS Controller features. |
ip |
Shows the IP address required to reach BNG CUPS Controller. |
|
Displays BNG CUPS Controller logs. |
restart |
Restarts a specific BNG CUPS Controller service. This
command offers the following options:
|
|
Sets up the BNG CUPS Controller application as part of the installation process. To run this command, you need sudo root privileges. |
shell |
Connects to the BNG CUPS Controller shell prompt. |
|
Starts a specific BNG CUPS Controller service or all BNG CUPS Controller services. |
|
Displays the current status of the BNG CUPS Controller services. |
|
Stops all BNG CUPS Controller services. |
|
Removes the BNG CUPS Controller application from the local system. To run this
command, you need |
|
Displays the version number of the installed BNG CUPS Controller application. |
Use the following general syntax to issue a command:
-
For a short option:
$ dbng command-name -option
-
For a long option:
$ dbng command-name ––option
To display a list of available commands with a brief description, use either the
h
or help
option:
$ dbng -h
$ dbng -help
To display the options for a specific command:
$ dbng command-name -h
Start or Stop BNG CUPS Controller Services
Use the dbng
utility script to start or stop all BNG CUPS Controller
services. The services start in order of dependency. Essential services
(db
and cmgd
) start first, followed by the other
services. The services stop in reverse order of dependency.
-
Execute this command to start all BNG CUPS Controller services:
$ dbng start
Note:We recommend that you use the
––services
option to start individual services or a set of services only for troubleshooting under the guidance of a Juniper Networks support representative. -
Execute this command to stop all BNG CUPS Controller services:
$ dbng stop
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.
Service |
Description |
---|---|
cp | 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. |
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:
$ dbng status
For example:
user@host $ dbng status POD STATE RESTARTS UPTIME NODE SERVICE cp-5cfd6fd4c7-5k4lq Running 0 20 days, 13:34:50.466648 test-node-1 cp scache-8687cb6556-442zn Running 0 20 days, 13:34:59.466697 test-node-2 scache
Display BNG CUPS Controller Logging
Use the dbng logs
utility script to display the log of different events
that occur while BNG CUPS Controller is running.
To display BNG CUPS Controller logs, execute this command to report logs for all services:
$ dbng logs
You can use standard Ubuntu conventions to redirect the logs to a file or to the terminal and to a file. Refer to the Ubuntu documentation for more information, but you can use the following examples as a starting point:
-
Redirect all logs to a file only.
$ dbng logs > file-path
-
Redirect all logs to both the screen and to a file.
$ dbng logs | tee file-path
The ––services
option is only for troubleshooting under the guidance
of a Juniper Networks support representative.
You can specify any of the following severity levels for logs, listed below in order of increasing severity:
Severity Level | Description |
---|---|
debug |
Presents detailed information that is typically of interest only when you are trying to diagnose a problem. These logs are often very frequent. |
info |
Logs events or non-error conditions of interest. Logs at this level provide confirmation that everything is working as expected. These logs are generally not very frequent. |
warning |
Indicates that something unexpected happened or that some problem might occur in the near future. A simple example of the latter is the disk space low warning that indicates that you might run out of disk space soon. In either case, the software is still working as expected, but you might want to monitor it more closely. These logs are generally not very frequent. |
error |
Indicates a more serious problem that prevented the software from performing some function. The software has handled the problem as gracefully as possible to continue functioning. |
critical |
Alerts you to a serious error that may prevent the program from continuing to run. |
Uninstall and Remove BNG CUPS Controller
Use the dbng
utility script to uninstall the BNG CUPS Controller
configuration. The uninstall
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:
How to Access BNG CUPS Controller Configuration and Operational Commands
- Access the BNG CUPS Controller CLI
- Access and Use CLI Configuration Statements
- Access and Use CLI 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:
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:
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: