The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This module describes the Command-Line Utilities (CLU) that is distributed with the Subscriber Manager (SM) application.
The SM provides a set of Command-Line Utilities (CLU). The CLU is designed mainly for viewing SM operations and statistics, and subscriber management, therefore only subscriber-related CLU changes are persistent. The CLU is used for configuration only indirectly, in that it loads the edited configuration file to the SM.
This module describes in detail all the CLU commands, their operations and options. The shorter description of the CLU commands given in the Configuration and Management, page 4-1 module is more oriented toward the performance of routine management and configuration tasks.
CLU commands are executable only when the user is logged in to the machine using the pcube account, which is always installed (see Installation and Upgrading, page 5-1 ). In general, the CLU runs as a separate process to the configured entity and communicates with it via a predefined communication port and interface. Therefore, the configured entity must keep a certain communication port open at all times, at least locally on the configured machine.
This section describes in detail the Command-Line Utilities commands, their operations and options.
•Parsing CLU Operations and Options
•Information About the p3batch Utility
•Information About the p3cable Utility
•Information About the p3clu Utility
•Information About the p3cluster Utility
•Information About the p3db Utility
•Information About the p3domains Utility
•Information About the p3ftp Utility
•Information About the p3http Utility
•Information About the p3inst Utility
•Information About the p3log Utility
•Information About the p3net Utility
•Information About the p3radius Utility
•Information About the p3rpc Utility
•Information About the p3sm Utility
•Information About the p3subs Utility
•Information About the p3subsdb Utility
•Information About the p3vpn Utility
All CLU commands support the following operations for informative output:
Operation |
Description |
---|---|
--help |
Prints the help for the specified CLU command, then exits. |
--version |
Prints the SM program version number, then exits. |
Place in quotation marks a command operation or option containing any of the following characters:
•A space character
•A separation sign (comma ","; ampersand "&"; colon ":")
•An escape character (backslash "\")
•Parenthesis ("(" or ")")
•An exclamation mark ("!")
•The comparison operators ("<" or ">")
A command operation or option that contains any of the following characters must have that character preceded by an escape character:
•An equal sign (=)
•A quotation mark (" or ")
•An escape character (backslash "\")
•An exclamation mark ("!")
•The "$" character
The following table shows several examples of the above rules:
One-letter abbreviations are available for some of the operations and options. For example, -d is an abbreviation for --domain. Note that only one hyphen (-), not two, precedes the letter for an abbreviation, and that if the operation or option takes a parameter, there is a space and not an equal sign before the parameter.
Example of using full name |
--domain=subscribers |
Example of using abbreviated name |
-d subscribers |
•Examples of using the p3batch Utility
p3batch Utility
The p3batch utility enables you to run many operations on a single connection with the SM. You can use any text editor to create a batch file that contains a series of CLU commands, one command per line (terminated by a new-line sign). Use the p3batch utility to run this file and execute the commands, where empty lines are skipped.
All batch file command line operations use the same connection option. The p3batch utility ignores any connection options in the script file commands. While processing the operations in the batch file, a progress indicator is displayed. The command format is:
p3batch [FILE-OPTION] [ERROR-OPTION]
The following tables list the p3batch options.
Examples of using the p3batch Utility
•To run a batch file that will halt if an error occurs.
p3batch --file=mainBatchFile.txt
•To run a batch file that will not halt if an error occurs.
p3batch --file=mainBatchFile.txt --skip-errors
•Examples of using the p3cable Utility
p3cable Utility
In a cable environment, the CPE is modeled as the subscriber, and inherits its policy and domain from the cable modem (CM) through which it connects to the network. Each cable modem is linked with one or more CPEs. For background information about special characteristics of the cable environment, see CPE as Subscriber in Cable Environment, page C-1.
You can use the p3cable utility commands to import cable modem information from a CSV file to the SM and to export the cable modem information from the SM to a CSV file. You can also use this utility to clear the repository of all cable modems, and to show whether to allow or deny the login of CPEs that belong to unfamiliar cable modems; i.e., cable modems that do not exist in the SM database. However, to specify whether to allow or deny such a login, use the Cable Adapter Section, page A-19 of the configuration file p3sm.cfg.
The command format is:
p3cable OPERATION[FILE-OPTIONS]
The following tables list the p3cable operations and options.
|
|
|
---|---|---|
--file =FILE |
-f FILE
|
Specifies the CSV FILE to import from. |
--output =FILE |
-o FILE
|
Specifies the subscriber CSV FILE to export to. |
Examples of using the p3cable Utility
•To import cable modem information from the specified csv file:
p3cable --import-cm -f CMFile.csv
•To export cable modem information to the specified csv file:
p3cable --export-cm --outfile=myCMFile.csv
•To clear the repository of all cable modems:
p3cable --clear-all-cm
•To display whether the login of CPEs that belong to unfamiliar cable modems (cable modems that do not exist in SM database) is allowed or denied:
p3cable --show-dynamic-mode
•Example of using the p3clu Utility
p3clu Utility
The p3clu utility prints a list of all supported CLU utilities and options.
The command format is:
p3clu OPERATION
The following table lists the p3clu operations.
|
|
---|---|
--help |
Prints the currently supported CLU commands. |
Example of using the p3clu Utility
•To display a listing of all supported CLU utilities and operations:
p3clu --help
•Example of using the p3cluster Utility
p3cluster Utility
The p3cluster utility displays the redundancy state of a cluster of two SM nodes and its components. This utility also supports operations that alter the redundancy state of the SM. These operations are used by the SM Cluster Agent and for administrative tasks.
The command format is:
p3cluster OPERATION
The following table lists the p3cluster operations.
Example of using the p3cluster Utility
•To display the redundancy status of the SM and its components:
p3cluster --show
•Examples of using the p3db Utility
p3dbUtility
The p3db utility manages and monitors the TimesTen database. The CLU exposes capabilities of some of the TimesTen CLUs with respect to specific needs of the SM.
The command format is:
p3db OPERATION[OPTIONS]
The following tables list the p3db operations and options.
Note Use caution when activating commands that can affect the database. If used incorrectly, these commands can possibly damage the database.
|
|
---|---|
--rep-status |
Displays status of the replication agent. |
--rep-start |
Starts the replication agent. Note Use only for database recovery. |
--rep-stop |
Starts the replication agent. Note: Use only for database recovery. Stops the replication agent. Note: Use only for database recovery. Note Use only for database recovery. |
--status |
Displays the database status. |
--destroy-rep-db |
Destroys the replicated data-store. |
--destroy-local-db |
Destroys the local data-store. |
--duplicate |
Copies the data-store from the remote machine to the local machine. Note This option is applicable only for a cluster setup . For additional information, see Data Duplication Procedure, page 5-22. |
--keep-in-mem [SECS] |
Indicates to the database daemon how many seconds to keep the database in the memory, after the last connection to the database is down. Use this option with large databases to reduce the SM restart time. Note To prevent limitations in performing a database destroy, do not use values above a few minutes (that is, above a few hundred seconds). |
|
|
---|---|
--local=LOCAL_HOSTNAME |
Specifies the local machine. |
--remote=REMOTE_HOSTNAME |
Specifies the remote machine. |
Examples of using the p3db Utility
•To display the status of the replication agent:
p3db --rep-status
•Examples of using the p3domains Utility
p3domains Utility
The p3domains utility displays the subscriber domains. When a system has more than one SCE platform, you can configure the platforms into groups or domains. A subscriber domain is one or more SCE platforms that share a specified group of subscribers. You must add the SCE platform to the network and create the domain before you can add an SCE platform to a domain.
The command format is:
p3domains OPERATION[OPTIONS]
The following tables list the p3domains operations and options.
|
|
---|---|
--show-all |
Displays all configured domains. |
--show |
Displays a domain and its associated network elements. |
Examples of using the p3domains Utility
•To display all configured domains:
p3domains --show-all
•To display the specified domain and its associated network elements:
p3domains --show --domain=myDomain
•Examples of using the p3ftp Utility
p3ftp Utility
The p3ftp utility monitors the SM internal FTP server.
The command format is:
p3ftp OPERATION
The following table lists the p3ftp operations and options.
Examples of using the p3ftp Utility
•To display the port number that the FTP server listens to, the passive FTP port range that the server uses, the current number of open sessions, the maximum number of sessions supported, and the state (ONLINE/OFFLINE) of the FTP server.
p3ftp --show
•Examples of using the p3http Utility
p3http Utility
The p3http utility monitors the HTTP adapter server.
Note The HTTP adapter server is a technician interface and normally should not be used.
The command format is:
p3http OPERATION
The following table lists the p3http operations:
|
|
---|---|
--show |
Displays the port number that the server listens to, the state of the server, and the current number of open sessions. |
Examples of using the p3http Utility
•To display the port number to which the server listens, the state of the server, and the current number of open sessions:
p3http --show
•Examples of using the p3inst Utility
p3inst Utility
The p3inst utility installs or uninstalls an application ( pqi file).
Note Before using p3inst to install an application pqi file, read the application installation instructions that came with the application you are using.
The command format is:
p3inst OPERATION[FILE-OPTION] [ARGUMENT-OPTION]
The following tables list the p3inst operations and options.
|
|
---|---|
--arg =ARG1[,ARG2...] |
Specifies one or more arguments for the install and upgrade procedures. |
Examples of using the p3inst Utility
•To install the specified installation file:
p3inst --install --file=myInstallation.pqi
•To uninstall the specified installation file:
p3inst --uninstall -f oldInstallation.pqi
•To upgrade an existing application using the specified application pqi file:
p3inst --upgrade --file=newInstallation.pqi
•To upgrade an existing application using the specified application pqi file, using arguments in the command line:
p3inst --upgrade -f newInstallation.pqi
•To return the specified application to the previous version:
p3inst --rollback
•To display the contents of the specified application pqi file:
p3inst --describe --file=myInstallation.pqi
•To list the details of the last installed application pqi file:
p3inst --show-last
•Examples of using the p3log Utility
p3log Utility
The p3log utility configures and manages the SM user log. The user log contains all user-related events and errors. Use the user log to view the history of the system events and errors.
The command format is:
p3log OPERATION[FILE-OPTION]
The following tables list the p3log operations and options.
|
|
|
---|---|---|
--extract |
Retrieves the user log from the agent. |
Progress indicator |
--reset |
Clears the user log. |
|
|
|
---|---|---|
--output =FILE |
-o FILE
|
Specifies to where the SM user log file should be extracted. |
Examples of using the p3log Utility
•To extract the SM user log to the specified file:
p3log --extract -o aug20.log
•To clear the SM user log:
p3log --reset
•Examples of using the p3net Utility
p3net Utility
The p3net utility shows the connection status of network elements and tries to reconnect disconnected elements.
The command format is:
p3net OPERATION[NETWORK-ELEMENT-OPTION]
The following tables list the p3net operations and options.
Examples of using the p3net Utility
•To connect a disconnected element to the network:
p3net --connect -n mainNE
•To display the names of all configured network elements:
p3net --show-all Network Element name list: ========================== sceRome sceLondon
•sceRome is a cascade setup containing two SCEs. This is displayed as a single entry in the list.
•To display all configured network elements details (as a table):
p3net --show-all --detail========================================================================== | Name | Host | Conn- | Subscriber | Domain | | | Status| Management | ========================================================================== | sceRome | 1.2.3.4* | up | active | subscribers | sceRome | 1.2.3.5 | up | active | subscribers | sceLondon | 1.2.3.6 | up | active | domain1
•sceRome is a cascade setup containing two SCEs. This is displayed as two entries with the same name where '*' represents the currently active SCE.
Note The SM does not synchronize the standby SCE; therefore, the Subscriber Management field on the standby SCE might appear as not-active if the SCE was never active.
•To display the connection status of the specified network element:
p3net --show --ne-name=mainNE Network Element Information: ============================ Name: mainNE Host: 1.1.1.1 Ip: 1.1.1.1 Port: 14374 Status: Connection ready Type: SCE2000 Domain: subscribers Subscriber Management: Active Redundancy Status: Standalone Quarantine Status: ok
•To display the connection status of cascaded SCEs, use the SCE name that appears in the configuration file:
p3net --show -n test Network Element Information: ============================ Name: test Host: 1.1.1.1 Ip: 1.1.1.1 Port: 14374 Status: Connection ready Type: SCE2000 Domain: subscribers Subscriber Management: Active Redundancy Status: Active Quarantine Status: ok Network Element Information: ============================ Name: test Host: 2.2.2.2 Ip: 2.2.2.2 Port: 14374 Status: Connection ready Type: SCE2000 Domain: subscribers Subscriber Management: Not-Active Redundancy Status: Standby Quarantine Status: ok
The p3radius utility displays the statistics of the RADIUS Listener LEG. For information about this CLU, see the Cisco SCMS SM RADIUS Listener LEG Reference Guide .
•Examples of using the p3rpc Utility
p3rpc Utility
The p3rpc utility displays the information of the proprietary Cisco RPC (Remote Procedure Call) server interface to the SM. It also authenticates users.
The command format is:
p3rpc OPERATION[OPTIONS]
The following tables list the p3rpc operations and options.
|
|
---|---|
--show |
Displays the port number to which the PRPC server listens, the maximum number of connections, the current number of active connections, and the host IP to which the server listens. |
--show-client-names |
Displays the names of the connected clients. Can be used for extracting the LEG_NAME key, see LEG-Domains Association Section, page A-6. |
--show-statistics |
Displays the PRPC server statistics. They contain information about the number of current PRPC sessions and statistics for PRPC server actions such as invocations and errors. |
--reset-statistics |
Clears the PRPC server statistics. |
--set-user |
Adds or updates the username and password. |
--validate-password |
Validates the username and password. |
--delete-user |
Deletes a user configuration. |
--show-users |
Displays all configured users. |
Examples of using the p3rpc Utility
•To display the port number to which the PRPC server listens, the maximum number of connections, the current number of active connections, the host IP to which the server listens, and the name of the configuration file used by the server:
p3rpc --show
•To display the statistics of the PRPC server:
p3rpc --show-statistics
•To clear the statistics of the PRPC server:
p3rpc --reset-statistics
•To show all the users configured at the PRPC server:
p3rpc --show-users
•Examples of using the p3sm Utility
p3sm Utility
The p3sm utility performs general configuration and management of the SM.
The command format is:
p3sm OPERATION[OPTIONS]
The following tables list the p3sm operations and options.
|
|
|
---|---|---|
--show |
Displays the current SM configuration and statistics. |
|
--load-config |
Reloads the SM configuration file. If the -f option is not used, file p3sm.cfg is loaded. |
|
--resync |
Resynchronizes subscribers of specified SCE with the SM database. The SCE is specified using the option --ne-name=SCE_NAME. |
Progress indicator |
--resync-all |
Resynchronizes all subscribers of all SCEs with the SM database. |
Progress indicator |
--start [--wait] |
Starts the server. The option --wait causes the CLU to return only after the SM is up. |
Default: started |
--stop |
Stops the server. Note When using fail-over, a simple shut-down of the SM does not work, the Veritas Cluster Server identifies that the SM is down and attempts to restart it. The correct procedure is: 1. Perform the manual fail-over. See Subscriber Manager Fail-Over, page 3-1. 2. Use the Veritas Cluster Manager Application to stop the monitoring (probing) of the SM. 3. Use the SM CLU ( p3sm --stop) to stop the SM |
|
--restart [--wait] |
Stops the server operation and then restarts it. The option --wait causes the CLU to return only after the SM is up. |
|
--sm-version |
Displays the currently installed SM version. |
|
--sm-status [--detail] |
Displays the SM operational status: whether the SM is running or not, and whether it is Active or Standby. If errors have occurred, it also displays their summary. To receive a detailed description, use the option --detail . |
|
--extract-support-file |
Retrieves the support file from the agent. This command extracts the SM support information to a defined file, which is defined using the option --output=FILE . SM support information should be extracted and sent to Cisco customer support with each support request. |
|
--reset-sm-status |
Clears errors and warnings that were displayed to the user. |
|
--logging =[on/off] |
Enables/disables the logging of user logon to the UserLog. Note Enabling this flag may affect performance. |
|
--show-stats |
Displays statistics information regarding logon operations and inactive subscriber removal operations. The rate results are updated once every 10 seconds. |
|
--reset-stats |
Resets the statistics information. |
Examples of using the p3sm Utility
•To start the server:
p3sm --start
•To stop the server:
p3sm --stop
Note When using fail-over, a simple shut-down of the SM does not work, the Veritas Cluster Server identifies that the SM is down and attempts to restart it. The correct procedure is:
1. Perform the manual fail-over. See Subscriber Manager Fail-Over, page 3-1.
2. Use the Veritas Cluster Manager Application to stop the monitoring (probing) of the SM.
3. Use the SM CLU ( p3sm --stop) to stop the SM
•To display the SM configuration:
>p3sm --show Subscriber Management Module Information: ========================================= Persistency in SCE (static): false Auto-resync at SCE reconnect: true Save subscriber state on logout: false Pull mode is on: false LEG block mode is on: false Logon logging is on: false Statistics: Number of logins: 1872423 Number of logouts: 1824239 Number of auto-logouts: 0 Number of pull requests: 0 LEG-SM link failure: Clear all subscribers mappings: false Timeout: 60 Up time: 4 hours 16 minutes 44 seconds Inactive Subscribers Removal: Is Enabled: false Inactivity timeout: 1 hours Max removal rate: 10 subscribers per second Task interval: 10 minutes Last run time: Was never run Automatic Logout (lease-time support): Is Enabled: false Max logout rate: 50 IP addresses per second Task interval: disabled Grace period: 10 seconds Last run time: Was never run Command terminated successfully
•To resynchronize the subscribers of the specified SCE with the SM database:
p3sm --resync --ne-name=my_SCE_100
•To stop the server operation and then restart it:
p3sm --restart
•To reload the SM configuration file, p3sm.cfg:
p3sm --load-config
•To display the SM operational status (active or inactive):
>p3sm --sm-statusSM is running. SM operational state is Active Command terminated successfully
•To extract the SM support information to the specified file:
p3sm --extract-support-file --output=support.zip
•To display statistics information regarding logon operations and inactive subscriber removal:
>p3sm --show-stats Subscriber Management Statistics Information: ============================================ Number of logins: 1872423 Login rate: 10.34 Number of logouts: 1824239 Logout rate: 10.67 Number of auto-logouts: 0 Auto-logout rate: 0 Number of pull requests: 0 Pull requests rate: 0 Inactive Subscriber Removal Information: ============================================ Number of inactive subscribers removed: 56732 Inactive subscribers removal rate: 9.98 Command terminated successfully
•Examples of using the p3subs Utility
p3subs Utility
The p3subs utility manipulates individual subscriber information in the SM database. The subscriber properties that are supported by the SCA BB Console are packageId, upVlinkId, and downVlinkId. For a description of the subscriber properties, see the Cisco Service Control Application for Broadband User Guide .
The command format is:
p3subs OPERATION[SUBSCRIBER-OPTIONS]
The following tables list the p3subs operations and options.
Examples of using the p3subs Utility
•To add a subscriber with the specified IP address:
p3subs --add --subscriber=jerry --ip=96.142.12.7
•To overwrite subscriber information (because the subscriber jerry already exists, this operation would fail, but the overwrite option allows the IP address to be overwritten):
p3subs --add --subscriber=jerry --ip=96.128.128.42 --overwrite
•To set a property value for the specified subscriber:
p3subs --set --subscriber=jerry --property=packageId=1
•To add new mappings for the specified subscriber; any existing ones are overwritten:
p3subs --set --subscriber=jerry --ip=96.142.12.8
•To add new mappings to the existing ones for the specified subscriber:
p3subs --set --subscriber=jerry --ip=96.142.12.0/24 --additive-mappings
•To add tunneled IP addresses of a VPN, existing mappings are overwritten:
p3subs --set --subscriber=jerry --ip=10.1.1.0/24@myVpn
•To add all tunneled IP addresses of a VPN, existing mappings are overwritten:
p3subs --set --subscriber=jerry --vpn=myVpn
•To add community of a VPN, existing mappings are overwritten:
p3subs --set --subscriber=jerry --community=1:10@myVpn
•To display information for the specified subscriber:
p3subs --show --subscriber=jerry
•To remove the specified subscriber:
p3subs --remove --subscriber=jerry
•To display all the mappings for the specified subscriber:
p3subs --show-all-mappings --subscriber=jerry
•To remove the specified mappings for the specified subscriber:
p3subs --remove-mappings --subscriber=jerry --ip=96.142.12.7,96.128.128.42
•To remove a range of consecutive mappings for the specified subscriber:
p3subs --remove-mappings --subscriber=jerry --ip=1.1.1.0/30
•To remove all the mappings for the specified subscriber:
p3subs --remove-all-mappings --subscriber=jerry
•To display the value of the specified property for the specified subscriber:
p3subs --show-property --subscriber=jerry --property=reporting
•To display the values of all the properties for the specified subscriber:
p3subs --show-all-properties --subscriber=jerry
•To display all the property names and descriptions:
p3subs --show-all-property-names
•To reset specified property of specified subscriber to its default value:
p3subs --reset-property --subscriber=jerry --property=rdr.transaction.generate
•To clear the applicative state of the specified subscriber. This command clears only the backup copy at the SM, it does not clear the applicative state record in the SCE platform:
p3subs --clear-state --subscriber=jerry
•Subscriber CSV File Format used by SCA BB Console for import/export
•Examples of using the p3subsdb Utility
p3subsdb Utility
The p3subsdb utility manages the subscriber database and performs operations on groups of subscribers.
The command format is:
p3subsdb OPERATION[OPTIONS] [FILE-OPTIONS]
The following tables list the p3subsdb operations and options.
|
|
|
---|---|---|
--clear-all |
Removes all subscriber records from the SM database. |
Progress indicator |
--clear-domain |
Removes all subscriber records from the specified domain. |
Progress indicator |
--show-num |
Displays number of subscribers in database for the specified domain. |
|
--show-all |
Lists all the subscriber names. |
|
--show-domain |
Lists all the subscriber names in the specified domain. |
|
--import |
Imports subscribers to the database from a specified CSV file. See Subscriber CSV File Format used by SCA BB Console for import/export. The filename that is to be imported is specified using the format "--file=import-filename". The results go to a result file, import-results.txt , which is created in the same directory as the CSV file. |
Progress indicator |
--export |
Exports subscribers from the database to a specified CSV file. See Subscriber CSV File Format used by SCA BB Console for import/export. The filename that is to be exported is specified using the format "--output=export-filename". The results go to a result file, export-results.txt , which is created in the same directory as the CSV file. |
Progress indicator |
--clear-all-states |
Clears the state of all subscribers in the SM database. |
|
--remove-property |
Removes a specified property from all subscribers in the system. Note After running this command you should re-synchronize all SCE devices. |
|
--remove-all-ip |
Removes all the IP addresses of all subscribers. |
Subscriber CSV File Format used by SCA BB Console for import/export
Lines in subscriber CSV files have the following fixed format:
subscriber-id,domain,mappings,package-id,upstream Virtual Link id,downstream Virtual Link id
If no domain is specified, the default domain (subscribers) is assigned.
The following is an example CSV file for use with the SM CLU:
JerryS,subscribers,80.179.152.159,0,0,0 ElainB,,194.90.12.2,3,12,1
For a full description of the subscriber properties see the Cisco Service Control Application for Broadband User Guide .
Examples of using the p3subsdb Utility
•To import subscribers from a specified CSV file:
p3subsdb --import --file=mySubscriberFile.csv
•To export subscribers to a specified CSV file:
p3subsdb --export -o mySubscriberFile.csv
•To export subscribers to a specified CSV file, using filtering options:
p3subsdb --export --prefix=a --output=mySubscriberFile.csv
•To export subscribers to a specified CSV file, using filtering options:
p3subsdb --export --prefix=a -o a.csv
•To remove all subscriber records from the SM database:
p3subsdb --clear-all
•To remove all subscriber records from the specified domain:
p3subsdb --clear-domain --domain=myDomain
•To list all the subscribers: p3subsdb --show-all To list all subscribers in a specified domain:
p3subsdb --show-domain --domain=myDomain
•To show the number of subscribers in a specified domain:
p3subsdb --show-num --domain=myDomain
•To list all subscribers who have no domain specified:
p3subsdb --show-domain --domain=none
•To clear the state of all subscribers in the SM database:
p3subsdb --clear-all-state
•To remove a property from all subscriber records:
p3subsdb --remove-property --property=monitor
•VPN CSV File Format for import/export
•Examples of using the p3vpn Utility
p3vpn Utility
The p3vpn utility manages the VPN entities in the SM.
The command format is:
p3vpn OPERATION[OPTIONS] [FILE-OPTIONS]
The following tables list the p3vpn operations and options.
|
|
---|---|
--add |
Adds a VPN to the SM. The operation fails if the VPN exists. |
--set |
Updates a VPN in the SM. A new mapping overwrites all existing mappings, unless the --additive-mapping option is used. |
--remove |
Removes the specified VPN. |
--remove-mappings |
Removes the specified mappings of the specified VPN. |
--remove-all-mappings |
Removes all mappings of the specified VPN. |
--show |
Displays information for the specified VPN. |
--show-subs |
Displays all the subscribers that belong to the specified VPN. |
--show-all |
Displays all VPN names. |
--show-all-mappings |
Displays all the mappings for the specified VPN. |
--show-num |
Displays the total number of VPNs. |
--import |
Imports VPNs from a CSV file. See VPN CSV File Format for import/export. The filename that is to be imported is specified using the format "--file=import-filename". The results go to a result file, import-results.txt , which is created in the same directory as the CSV file. |
--export |
Export VPNs to a CSV file. See VPN CSV File Format for import/export. The filename that is to be exported is specified using the format "--output=export-filename". The results go to a result file, export-results.txt , which is created in the same directory as the CSV file. |
--remove |
Remove the VPNs specified by a CSV file. The filename that contains the VPNs to be removed is specified using the format "--file=remove-filename". The results go to a result file, remove-results.txt , which is created in the same directory as the CSV file. |
--remove-all-vlan |
Removes all the VLAN-ids of all VPNs. |
--remove-all-mpls-vpn |
Removes all the MPLS/VPN mappings of all VPNs. |
Note When working with VLAN mapping types, the SCE must be configured using the following CLI:
SCE2000#>configure SCE2000(config)#>in li 0 SCE2000(config if)#>VLAN symmetric classify
VPN CSV File Format for import/export
Lines in VPN CSV files have the following fixed format:
vpn-id,domain,mappings
If no domain is specified, the default domain (subscribers) is assigned.
The following is an example CSV file for use with the SM CLU:
MPLS-VPN,subscribers,1:1000@1.1.1.1 VLAN-VPN,subscribers,10
Examples of using the p3vpn Utility
•To add a VPN with the specified VLAN:
p3vpn --add -vpn=myVpn --vlan-id=10
•To add new mappings for the specified VPN; any existing ones are overwritten:
p3vpn --set --vpn=myVpn --vlan-id=11
•To add new mappings to the existing ones for the specified subscriber:
p3vpn --set --vpn=myVpn --vlan-id=12 --additive-mappings
•To add a VPN with the specified MPLS/VPN mappings:
p3vpn --add --vpn=myVpn --mpls-vpn=1:100@96.142.12.7
•To display information for the specified VPN:
p3vpn --show --vpn=myVpn
•To remove the specified VPN:
p3vpn --remove --vpn=myVpn
•To display all the mappings for the specified VPN:
p3vpn --show-all-mappings --vpn=myVpn
•To remove the specified mappings for the specified VPN:
p3vpn --remove-mappings --vpn=myVPN --vlan-id=10
•To remove all the mappings for the specified subscriber:
p3vpn --remove-all-mappings --vpn=myVpn