Building on unified address planning, IP Address Manager (IPAM) supports address resource management and resource monitoring:
Allocate IP addresses from your planned IPAM pools to VPCs based on your business rules. This centralizes IP address allocation across your organization.
Discover global address resources: Use resource discovery to find resources within an operating region and view their address utilization and overlap status.
Manage multiple accounts: Integrate with Resource Directory and enable the IPAM trusted service by specifying a delegated administrator to centrally manage the IP address resources of member accounts.
Monitor resources: Monitoring IP addresses improves resource planning and allocation, which helps ensure network stability and security.
Allocate addresses from planned IPAM pools
During address planning, you can assign a planned CIDR block from a top-level pool to a sub-pool. You can also:
VPC CIDR block allocation: When you allocate a primary or secondary CIDR block to a VPC, IPAM ensures that the allocated CIDR blocks do not overlap. This prevents address conflicts when you interconnect VPCs.
Hybrid and multi-cloud address reservation: Create a custom allocation to reserve CIDR blocks for on-premises data centers or services on other clouds. This reserves the CIDR blocks, preventing them from being allocated to your cloud resources and avoiding network conflicts.
After a network administrator shares a planned IPAM pool with a business account (the principal), the business account can use the shared IPAM pool to allocate a CIDR block to a VPC or create a custom allocation.
Console
Before you begin, make sure that you have created an IPAM instance and an IPAM pool.
Allocate a CIDR block to a VPC
Create a VPC with IPAM:
Go to the Create VPC page in the VPC console.
Set the IPv4 CIDR block to Allocated by IPAM, select an IPv4 IPAM pool, and then configure the mask. By default, IPAM allocates the first available CIDR block that matches the specified mask. You can adjust the allocated IPv4 CIDR block within the pool's provisioned CIDR blocks.
If you need to enable IPv6, set the IPv6 CIDR block to Allocated by IPAM, select an IPv6 IPAM pool, and then configure the address mask or specify a CIDR block.
Add a secondary CIDR block to an existing VPC:
To add an IPv4 CIDR block, go to the CIDR Block Management tab of the target VPC. Click Add Secondary IPv4 CIDR Block, set the allocation method to Allocated by IPAM, and then select an IPv4 IPAM pool and configure the mask. The system allocates the first available CIDR block that matches the specified mask by default.
To add an IPv6 CIDR block, click Enable IPv6 if IPv6 is not enabled for the VPC, or click Add IPv6 CIDR Block if IPv6 is already enabled. Then, set the allocation method to Allocated by IPAM, choose an IPv6 IPAM pool, and configure the address mask or specify a CIDR block.
Create a custom allocation
Before you create a custom allocation, ensure that a CIDR block is provisioned for the target IPAM pool.
Go to the IPAM console - IPAM Pools page. In the top navigation bar, select the region where the target IPAM pool is located.
Click the ID of the target IPAM pool or click Manage in the Actions column. On the Allocate tab, click Create Custom Allocation. The reserved CIDR block is not allocated to any cloud resources.
Enter a CIDR block or click an available CIDR block from the provisioned range. You can add multiple CIDR blocks.
Release an address allocation
On the details page of the target IPAM pool, click the Allocate tab. Find the target allocation and click Release in the Actions column.
You can release VPC allocations and custom allocations.
Releasing a VPC allocation removes its association with the IPAM pool but does not delete the VPC.
API
Create a VPC with IPAM
Allocate an IPv4 CIDR block: Call the CreateVpc operation and specify the
Ipv4IpamPoolIdparameter to use an IPAM pool and theIpv4CidrMaskparameter to allocate an IPv4 CIDR block from the IPAM pool to the new VPC. You can also specify theCidrBlockparameter to use a specific CIDR block for the VPC instead of automatically allocating a CIDR block by specifying a mask.Allocate an IPv6 CIDR block: When you allocate the IPv4 CIDR block, specify the
Ipv6IpamPoolIdandIpv6CidrMaskparameters to assign an IPv6 CIDR block from the specified IPv6 IPAM pool to the VPC.
Add a secondary CIDR block to an existing VPC
Add an IPv4 CIDR block: Call the AssociateVpcCidrBlock operation. Specify the
IpamPoolIdparameter to use an IPAM pool. You must also specify theSecondaryCidrMaskorSecondaryCidrBlockparameter.Add an IPv6 CIDR block: Call the AssociateVpcCidrBlock operation. Specify the
IpamPoolIdparameter to use an IPAM pool. You must also specify theIpv6CidrMaskorIPv6CidrBlockparameter.
Create a custom allocation
Call the CreateIpamPoolAllocation operation to create a custom allocation from an IPAM pool and reserve a specific CIDR block.
Release an allocation
Call the DeleteIpamPoolAllocation operation to release an allocation from an IPAM pool.
Terraform
Terraform does not support allocating IPv6 CIDR blocks to VPCs from an IPAM instance.
Resources: alicloud_vpc, alicloud_vpc_ipv4_cidr_block, and alicloud_vpc_ipam_ipam_pool_allocation
# Specify the region where the IPAM pool is located.
provider "alicloud" {
region = "cn-hangzhou"
}
# Specify the ID of the IPAM pool.
variable "ipam_pool_id" {
default = "ipam-pool-bp10******" # Replace with the actual ID of the IPAM pool.
}
# Create a VPC and allocate a primary CIDR block to the VPC.
resource "alicloud_vpc" "example_ipam_vpc" {
vpc_name = "example_ipam_vpc_name"
ipv4_ipam_pool_id = var.ipam_pool_id # Specify the ID of the IPAM pool.
ipv4_cidr_mask = 24 # The IPv4 network mask.
}
# Allocate a secondary CIDR block to the VPC.
resource "alicloud_vpc_ipv4_cidr_block" "example_secondary_cidr_block" {
vpc_id = alicloud_vpc.example_ipam_vpc.id # Specify the ID of the VPC.
ipv4_ipam_pool_id = var.ipam_pool_id # Specify the ID of the IPAM pool.
secondary_cidr_mask = 20 # The IPv4 network mask.
}
# Create a custom allocation.
resource "alicloud_vpc_ipam_ipam_pool_allocation" "example_ipam_pool_allocation" {
ipam_pool_allocation_name = "example_ipam_pool_allocation_name"
ipam_pool_id = var.ipam_pool_id # Specify the ID of the IPAM pool.
cidr = "10.0.160.0/22" # Reserve the specified CIDR block.
}Restrict CIDR block allocation from an IPAM pool
In a multi-account environment, CIDR block conflicts often arise when business accounts independently create VPCs with private CIDR blocks. To prevent arbitrary allocation, you can use a management account to create a control policy and attach it to a folder or member. This policy restricts business accounts to allocating VPC CIDR blocks only from shared IPAM pools. IPAM ensures that the allocated CIDR blocks do not overlap, preventing address conflicts when you connect VPCs.
A control policy applies to all RAM users and RAM roles of the members in a Resource Directory but not to the root users of the member accounts. In addition, the management account of a Resource Directory is external to the Resource Directory and does not belong to it.
View address usage with resource discovery
Allocating addresses from a planned IPAM pool ensures that the CIDR blocks allocated to VPCs comply with your business rules. For existing VPCs and vSwitches, and for VPCs created without using IPAM, you can use resource discovery to view information about all VPC and vSwitch CIDR blocks.
The management status of VPCs created with IPAM is Hosted. The management status of existing resources and resources created without using IPAM is Not hosted. If a resource meets the import rules and is imported into an IPAM pool, its management status changes to Hosted.
Manage addresses with resource discovery
Resource discovery continuously discovers and tracks the address utilization of VPC and vSwitch CIDR blocks within the Effective Region. After you associate a resource discovery with an IPAM instance, the IPAM instance centrally manages the discovered CIDR blocks.
1. By default, the operating region of a resource discovery is the same as the region of the IPAM instance and cannot be modified.
2. Resource discovery is updated every 5 minutes.
When you create an IPAM instance, the system creates a default resource discovery and associates it with the IPAM instance. VPC CIDR blocks that meet the following rules are automatically imported into the corresponding IPAM pool for centralized management.
Only unallocated CIDR blocks that are within the provisioned CIDR range of an IPAM pool are imported.
CIDR blocks are imported only into the IPAM pools for which Automatically Import Discovered Resource is enabled in the default scope.
If multiple discovered CIDR blocks overlap, IPAM imports only the largest CIDR block.
If multiple identical CIDR blocks are discovered, IPAM randomly imports one of them.
If no IPAM instance is created, you can create a custom resource discovery to track the address utilization of VPC and vSwitch CIDR blocks. After you create an IPAM instance in the managed region, the custom resource discovery is automatically converted into a default resource discovery.
Console
Create a resource discovery
When you create an IPAM instance, the system creates a default resource discovery and associates it with the IPAM instance.
If no IPAM instance is created, create a custom resource discovery.
Go to the IPAM console - Resource Discovery page. In the top navigation bar, select the region where you want to create the resource discovery. The region you select becomes the managed region. Then, click Create Resource Discovery.
In addition to the managed region, you can add other Effective Region. The resource discovery continuously discovers VPCs and vSwitch CIDR blocks within all Effective Region.
After the resource discovery is created, you can add or remove operating regions. However, the managed region cannot be removed.
After a resource discovery is created, you can go to the Discovered Resource tab on its details page to view the address utilization of VPC and vSwitch CIDR blocks in the Effective Region.
Delete a resource discovery
Default resource discovery: You can delete a default resource discovery only by deleting the IPAM instance.
Custom resource discovery: Find the custom resource discovery and click Delete in the Actions column.
API
If no IPAM instance is created:
Call the CreateIpamResourceDiscovery operation to create a custom resource discovery.
Call the DeleteIpamResourceDiscovery operation to delete a custom resource discovery.
Terraform
If no IPAM instance is created, you can create a custom resource discovery.
Resources: alicloud_vpc_ipam_ipam_resource_discovery
# Specify a region where no IPAM instance is created and a custom resource discovery can be created.
provider "alicloud" {
region = "cn-shanghai"
}
resource "alicloud_vpc_ipam_ipam_resource_discovery" "example_ipam_resource_discovery" {
operating_region_list = ["cn-shanghai"] # Specify the operating region of the IPAM resource discovery.
ipam_resource_discovery_name = "example_ipam_resource_discovery_name"
}Centralized management with shared resource discovery
If business accounts use unplanned CIDR blocks to create resources, address conflicts may occur. A network administrator can associate an IPAM instance with a resource discovery that is shared by a business account to centrally manage resources across multiple accounts and resolve address conflicts.
Both default and custom resource discoveries can be shared.
The operating regions of a shared resource discovery and the network administrator's IPAM instance can be different, but their managed regions (creation regions) must be the same. If the operating regions are different, the following rules apply:
The resource owner (the business account in this example) and the network administrator can manage and view all resources within the operating regions of the resource discovery.
After the network administrator associates the resource discovery with an IPAM instance, the administrator can manage only the resources within the operating regions of the IPAM instance.
Console
This section describes how to share a resource discovery with any account. To share resources only within a resource directory, see Share resources only within a Resource Directory.
Share a resource discovery
A business account shares a created resource discovery with a network administrator:
Go to the IPAM console - Resource Discovery page. In the top navigation bar, select the region where the resource discovery is located. Click the instance ID of the resource discovery or click Manage in the Actions column. On the Sharing Management tab, click Create Resource Share.
On the Create Resource Share page, follow the on-screen instructions to configure the resource share.
Set Resources to IPAM Resource Discovery and select the IPAM resource discovery that you want to share.
The permission associated with an IPAM resource discovery is
AliyunRSDefaultPermissionIpamResourceDiscovery.For Principal Scope, select Sharing with All Accounts. For Method, select Add Manually. Enter the Alibaba Cloud account ID of the principal in the Principal ID field and click Add.
After you review the information, click Confirm at the bottom of the page.
Log on to the network administrator account and accept the sharing invitation:
Go to the Resource Sharing - Shared To Me page in the Resource Management console.
In the top-left corner of the top menu bar, select the region that contains the shared resource. Then, click Accept in the Status column for the target resource share.
After the resource is shared, the network administrator can view information about the resources and address utilization of each business account.
The network administrator associates the shared resource discovery with an IPAM instance in the same managed region:
Go to the IPAM console - IPAM page and select the region where the target IPAM instance is located. Click the instance ID of the target IPAM instance or Manage in the Actions column. On the Associated Resource Discovery tab, click Associated Resource Discovery and select the resource discovery shared by the business account.
After the association is complete, the network administrator can centrally manage resources in the operating regions of the IPAM instance. On the Resource Management tab of IPAM Scope, you can view information such as address overlaps and address utilization.
Disassociate IPAM from a resource discovery
You can disassociate only manually associated resource discoveries. The default resource discovery created with an IPAM instance cannot be disassociated.
On the Associated Resource Discovery tab of the target IPAM instance, click Disassociate in the Actions column for the resource discovery. After the resource discovery is disassociated, the IPAM instance can no longer manage its discovered address resources.
Stop sharing a resource discovery
Log on with the business account. On the Resource Discovery details page, click the Sharing Management tab. Then, click the target resource share to go to the details page and select Delete Resource Share.
Even if the network administrator has associated the resource discovery with an IPAM instance, the business account can stop the sharing. When sharing is stopped, the association is automatically deleted.
API
Share a resource discovery
Share a resource discovery with any account
Use the credentials of the business account to call the CreateResourceShare operation to create a resource share. Make sure that the
AllowExternalTargetsparameter is set toTrue.Use the credentials of the network administrator to call ListResourceShareInvitations to query the received resource sharing invitations, and then call AcceptResourceShareInvitation to accept the invitation.
Share a resource discovery only within a Resource Directory
Use the credentials of the management account of your Resource Directory to call the EnableSharingWithResourceDirectory operation to enable sharing across your organization.
Use the credentials of the business account to call the CreateResourceShare operation to create a resource share. Make sure that the
AllowExternalTargetsparameter is set toFalse.
Use the credentials of the business account to call the DeleteResourceShare operation to delete a resource share and stop sharing the resource discovery.
Associate a resource discovery with IPAM
Call the AssociateIpamResourceDiscovery operation to associate a resource discovery with an IPAM instance.
Call the DissociateIpamResourceDiscovery operation to disassociate a resource discovery from an IPAM instance.
Terraform
Terraform does not support sharing a resource discovery.
View IP information of discovered resources
You can use resource discovery to view the details of all used private IPv4 addresses within discovered VPCs and vSwitches. The details include the IP address, resource ID, the region to which the resource belongs, and the cloud service type. This helps you gain a comprehensive understanding of address utilization in your network.
You can query IP information only for VPCs and vSwitches managed by a resource discovery.
You can filter by VPC ID, vSwitch ID, or CIDR block. You can specify any valid IPv4 CIDR block, including a
/32CIDR block to match a specific IP address. The CIDR block must be used in combination with a VPC ID or vSwitch ID.The following query combinations are supported: VPC ID only, vSwitch ID only, VPC ID + CIDR, vSwitch ID + CIDR, and VPC ID + vSwitch ID + CIDR.
Console
Go to the IPAM console - Resource Discovery page and click the ID of the target resource discovery to go to its details page.
On the Discovered Resource tab, expand the VPC or vSwitch resource tree. Find the target resource and click View in the IP Addresses column. The system automatically navigates to the IP Addresses tab with preset filter conditions.
You can also directly click the IP Addresses tab and manually enter filter conditions to perform a query.
API
Call the ListIpamDiscoveredIpAddresses operation. Specify the VpcId, VSwitchId, or Cidr parameter to query the detailed IP address information of discovered resources.
Multi-account address resource management
If your enterprise uses a Resource Directory to manage multiple accounts, the management account of the Resource Directory can set a delegated administrator for IPAM. The IPAM delegated administrator can then centrally view address resource utilization across all accounts in the enterprise.
Usage notes
Only the IPAM delegated administrator of the Resource Directory can perform operations for the IPAM trusted service. The organization administrator or other members cannot perform these operations.
Delegate an administrator: A Resource Directory supports only one delegated administrator for the IPAM trusted service. The delegated administrator account must be a member account of the Resource Directory and cannot be the management account of the organization.
Manage members:
When the IPAM delegated administrator adds a member, the IPAM trusted service is enabled for the resource directory. When all members are removed, the IPAM trusted service is disabled.
To manage members by using an IPAM instance in a different region, you must first remove all members from the current instance and then add them to the new one.
The IPAM delegated administrator cannot manage the root node or the root folder of the Resource Directory as a member.
Member accounts managed by an IPAM instance cannot share their own resource discoveries with the IPAM delegated administrator.
If you reach the member account quota for the IPAM trusted service, any new accounts added to a managed folder in the Resource Directory will not be managed by the service.
Revoke delegation: When the IPAM delegated administrator removes all managed members, you can delete the delegated administrator account or revoke the delegation.
Console
Make sure that you have enabled Resource Directory and created a multi-account system.
Log on with the management account of your Resource Directory and go to the Trusted Services page of Resource Management. Find IP Address Manager and click Manage in the Actions column. In the Delegated Administrator Account section, click Add and select a member of the resource directory to designate as the IPAM delegated administrator.
Log on with the IPAM delegated administrator account and create an IPAM instance. Then, go to the IPAM - Multi-account Management page and Add Member. After you add the members, the delegated administrator can use resource discovery to view the address utilization of all managed member accounts in the operating regions of the IPAM instance.
Resource discovery is updated every 5 minutes.
When an IPAM delegated administrator manages members, IPAM creates a service-linked role for each included member account and attaches the following access policy.
API
Call the EnableResourceDirectory operation to enable Resource Directory. Then, call the CreateFolder and CreateResourceAccount operations to create a multi-account system.
Use the management account of the Resource Directory to call the RegisterDelegatedAdministrator operation to set the IPAM delegated administrator.
The IPAM delegated administrator calls the OpenVpcIpamService operation to enable IPAM and then calls the CreateIpam operation to create an IPAM instance.
The IPAM delegated administrator calls AddIpamMembers to add members and centrally view IP address resource usage information for all managed member accounts in the IPAM operating region.
Resource monitoring
Monitor address utilization
Monitor address utilization to promptly scale up resources that have high utilization.
To monitor the address utilization of an IPAM pool, go to the IPAM console - IPAM Pools page and click the ID of the target IPAM pool.
On the Details tab, you can view the number of available IP addresses in the IPAM pool and the number of IP addresses that are allocated to resources and sub-pools. If the IPAM pool is a sub-pool, you can also view the address utilization of both the sub-pool and its source pool.
On the IP Usage and Allocate tabs, you can view the allocation details of the IPAM pool.
To monitor the address utilization of VPCs and vSwitches:
Go to the IPAM console - Resource Discovery page. Click the ID of the target resource discovery to view the CIDR blocks and address utilization of all VPCs and vSwitches within the operating regions.
Go to the IPAM console - IPAM Scopes page and click the ID of the target scope.
On the Resource Management tab, you can view the CIDR blocks and address utilization of VPCs and vSwitches within this scope. Click the ID of a VPC or vSwitch to view its address utilization.
On the Monitoring Chart tab, you can use line charts to monitor the address utilization of VPCs and vSwitches within this scope over time.
Monitor address overlaps
Monitor address overlaps to proactively identify and resolve address conflicts in your network. This prevents access conflicts during network interconnection.
Go to the IPAM console - IPAM Scopes page and click the ID of the target scope.
On the Resource Management tab, you can view the overlap status of VPC and vSwitch CIDR blocks within the current scope. If any CIDR blocks overlap, click View in the Overlap Status (Overlapping) column to view the details of the conflicting instances.
On the Monitoring Chart tab, the line charts allow you to monitor the number of overlapping CIDR blocks in this scope over time.
Monitor CIDR block management and compliance
Go to the IPAM console - IPAM Scopes page and click the ID of the target scope. On the Overview, Resource Management, and Monitoring Chart tabs, you can check whether a resource's CIDR block is managed by an IPAM pool and whether it complies with the pool's allocation rules.
More information
Billing
IP Address Manager (IPAM) is in public preview and is free of charge during the preview period.
Quotas
Quota name | Description | Default limit | Increase quota |
custom_ipam_resource_discovery_quota_per_region | The number of custom resource discoveries that an Alibaba Cloud account can create in a region. | 1 | Cannot be increased |
resource_share_quota_per_ipam_resource_discovery | The number of resource shares that can be created for each resource discovery. | 100 | |
shared_ipam_resource_discovery_quota_per_user | The number of shared resource discoveries that a user can have. | 100 | |
ipam_resource_directory_member_detail_quota | The maximum number of member accounts that can be managed by the IPAM trusted service. | 1,000 |