このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Step 5: Configuring the Customer Gateway Device

Updated on 2024-12-20 GMT+08:00

Procedure

NOTE:

In this example, the customer gateway device is an AR router.

  1. Log in to the AR router.
  2. Enter the system view.

    <AR651>system-view

  3. Configure an IP address for the WAN interface. In this example, the WAN interface of the AR router is GigabitEthernet 0/0/8.

    [AR651]interface GigabitEthernet 0/0/8
    [AR651-GigabitEthernet0/0/8]ip address 22.xx.xx.22 255.255.255.0
    [AR651-GigabitEthernet0/0/8]quit

  4. Configure a default route.

    [AR651]ip route-static 0.0.0.0 0.0.0.0 22.xx.xx.1

    In this command, 22.xx.xx.1 is the gateway address of the AR router's public IP address. Replace it with the actual gateway address.

  5. Enable the SHA-2 algorithm to be compatible with the standard RFC algorithms.

    [AR651]IPsec authentication sha2 compatible enable

  6. Configure an IPsec proposal.

    [AR651]IPsec proposal hwproposal1
    [AR651-IPsec-proposal-hwproposal1]esp authentication-algorithm sha2-256
    [AR651-IPsec-proposal-hwproposal1]esp encryption-algorithm aes-128
    [AR651-IPsec-proposal-hwproposal1]quit

  7. Configure an IKE proposal.

    [AR651]ike proposal 2
    [AR651-ike-proposal-2]encryption-algorithm aes-128
    [AR651-ike-proposal-2]dh group14
    [AR651-ike-proposal-2]authentication-algorithm sha2-256
    [AR651-ike-proposal-2]authentication-method pre-share
    [AR651-ike-proposal-2]integrity-algorithm hmac-sha2-256
    [AR651-ike-proposal-2]prf hmac-sha2-256
    [AR651-ike-proposal-2]quit

  8. Configure IKE peers.

    [AR651]ike peer hwpeer1
    [AR651-ike-peer-hwpeer1]undo version 1
    [AR651-ike-peer-hwpeer1]pre-shared-key cipher Test@123
    [AR651-ike-peer-hwpeer1]ike-proposal 2
    [AR651-ike-peer-hwpeer1]local-address 22.xx.xx.22
    [AR651-ike-peer-hwpeer1]remote-address 11.xx.xx.11
    [AR651-ike-peer-hwpeer1]rsa encryption-padding oaep
    [AR651-ike-peer-hwpeer1]rsa signature-padding pss
    [AR651-ike-peer-hwpeer1]ikev2 authentication sign-hash sha2-256
    [AR651-ike-peer-hwpeer1]quit
    [AR651]ike peer hwpeer2
    [AR651-ike-peer-hwpeer2]undo version 1
    [AR651-ike-peer-hwpeer2]pre-shared-key cipher Test@123
    [AR651-ike-peer-hwpeer2]ike-proposal 2
    [AR651-ike-peer-hwpeer2]local-address 22.xx.xx.22
    [AR651-ike-peer-hwpeer2]remote-address 11.xx.xx.12
    [AR651-ike-peer-hwpeer2]rsa encryption-padding oaep
    [AR651-ike-peer-hwpeer2]rsa signature-padding pss
    [AR651-ike-peer-hwpeer2]ikev2 authentication sign-hash sha2-256
    [AR651-ike-peer-hwpeer2]quit

    The commands are described as follows:

    • pre-shared-key cipher: configures a PSK, which must be the same as that configured on the VPN console.
    • local-address: specifies the public IP address of the AR router.
    • remote-address: specifies the active EIP or active EIP 2 of the VPN gateway.

  9. Configure an IPsec profile.

    [AR651]IPsec profile hwpro1
    [AR651-IPsec-profile-hwpro1]ike-peer hwpeer1
    [AR651-IPsec-profile-hwpro1]proposal hwproposal1
    [AR651-IPsec-profile-hwpro1]pfs dh-group14
    [AR651-IPsec-profile-hwpro1]quit
    [AR651]IPsec profile hwpro2
    [AR651-IPsec-profile-hwpro2]ike-peer hwpeer2
    [AR651-IPsec-profile-hwpro2]proposal hwproposal1
    [AR651-IPsec-profile-hwpro2]pfs dh-group14
    [AR651-IPsec-profile-hwpro2]quit

  10. Configure virtual tunnel interfaces.

    [AR651]interface Tunnel0/0/1
    [AR651-Tunnel0/0/1]mtu 1400
    [AR651-Tunnel0/0/1]ip address 169.254.70.1 255.255.255.252
    [AR651-Tunnel0/0/1]tunnel-protocol IPsec
    [AR651-Tunnel0/0/1]source 22.xx.xx.22
    [AR651-Tunnel0/0/1]destination 11.xx.xx.11
    [AR651-Tunnel0/0/1]IPsec profile hwpro1
    [AR651-Tunnel0/0/1]quit
    [AR651]interface Tunnel0/0/2
    [AR651-Tunnel0/0/2]mtu 1400
    [AR651-Tunnel0/0/2]ip address 169.254.71.1 255.255.255.252
    [AR651-Tunnel0/0/2]tunnel-protocol IPsec
    [AR651-Tunnel0/0/2]source 22.xx.xx.22
    [AR651-Tunnel0/0/2]destination 11.xx.xx.12
    [AR651-Tunnel0/0/2]IPsec profile hwpro2
    [AR651-Tunnel0/0/2]quit

    The commands are described as follows:

    • interface Tunnel0/0/1 and interface Tunnel0/0/2: indicate the tunnel interfaces corresponding to the two VPN connections.

      In this example, Tunnel0/0/1 establishes a VPN connection with the active EIP of the VPN gateway, and Tunnel0/0/2 establishes a VPN connection with active EIP 2 of the VPN gateway.

    • ip address: configures an IP address for a tunnel interface on the AR router.
    • source: specifies the public IP address of the AR router.
    • destination: specifies the active EIP or active EIP 2 of the VPN gateway.

  11. Configure NQA.

    [AR651]nqa test-instance IPsec_nqa1 IPsec_nqa1
    [AR651-nqa-IPsec_nqa1-IPsec_nqa1]test-type icmp
    [AR651-nqa-IPsec_nqa1-IPsec_nqa1]destination-address ipv4 169.254.70.2
    [AR651-nqa-IPsec_nqa1-IPsec_nqa1]source-address ipv4 169.254.70.1
    [AR651-nqa-IPsec_nqa1-IPsec_nqa1]frequency 15
    [AR651-nqa-IPsec_nqa1-IPsec_nqa1]ttl 255
    [AR651-nqa-IPsec_nqa1-IPsec_nqa1]start now
    [AR651-nqa-IPsec_nqa1-IPsec_nqa1]quit
    [AR651]nqa test-instance IPsec_nqa2 IPsec_nqa2
    [AR651-nqa-IPsec_nqa2-IPsec_nqa2]test-type icmp
    [AR651-nqa-IPsec_nqa2-IPsec_nqa2]destination-address ipv4 169.254.71.2
    [AR651-nqa-IPsec_nqa2-IPsec_nqa2]source-address ipv4 169.254.71.1
    [AR651-nqa-IPsec_nqa2-IPsec_nqa2]frequency 15
    [AR651-nqa-IPsec_nqa2-IPsec_nqa2]ttl 255
    [AR651-nqa-IPsec_nqa2-IPsec_nqa2]start now
    [AR651-nqa-IPsec_nqa2-IPsec_nqa2]quit

    The commands are described as follows:

    • nqa test-instance IPsec_nqa1 IPsec_nqa1 and nqa test-instance IPsec_nqa2 IPsec_nqa2: configure two NQA test instances named IPsec_nqa1 and IPsec_nqa2.

      In this example, the test instance IPsec_nqa1 is created for the VPN connection to which the active EIP of the VPN gateway belongs; the test instance IPsec_nqa2 is created for the VPN connection to which active EIP 2 of the VPN gateway belongs.

    • destination-address: specifies the tunnel interface address of the VPN gateway.
    • source-address: specifies the tunnel interface address of the AR router.

  12. Configure association between the static route and NQA.

    [AR651]ip route-static 192.168.0.0 255.255.255.0 Tunnel0/0/1 track nqa IPsec_nqa1 IPsec_nqa1
    [AR651]ip route-static 192.168.0.0 255.255.255.0 Tunnel0/0/2 track nqa IPsec_nqa2 IPsec_nqa2

    The parameters are described as follows:

    • 192.168.0.0 indicates the local subnet of the VPC.
    • Tunnelx and IPsec_nqax in the same command correspond to the same VPN connection.

Verification

  1. Log in to the management console.
  2. Click in the upper left corner of the page, and choose Networking > Virtual Private Network.
  3. In the navigation pane on the left, choose Virtual Private Network > Enterprise – VPN Connections.

    Verify that the states of the two VPN connections are both Normal.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback