Updated on 2023-11-21 GMT+08:00

Configuring Access Across CIDR Blocks

Access across CIDR blocks is required only when the CIDR blocks of the client and the replica set instance are different. For example, if the client CIDR block is 192.168.0.0/16 and the replica set instance's CIDR block is 172.16.0.0/24, add the CIDR block 192.168.0.0/16 so that the client can access the replica set instance.

This section describes how to configure access to an instance across CIDR blocks.

Procedure

  1. Log in to the management console.
  2. In the service list, choose Databases > GeminiDB Mongo API.
  3. On the Instances page, click the instance you want to configure access across CIDR blocks for.
  4. In the navigation pane on the left, choose Connections.
  5. In the Address area, click Enable to the right of Access Across CIDR Blocks field.

    Figure 1 Enabling access across CIDR blocks

  6. Configure the source client CIDR.

    Figure 2 Access across CIDR blocks
    • If there are multiple CIDR blocks, click to add them in sequence. Up to 9 CIDR blocks can be configured, but you cannot insert duplicate blocks.
    • The blocks starting with 127 are not allowed. The subnet mask ranges from 8 to 32.

  7. Confirm that access across CIDR blocks is enabled. Enabled is displayed to the right of the Access Across CIDR Blocks field.

    To change the CIDR, click Change to the right of Access Across CIDR Blocks to add, modify, or delete CIDR blocks.

    Figure 3 Changing a CIDR block

    To ensure the ECS and the DB instance can communicate with each other, configure the connection by referring to VPC Peering Connection Overview.