- Table of Contents
-
- 03-Security Command Reference
- 00-Preface
- 01-Security zone commands
- 02-Security policy commands
- 03-Object group commands
- 04-Object policy commands
- 05-AAA commands
- 06-IPoE commands
- 07-Portal commands
- 08-User identification commands
- 09-Password control commands
- 10-Public key management commands
- 11-PKI commands
- 12-SSH commands
- 13-SSL commands
- 14-ASPF commands
- 15-APR commands
- 16-Session management commands
- 17-Connection limit commands
- 18-Attack detection and prevention commands
- 19-DDoS protection commands
- 20-uRPF commands
- 21-ARP attack protection commands
- 22-ND attack defense commands
- 23-IP-MAC binding commands
- 24-Keychain commands
- 25-Crypto engine commands
- 26-SMS commands
- 27-Terminal identification commands
- 28-Flow manager commands
- 29-Trusted access control commands
- 30-Location identification commands
- 31-Server connection detection commands
- 32-MAC authentication commands
- Related Documents
-
Title | Size | Download |
---|---|---|
26-SMS commands | 98.43 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: 5
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
SMS gateway name: gw3
SMS platform: tplink
App ID: 123
Secret key: $c$3$AS4tqlnOVODYEQ5IMHJNyNTTAyBPotXgw==
VPN instance: vpn1
URL: https://example.com/EmPlat/rest/message/sendVpnCode
SMS gateway name: gw4
SMS platform: pingan
VPN instance: vpn1
URL: http://wehub-sf.fat.qa.pab.com.cn/api/brcp_mpp.brcp-mpp-mms.sendOneRealTimeMsg
Consumer ID: 3031
Provider ID: 679900
ChannelCode: 104936
Access token: 25F2B4DCC07F43768CF3D948791E461F
Message type: NYH_ZH220119018
SMS gateway name: gw5
SMS platform: smp
Server host: smp.test.com
Server key: $c$3$zvzJI1AMQ4OVHCkSnXXoAOUyd2STdtIFtQDlJETCg=
VPN instance: vpn1
Table 1 Command output
Field |
Description |
SMS platform |
SMS platform used by the SMS gateway to send SMS messages. · emay—Emay Softcom. · pingan—Ping An bank. · smp—SMP. · tplink—TP-LINK. |
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. |
URL |
URL address of the TP-Link SMS platform. |
Consumer ID |
Consumer ID of the Ping An SMS platform. |
Provider ID |
Provider ID of the Ping An SMS platform. |
ChannelCode |
Channel code of the Ping An SMS platform. |
Access token |
Access token of the Ping An SMS platform. |
Message type |
Event code of the Ping An SMS platform. |
Server host |
Host name of the SMP security management platform. |
Server key |
Key of the SMP security management platform. |
# 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
gw3 tplink vpn1
gw4 pingan vpn1
gw5 smp vpn1
Table 2 Command output
Field |
Description |
SMS platform |
S MS platform used by the SMS gateway to send SMS messages. · emay—Emay Softcom. · pingan—Ping An bank. · smp—SMP. · tplink—TP-LINK. |
VPN instance |
VPN instance associated with the SMS gateway. If no VPN instance is configured, a hyphen (-) is displayed. |
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
You need to configure this command only for an Emay Softcom, TP-LINK, or SMP SMS platform.
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.
If the third-party SMS platform is Emay Softcom (configured by using the sms-platform emay command), 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:
4. Obtains the app ID in the header field of the HTTP request.
5. Uses the secret key that corresponds to the app ID to decrypt the data to plaintext data.
6. Sends the data in an SMS message to the user mobile number.
If the third-party SMS platform is TP-LINK (configured by using the sms-platform tplink command), the service module sends SMS data to the SMS gateway, and then the SMS gateway performs the following operations:
7. Parses and converts the SMS data into data that can be recognized by the third-party SMS platform.
8. Encapsulates the secret key, SMS platform app ID, SMS data, and other parameters in the HTTPS request message and sends them to the third-party SMS platform.
After receiving the HTTPS request message, the third-party SMS platform verifies the identity of the SMS gateway based on the app ID and secret key in the message. If the verification is successful, the SMS platform sends the SMS to the user's mobile phone.
If the SMP SMS platform is specified by using sms-platform smp, exectue the secret-key command to configure the username and password in the format of username:password.
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 | pingan sms-platform-url consumerid providerid channelcode accesstoken messagetype | smp server-host | tplink sms-platform-url }
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.
pingan sms-platform-url: Specifies the Ping AN Bank SMS platform. sms-platform-url represents the URL address of Ping An bank, a case-sensitive string of 1 to 255 characters.
consumerid: Specifies the consumer ID, a string of 1 to 10 digits, which is encapsulated in the x-g-consumerid field of the HTTP header in the request message sent from the SMS gateway to the Ping An Bank SMS platform.
providerid: Specifies the provider ID, a string of 1 to 10 digits, which is encapsulated in the x-g-providerid field of the HTTP header in the request message sent from the SMS gateway to the Ping An Bank SMS platform.
channelcode: Specifies the channel code, a string of 1 to 10 digits, used by the SMS gateway when sending a request message to the Ping An Bank SMS platform.
accesstoken: Specifies the access token, a case-sensitive string of 1 to 63 characters in plaintext, used by the SMS gateway when sending a request message to the Ping An Bank SMS platform.
messagetype: Specifies the event code, a case-sensitive string of 1 to 63 characters in plaintext, used by the SMS gateway when sending a request message to the Ping An Bank SMS platform.
smp server-host: Specifies the SMP security management platform by its host name. The host name is a case-insensitive string of 1 to 127 characters that can contain only letters, digits, underscores (_), colons (:), hyphens (-), and dots (.).
tplink sms-platform-url: Specifies the TP-LINK SMS platform. sms-platform-url represents the URL address of TP-LINK, a case-sensitive string of 1 to 255 characters.
Usage guidelines
To use an Emay or TP-LINK SMS platform, in addition to use this command to specify the platform, you must also configure the app-id and secret-key commands for the platform.
If you select the SMP SMS platform, specify the username and password by using the secret-key command before using this third-party SMS platform.
If the specified URL contains a domain name, you must configure Domain Name System (DNS) on the device to translate the domain name to the corresponding IP address. For more information about DNS, see DNS configuration in Layer 3—IP Services Configuration Guide.
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
# Specify the TP-LINK SMS platform by its URL address on SMS gateway gw2.
<Sysname> system-view
[Sysname] sms-gateway gw2
[Sysname-sms-gateway-gw2] sms-platform tplink https://example.com/EmPlat/rest/message/sendVpnCode
# Specify the Ping An bank SMS platform by its URL address on SMS gateway gw3. Set the consumer ID to 3031, provider ID to 679900, channel code to 104936, key to 25F2B4DCC07F43768CF3D948791E461F, and event code to NYH_ZH220119018.
<Sysname> system-view
[Sysname] sms-gateway gw3
[Sysname-sms-gateway-gw3] sms-platform pingan http://example.com.cn:8888/api/brcp_mpp.brcp-mpp-mms.sendOneRealTimeMsg 3031 679900 104936 25F2B4DCC07F43768CF3D948791E461F NYH_ZH220119018
# Specify the SMP SMS platform by its host name on SMS gateway gw3.
<Sysname> system-view
[Sysname] sms-gateway gw3
[Sysname-sms-gateway-gw3] sms-platform smp smp.test.com
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