Managing prefix allocations for Amazon Direct Connect virtual interfaces
You can manage the number of inbound route prefixes allocated to each virtual interface on your Direct Connect connection. Use the Amazon Management Console, Amazon CLI, or Amazon SDKs to view your connection's prefix pool, allocate prefixes to virtual interfaces, and adjust allocations as your routing needs change.
Important
If the number of advertised prefixes on a virtual interface exceeds the allocated count, the BGP session on that virtual interface goes to an idle state (BGP DOWN). Ensure that your allocation is at least as large as the number of prefixes you plan to advertise.
Prerequisites
Before you manage prefix allocations, ensure that you have the following:
-
An active Direct Connect dedicated connection or LAG.
-
At least one private or transit virtual interface.
-
Permissions to call Direct Connect APIs (
directconnect:DescribeConnections,directconnect:DescribeVirtualInterfaces,directconnect:DescribeDirectConnectGateways,directconnect:UpdateVirtualInterfaceAttributes,directconnect:CreatePrivateVirtualInterface,directconnect:CreateTransitVirtualInterface).
View your connection's prefix pool
You can view the prefix pool for your connection to determine how many prefixes are available and how they are allocated across your virtual interfaces.
Set the prefix allocation when creating a virtual interface
You can set the prefix allocation for a virtual interface when you create it. This reserves a portion of the connection's prefix pool for the new virtual interface.
Update the prefix allocation on an existing virtual interface
You can update the prefix allocation on an existing virtual interface to increase or decrease the number of prefixes reserved for that interface.
View the Direct Connect gateway total prefix allocations
You can view the total prefix allocations across all virtual interfaces attached to a Direct Connect gateway.
Verify the allocation change
After you update a prefix allocation, the new value takes effect immediately. The BGP session remains up as long as the number of advertised prefixes does not exceed the new allocation. The API rejects requests to reduce an allocation below the number of prefixes currently in use on the VIF.
Troubleshooting
The following are common issues that you might encounter when managing prefix allocations.
- BGP session goes down after adding prefixes
-
The number of advertised prefixes exceeded the allocated count. Increase the allocation by using the
UpdateVirtualInterfaceAttributesAPI or the console. - Cannot decrease allocation
-
You cannot reduce a VIF's allocated value below the number of prefixes currently in use. First reduce the number of prefixes advertised by your on-premises device, then reduce the allocation.
- Cannot increase allocation
-
The connection's prefix pool might be fully allocated. Check the
prefixPoolUnallocatedCountIpv4andprefixPoolUnallocatedCountIpv6values on the connection. You might need to reduce allocations on other virtual interfaces first. - Direct Connect gateway total exceeds 10,000
-
The sum of all combined IPv4 and IPv6 allocations across virtual interfaces attached to a single Direct Connect gateway cannot exceed 10,000. Reduce allocations on other virtual interfaces or use a second gateway.