Building on unified address planning, IPAM supports address resource management and monitoring:
-
Allocate resources from IPAM pools: Allocate IP addresses to VPCs from planned IPAM pools according to your business rules, which centralizes IP address allocation across your organization.
-
Discover global address resources: Discover resources within your applicable regions to view their address utilization and overlaps.
-
Centralize multi-account management: Integrate with Resource Directory and specify a delegated administrator to enable the IPAM trusted service. This enables centralized management of IP address resources across member accounts.
-
Monitor resources: Use IP address monitoring features for more effective resource planning and allocation, ensuring network stability and security.
Allocate addresses from planned IPAM pools
In addition to allocating planned CIDR blocks from a top-level pool to a sub-pool, IPAM also supports the following:
-
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 during VPC interconnection.
-
Hybrid and multi-cloud address reservation: Create a custom allocation to reserve CIDR blocks used by on-premises data centers or other cloud providers. This prevents these CIDR blocks from being allocated to your cloud resources, avoiding conflicts during network connections.
After a network administrator shares a planned IPAM pool with a business account (the principal), the principal can use the shared pool to allocate addresses to a VPC or create a custom allocation.
Console
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.
-
If you select Allocated by IPAM, you can select an IPv4 address pool and configure a netmask. The system then automatically allocates the first available CIDR block within the specified netmask range, which you can adjust within the pre-configured CIDR blocks of the address pool.
-
To enable IPv6, you can select Allocated by IPAM, and then select an IPv6 IPAM pool and configure the netmask or specify a CIDR block.
-
-
Add a secondary CIDR block to an existing VPC:
-
Add an IPv4 CIDR block: On the CIDR Block Management tab of the target VPC details page, click Add Secondary IPv4 CIDR Block. Use the Allocated by IPAM option, select an IPv4 IPAM pool, and configure the netmask. The system automatically allocates the first available CIDR block within the specified netmask range.
-
Add IPv6 CIDR block: If IPv6 is not enabled for the VPC, click Enable IPv6. If it is already enabled, click Add IPv6 CIDR Block. Select the Allocated by IPAM option, select an IPv6 address pool, and configure the address mask or specify a CIDR block.
-
Create a custom allocation
Before you create a custom allocation, make sure that a CIDR block is provisioned for the destination pool.
-
Go to IPAM console - IPAM Pools. In the top navigation bar, select the region where the destination pool resides.
-
Click the target IPAM pool instance ID or Manage in the Actions column. On the Allocate tab, click Create Custom Allocation. The reserved address block will not be allocated to cloud resources.
-
Enter a CIDR block or click an allocatable CIDR block that is provisioned. You can add multiple CIDR blocks.
Release an allocation
Go to the Allocate tab on the details page of the target IPAM pool, and in the Actions column of the target allocation, click Release.
-
You can release allocations of the VPC and Custom Allocation types.
-
When you release an allocation of the VPC type, only the association between the VPC and the pool is removed. The VPC is not deleted.
API
Create a VPC with IPAM
-
Allocate an IPv4 CIDR block: When you call CreateVpc, pass
Ipv4IpamPoolIdto specify an IPAM pool andIpv4CidrMaskto specify a netmask. This allocates a CIDR block from the IPAM pool for the new VPC. Alternatively, you can passCidrBlockto specify the CIDR block for the VPC instead of automatically allocating one by specifying a netmask. -
Allocate an IPv6 CIDR block: When you allocate an IPv4 CIDR block, specify the
Ipv6IpamPoolIdandIpv6CidrMaskparameters. This allocates an IPv6 CIDR block to the VPC from the specified IPv6 IPAM pool.
Add a secondary CIDR block to a VPC
-
Add an IPv4 CIDR block: Call the AssociateVpcCidrBlock operation, set the
IpamPoolIdparameter to specify the IPAM pool, and set theSecondaryCidrMaskorSecondaryCidrBlockparameter. -
Add an IPv6 CIDR block: Call AssociateVpcCidrBlock. Pass
IpamPoolIdto specify the IPAM pool, and also passIpv6CidrMaskorIPv6CidrBlock.
Create a custom allocation
Call the CreateIpamPoolAllocation operation to create a custom allocation from an IPAM pool and reserve a 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 IPAM pools.
Resources: alicloud_vpc, alicloud_vpc_ipv4_cidr_block, and alicloud_vpc_ipam_ipam_pool_allocation
# Specify the region where the IPAM pool resides.
provider "alicloud" {
region = "cn-hangzhou"
}
# Specify the ID of the IPAM pool.
variable "ipam_pool_id" {
default = "ipam-pool-bp10******" # Replace the value 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 # Specify the IPv4 subnet 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 # Specify the IPv4 subnet 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 allocation from IPAM pools
In a multi-account enterprise, if business accounts can randomly allocate private CIDR blocks when they create VPCs, address conflicts may occur when the VPCs are interconnected. To prevent this issue, you can use a management account to create a control policy and attach the policy to a folder or a member. This way, business accounts can allocate CIDR blocks to VPCs only from shared IPAM pools. IPAM ensures that the allocated CIDR blocks do not overlap. This prevents address conflicts when VPCs are interconnected.
Control policies take effect on all RAM users and RAM roles within members in a resource directory, but not on the root users of the members. The management account of a resource directory is not a member of the resource directory. Therefore, control policies do not take effect on any identities of the management account.
View address usage with resource discovery
You can allocate addresses from planned IPAM pools to ensure that CIDR blocks that meet your business requirements are allocated to VPCs. For existing VPC and vSwitch resources, and for VPCs that are created without using IPAM, you can use the resource discovery feature to view the information about all VPC and vSwitch CIDR blocks.
VPCs created by using IPAM have a management status of Hosted, while existing resources and new resources created without using IPAM have a management status of Not hosted. The management status of a resource changes to Hosted if the resource meets specific rules and is imported into an IPAM pool.
Manage addresses with resource discovery
Resource discovery continuously discovers and tracks the IP utilization of VPC and VSwitch CIDR blocks in the Effective Region. After the discovered address ranges are associated with IPAM, IPAM centrally manages them.
1. By default, the applicable regions of a resource discovery are the same as those of the associated IPAM instance and cannot be modified.
2. Resource discoveries are updated every 5 minutes.
-
When you create an IPAM instance, a default resource discovery is created and associated with the IPAM instance. VPC CIDR blocks that meet the following rules are automatically imported into the corresponding pools for centralized management:
-
Only unallocated CIDR blocks that are within the range of the CIDR blocks provisioned for a pool are imported.
-
Only IPAM pools that have Automatically Import Discovered Resource enabled in the default scope are imported.
-
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 IP utilization of VPC and vSwitch CIDR blocks. After an IPAM instance is created in the home region, the custom resource discovery is automatically converted into a default resource discovery.
Console
Create a resource discovery
-
When you create an IPAM instance, a default resource discovery is created and associated with the IPAM instance.
-
If no IPAM instance is created, you can create a custom resource discovery.
-
Go to IPAM Console - Resource Discovery. At the top of the page, select a managed region and click Create Resource Discovery.
-
You can add other Effective Region in addition to the managed region. Resource discovery continuously scans for VPCs and VSwitch CIDR blocks within the Effective Region.
-
After the resource discovery is created, you can add or remove applicable regions. The home region cannot be removed.
-
-
After the creation is complete, on the Discovered Resource tab of the resource discovery details page, you can view the IP usage 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 associated IPAM instance.
-
Custom resource discovery: Click Delete in the Actions column of the custom resource discovery.
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 you can create a custom resource discovery.
provider "alicloud" {
region = "cn-shanghai"
}
resource "alicloud_vpc_ipam_ipam_resource_discovery" "example_ipam_resource_discovery" {
operating_region_list = ["cn-shanghai"] # Specify the applicable regions of the IPAM resource discovery.
ipam_resource_discovery_name = "example_ipam_resource_discovery_name"
}
Centralized management with shared resource discovery
Address conflicts may occur if a business account uses an unplanned CIDR block to create resources. To resolve address conflicts, a network administrator can associate an IPAM instance with a resource discovery shared by the business account to centrally manage resources across multiple accounts.
Both default and custom resource discoveries can be shared.
The applicable regions of a shared resource discovery and the associated IPAM instance can be different, but their home regions (creation regions) must be the same. If their applicable regions are different:
-
The resource owner (the business account in this example) and the network administrator can manage and view all resources in the applicable regions of the resource discovery.
-
After the network administrator associates the resource discovery with an IPAM instance, the administrator can manage only the resources in the applicable regions of the IPAM instance.
Console
This section describes how to share a vSwitch with any account. For information about how to share a resource only within a resource directory, see Share resources 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 and select the region of the target resource discovery at the top of the page. Click the target resource discovery instance ID or Actions in the Manage column, and on the Sharing Management tab, click Create Resource Share.
-
On the Create Resource Share page, follow the on-screen instructions to configure resource sharing.
-
Set Resources to IPAM Resource Discovery, and select the IPAM resource discovery that you want to share.
-
For IPAM resource discovery, the associated permission is
AliyunRSDefaultPermissionIpamResourceDiscovery. -
Set Principal Scope to Sharing with All Accounts and Method to Add Manually. In the Principal ID field, enter the Alibaba Cloud account ID of the principal, and then click Add.
-
After you verify the information, click Confirm at the bottom of the page.
-
-
-
Log on to the network administrator account to accept the sharing invitation.
-
Go to the Resource Sharing - Shared with Me page in the Resource Management console.
-
In the upper-left corner of the top menu bar, select the region where the shared resource is located, and click Accept in the Status column of the target resource share.
-
After the resource discovery is shared, the network administrator can view the resources and address utilization of each business account.
-
-
The network administrator associates the shared resource discovery with an IPAM instance in the same home region.
-
Go to the IPAM console. At the top of the page, select the region where the target IPAM instance is located. Click the target IPAM instance ID or Actions in the Manage 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, a network administrator can centrally manage resources within the IPAM's applicable region and view information such as address overlap and utilization on the Resource Management tab of the IPAM Scope.
-
Disassociate a resource discovery
You can disassociate only an IPAM instance that is manually associated with a resource discovery. You cannot disassociate an IPAM instance from the default resource discovery that is automatically created and associated when you create the IPAM instance.
On the Associated Resource Discovery tab of the target IPAM, click Disassociate in the Actions column of the target resource discovery. After the disassociation, IPAM will be unable to manage the address resources found by the resource discovery.
Stop sharing a resource discovery
Using your business account, on the Sharing Management tab of the Resource Discovery details page, click the target resource share to open its details page, and then select Delete Resource Share.
A business account can stop sharing a resource discovery even if the network administrator has associated the resource discovery with an IPAM instance. After the sharing is stopped, the association is automatically removed.
API
Share a resource discovery
-
Share a resource discovery with any account
-
Use the credentials of a business account to call CreateResourceShare to create a resource share, and ensure that the
AllowExternalTargetsparameter is set toTrue. -
Use the credentials of a network administrator to call the ListResourceShareInvitations operation to query the received resource sharing invitations and then call the AcceptResourceShareInvitation operation to accept a resource sharing invitation.
-
-
Share a resource discovery only within a resource directory
-
Use the credentials of the management account of a resource directory to call the EnableSharingWithResourceDirectory operation to enable sharing within the resource directory.
-
Use the credentials of a business account to call CreateResourceShare to create a resource share, and ensure that the
AllowExternalTargetsparameter is set toTrue.
-
-
Use the credentials of a business account to call the DeleteResourceShare operation to delete a resource share and stop sharing the resource discovery.
Associate a resource discovery
-
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 resource discoveries.
Multi-account address management
If an enterprise uses Resource Directory to build a multi-account system, the management account of the resource directory can specify a delegated administrator for IPAM. The delegated administrator can centrally view the usage of IP address resources across multiple accounts in the enterprise.
Scope
Only the delegated administrator of IPAM can perform operations on the trusted service of IPAM. The administrator of the resource directory or other members cannot perform operations on the trusted service.
-
Delegate an administrator: You can delegate only one member of a resource directory as the delegated administrator for the trusted service of IPAM. The management account of the resource directory cannot be specified as the delegated administrator.
-
Manage members:
-
After the delegated administrator of IPAM adds members, the trusted service of IPAM is enabled for the resource directory. If all members are removed, the trusted service of IPAM is disabled.
-
The delegated administrator of IPAM can select an IPAM instance in only one region to manage the members of a resource directory. If you want to use an IPAM instance in another region to manage accounts, you must remove all members from the IPAM instance in the current region, go to the multi-account management page of the IPAM instance in the other region, and then add members.
-
The delegated administrator of IPAM cannot manage the root folder of a resource directory or the resources in the root folder as a member.
-
Member accounts managed by IPAM cannot share their resource discovery with the IPAM delegated administrator.
-
If the number of member accounts that are managed by the trusted service of IPAM reaches the quota and a new member account is added to a managed folder in the resource directory, the new member account is not managed by the trusted service of IPAM.
-
-
Remove a delegated administrator: After all managed members are removed by the delegated administrator of IPAM, you can delete the delegated administrator account or remove the delegated administrator.
Console
-
Make sure that you have enabled a resource directory and created a multi-account system.
-
Using the management account of your Resource Directory, go to the Trusted Services page of Resource Management. Find IPAM and click Manage in the Actions column. In the delegated administrator account area, click Add to add a member of the Resource Directory as an IPAM delegated administrator.
-
After you use a delegated administrator account to create an IPAM, you can go to the IPAM - Multi-account Management page to Add Member. After the members are added, the delegated administrator can use resource discovery to view the IP address usage of all managed member accounts in the IPAM applicable regions.
Resource discoveries are updated every 5 minutes.
When the delegated administrator of IPAM manages members, IPAM creates a service-linked role for the member accounts and attaches the following permission policy to the role.
API
-
Call the EnableResourceDirectory operation to enable a 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 specify a delegated administrator for IPAM.
-
Use the delegated administrator of IPAM to call the OpenVpcIpamService operation to enable IPAM and then call the CreateIpam operation to create an IPAM instance.
-
Use the delegated administrator of IPAM to call the AddIpamMembers operation to add members. This way, you can centrally view the usage of IP address resources of all managed member accounts in the applicable regions of the IPAM instance.
Monitor resources
Monitor address utilization
You can monitor address utilization to scale out resources that have high utilization in a timely manner.
-
Monitor the address utilization of an IPAM pool: Go to the IPAM console - IPAM Pools page and click the ID of the destination pool.
-
On the Details tab, you can view the number of available IP addresses in the IPAM pool and the number of IP addresses allocated to resources and sub-pools. If the target IPAM pool is a sub-pool, you can also view the address utilization of the current pool and the source IPAM pool.
-
On the IP Usage and Allocate tabs, you can view the allocation details of the IPAM pool.
-
-
Monitor the address utilization of VPCs and vSwitches:
-
Go to the IPAM console - Resource Discovery page and click the ID of the destination resource discovery. You can view the CIDR blocks and IP utilization of all VPCs and vSwitches in the applicable regions.
-
Go to the IPAM console - IPAM Scopes page and click the ID of the destination scope.
-
On the Resource Management tab, you can view the CIDR and address utilization of VPCs and VSwitches within this scope. Click the ID of the target VPC or VSwitch to view the IP usage.
-
On the Monitoring Chart tab, you can use a line chart to monitor the address utilization of VPCs and VSwitches within the specified scope over time.
-
-
Monitor address overlaps
You can monitor address overlaps to proactively identify and resolve address conflicts in network connections. This ensures that access conflicts do not occur during network interconnection.
Go to the IPAM console - IPAM Scopes page and click the ID of the destination scope.
-
On the Resource Management tab, you can view overlaps between the CIDR blocks of VPCs and VSwitches within the scope. If CIDR blocks overlap, you can click Overlap Status (Overlapping) > View to view the specific instances that conflict with the current resource.
-
On the Monitoring Chart tab, you can view a line chart that displays the number of overlapping CIDRs within the specified scope over time.
Monitor management and compliance status
Go to IPAM console - IPAM scope and click the target scope ID. On the Overview, Resource Management, and Monitoring Chart tabs, you can view whether the CIDR block of a resource is allocated from an IPAM pool (that is, whether it is managed) and whether it complies with the allocation rules of the IPAM pool (that is, whether it is compliant).
More information
Billing
The IP Address Manager (IPAM) feature is in public preview. You can use this feature for free during the public preview.
Quotas
|
Name |
Description |
Default limit |
Adjustable |
|
custom_ipam_resource_discovery_quota_per_region |
The number of custom resource discoveries that can be created by an Alibaba Cloud account in a region |
1 |
Cannot be increased |
|
resource_share_quota_per_ipam_resource_discovery |
The number of resource shares that can be created for a 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 trusted service of IPAM |
1,000 |