- Table of Contents
-
- 03-Security Command Reference
- 00-Preface
- 01-Security zone commands
- 02-Security policy commands
- 03-ASPF commands
- 04-Session management commands
- 05-Object group commands
- 06-IP source guard commands
- 07-AAA commands
- 08-802.1X commands
- 09-User identification commands
- 10-Password control commands
- 11-Portal commands
- 12-MAC authentication commands
- 13-IPoE commands
- 14-Public key management commands
- 15-PKI commands
- 16-SSH commands
- 17-SSL commands
- 18-Connection limit commands
- 19-Attack detection and prevention commands
- 20-Server connection detection commands
- 21-ARP attack protection commands
- 22-ND attack defense commands
- 23-uRPF commands
- 24-IP-MAC binding commands
- 25-APR commands
- 26-Keychain commands
- 27-Crypto engine commands
- 28-MAC learning through a Layer 3 device commands
- 29-SMS commands
Title | Size | Download |
---|---|---|
29-SMS commands | 62.64 KB |
Contents
SMS commands
app id
Use app-id to specify the app ID for the third-party SMS platform.
Use undo app-id to restore the default.
Syntax
app-id app-id
undo app-id
Default
No app ID is specified for the third-party SMS platform.
Views
SMS gateway view
Predefined user roles
network-admin
context-admin
Parameters
app-id: Specifies the app ID of the third-party SMS platform, a case-sensitive string of 1 to 31 characters.
Usage guidelines
The app ID is encapsulated in the header field of HTTP requests and sent to the third-party SMS platform for the identity authentication of the SMS gateway. The platform determines the secret key for decryption according to the received app ID and grants the corresponding services to the SMS gateway.
The app ID is provided by the third-party SMS platform.
Examples
# Specify abc as the app ID of the third-party SMS platform for SMS gateway gw1.
<Sysname> system-view
[Sysname] sms-gateway gw1
[Sysname-sms-gateway-gw1] app-id abc
Related commands
secret-key
display sms-gateway
Use display sms-gateway to display SMS gateway information.
Syntax
display sms-gateway [ brief | name gateway-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
context-admin
context-operator
Parameters
brief: Displays brief information about all SMS gateways. If you do not specify this keyword, the command displays detailed SMS gateway information.
name gateway-name: Specifies an SMS gateway by its name. An SMS gateway name is a case-insensitive string of 1 to 31 characters, and can contain only letters, digits, and underscores (_). If you do not specify an SMS gateway, this command displays information about all SMS gateways.
Usage guidelines
The configured secret key for SMS data encryption will be displayed in cipher text.
Examples
# Display detailed information about all SMS gateways.
<Sysname> display sms-gateway
Total Number of SMS gateways: 2
SMS gateway name: gw1
SMS platform: emay
App ID: abc
Secret key: $c$3$zvzJI1AMQ4OVHCkSnXXoAOUyd2STdtIFtQDlJETCg=
VPN instance: vpn1
SMS gateway name: gw2
SMS platform: emay
App ID: 123
Secret key: $c$3$AS4tqlnOVODYEQ5IMHJNyNTTAyBPotXgw==
VPN instance: vpn1
Table 1 Command output
Field |
Description |
SMS platform |
SMS platform used by the SMS gateway to send SMS messages. |
App ID |
App ID for the third-party SMS platform. |
Secret key |
Secret key (in cipher text) for SMS data encryption. |
VPN instance |
VPN instance associated with the SMS gateway. |
# Display brief information about all SMS gateways.
<Sysname> display sms-gateway brief
SMS gateway name SMS platform VPN instance
gw1 emay vpn1
gw2 emay vpn1
Table 2 Command output
Field |
Description |
SMS platform |
SMS platform used by the SMS gateway to send SMS messages. |
VPN instance |
VPN instance associated with the SMS gateway. |
secret-key
Use secret-key to specify the secret key for SMS data encryption.
Use undo secret-key to restore the default.
Syntax
secret-key { cipher | simple } string
undo secret-key
Default
No secret key is specified for SMS data encryption.
Views
SMS gateway view
Predefined user roles
network-admin
context-admin
Parameters
cipher: Specifies a ciphertext secret key.
simple: Specifies a plaintext secret key. A plaintext secret key is stored in cipher text.
string: Specifies a case-sensitive secret-key string. A plaintext secret key is a string of 1 to 63 characters, and a ciphertext secret key is a string of 1 to 117 characters.
Usage guidelines
The secret key is provided by the third-party SMS platform.
The secret key uniquely corresponds to the app ID configured by the app-id command for the third-party SMS platform.
The service module sends SMS data to the SMS gateway, and then the SMS gateway performs the following operations:
1. Parses and converts the SMS data into data that can be recognized by the third-party SMS platform.
2. Uses the secret key and algorithms to encrypt the SMS data.
3. Sends the encrypted data to the third-party SMS platform.
The third-party SMS platform performs the following operations after receiving the encrypted data:
1. Obtains the app ID in the header field of the HTTP request.
2. Uses the secret key that corresponds to the app ID to decrypt the data to plaintext data.
3. Sends the data in an SMS message to the user mobile number.
Examples
# Specify the plaintext secret key as TESTplat&! for SMS data encryption.
<Sysname> system-view
[Sysname] sms-gateway gw1
[Sysname-sms-gateway-gw1] secret-key simple TESTplat&!
Related commands
app-id
sms-gateway
Use sms-gateway to create an SMS gateway and enter its view, or enter the view of an existing SMS gateway.
Use undo sms-gateway to remove an SMS gateway.
Syntax
sms-gateway gateway-name
undo sms-gateway gateway-name
Default
No SMS gateways exist.
Views
System view
Predefined user roles
network-admin
context-admin
Parameters
gateway-name: Specifies an SMS gateway by its name, a case-insensitive string of 1 to 31 characters. Valid characters are letters, digits, and underscores (_).
Usage guidelines
The device implements SMS sending through an SMS gateway as follows:
1. A service module sends SMS data to the SMS gateway.
2. The SMS gateway converts the SMS data to the data that can be recognized by the third-party SMS platform.
3. The SMS gateway sends the SMS data to the third-party SMS platform through HTTP.
4. The third-party SMS platform sends the SMS message to the user mobile number.
SMS settings are configured in SMS gateway view, including the SMS platform, app ID for logging in to the third-party SMS platform, and secret key for SMS data encryption.
An SMS gateway can be associated with multiple service modules that require SMS services.
Examples
# Create an SMS gateway named gw1 and enter its view.
<Sysname> system-view
[Sysname] sms-gateway gw1
[Sysname-sms-gateway-gw1]
Related commands
display sms-gateway
sms-platform
Use sms-platform to specify the SMS platform that sends messages.
Use undo sms-platform to restore the default.
Syntax
sms-platform emay
undo sms-platform
Default
No SMS platform is specified for sending messages.
Views
SMS gateway view
Predefined user roles
network-admin
context-admin
Parameters
emay: Specifies the Emay SMS platform.
Usage guidelines
To use the third-party SMS platform specified by this command, you must also configure app-id and secret-key for the platform on the SMS gateway.
Examples
# Specify the SMS platform as emay for SMS gateway gw1.
<Sysname> system-view
[Sysname] sms-gateway gw1
[Sysname-sms-gateway-gw1] sms-platform emay
Related commands
app-id
secret-key
sms-send test-mobile
Use sms-send test-mobile to send a test SMS message to the specified mobile number.
Syntax
sms-send test-mobile number
Views
SMS gateway view
Predefined user roles
network-admin
context-admin
Parameters
number: Specifies the mobile number for receiving test messages, which is a string of 1 to 31 digits.
Usage guidelines
Use this command to test whether the configured SMS gateway can operate correctly. The SMS gateway is considered to be normal if the mobile number receives an App ID XXX verification passed message.
Examples
# Send a test message to mobile number 111111 for SMS gateway gw1.
<Sysname> system-view
[Sysname] sms-gateway gw1
[Sysname-sms-gateway-gw1] sms-send test-mobile 111111
Related commands
app-id
secret-key
sms-platform
vpn-instance
Use vpn-instance to specify the VPN instance for an SMS gateway.
Use undo vpn-instance to restore the default.
Syntax
vpn-instance vpn-instance-name
undo vpn-instance
Default
An SMS gateway belongs to the public network.
Views
SMS gateway view
Predefined user roles
network-admin
context-admin
Parameters
vpn-instance-name: Specifies the name of an MPLS L3VPN instance, a case-sensitive string of 1 to 31 characters.
Usage guidelines
After you execute this command, the resources contained by an SMS gateway will belong to the associated VPN instance.
You can specify only one VPN instance for an SMS gateway.
Examples
# Specify VPN instance vpn1 for SSL VPN gateway gw1.
<Sysname> system-view
[Sysname] sms-gateway gw1
[Sysname-sms-gateway-gw1] vpn-instance vpn1