Subchapter 90.3
references/creating-a-direct-connect-virtual-interface-and-configuring-bgp.mdMarkdown12 KBView on GitHub
Domain expertise for turning a live Direct Connect connection into something that carries traffic: a virtual interface (VIF) and a Border Gateway Protocol (BGP) session. Covers choosing the right virtual interface type for what the customer needs to reach, the jumbo-frame maximum transmission unit (MTU) decision, the BGP parameters that must match on both ends, and a troubleshooting branch for when the BGP session does not come up.
Does not cover choosing the connection model, reaching many VPCs through a Direct Connect gateway (a separate reference), encryption, or resiliency. Those are separate references.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. The Direct Connect console is regional; pass the
customer’s working --region on every aws directconnect command.
The type decides what the connection can reach and cannot be changed after creation.
| Type | Reaches | Use when |
|---|---|---|
| Private virtual interface | An Amazon VPC over private IP addresses (via a virtual private gateway or a Direct Connect gateway) | The customer needs to reach VPC resources |
| Public virtual interface | Public AWS services over public IP addresses | The customer needs to reach public AWS service endpoints |
| Transit virtual interface | One or more transit gateways associated with a Direct Connect gateway | The customer needs to reach many VPCs or a hub-and-spoke transit gateway |
Constraints:
| Virtual interface type | MTU options |
|---|---|
| Private | 1500 or 9001 |
| Transit | 1500 or 8500 |
| Public | 1500 only |
Constraints:
You SHOULD settle the MTU before creating the virtual interface. MTU can be changed on a live
private or transit virtual interface using update-virtual-interface-attributes, but this causes a
brief connectivity disruption (~30 seconds) for all VIFs on the underlying connection:
aws directconnect update-virtual-interface-attributes \
--virtual-interface-id {virtual_interface_id} --mtu {mtu} --region {region}You SHOULD confirm the per-type ceiling (9001 private, 8500 transit, 1500 public) when the customer wants jumbo frames.
Every virtual interface runs BGP. The session needs matching configuration on both ends.
Constraints:
amazonAddress/customerAddress) if the customer has
a preference; for IPv4, AWS auto-assigns them from a /30 if they are omitted.aws:SourceArn or aws:SourceAccount condition keys to restrict access to only the
Direct Connect virtual interface that needs the key and prevent confused-deputy scenarios.Constraints:
The session staying down is the real support driver. The cause is one of several, not just MD5. Work them in order.
describe-virtual-interfaces.The per-virtual-interface prefix limit was exceeded. Reduce advertised prefixes or request a higher allocation.
This procedure picks the virtual interface type, settles the MTU, creates the virtual interface with the BGP parameters, and verifies the session, with a fallback into the BGP troubleshooting branch if the session does not come up.
private, public, or transit.1500 (default), 9001 (private), or 8500 (transit). Can be changed post-creation with a brief disruption (~30s).Constraints for parameter acquisition:
Constraints:
aws sts get-caller-identity.aws sts assume-role)
rather than long-lived IAM user access keys for Direct Connect management operations.Constraints:
You MUST create the matching virtual interface type with the MTU set at creation. For a private virtual interface, target either a Direct Connect gateway (many VPCs, cross-Region, or cross-account) or a virtual private gateway (a single VPC) — use the parameter that matches the customer’s target, not both.
Via a Direct Connect gateway:
aws directconnect create-private-virtual-interface --connection-id {connection_id} \
--new-private-virtual-interface virtualInterfaceName={name},vlan={vlan},asn={customer_asn},mtu={mtu},directConnectGatewayId={dx_gw_id},addressFamily=ipv4 \
--region {region}Via a virtual private gateway (single VPC):
aws directconnect create-private-virtual-interface --connection-id {connection_id} \
--new-private-virtual-interface virtualInterfaceName={name},vlan={vlan},asn={customer_asn},mtu={mtu},virtualGatewayId={vgw_id},addressFamily=ipv4 \
--region {region}For a transit virtual interface, you MUST cap the MTU at 8500 (not 9001):
aws directconnect create-transit-virtual-interface --connection-id {connection_id} \
--new-transit-virtual-interface virtualInterfaceName={name},vlan={vlan},asn={customer_asn},mtu={mtu},directConnectGatewayId={dx_gw_id},addressFamily=ipv4 \
--region {region}You MUST capture the virtualInterfaceId from the response.
Constraints:
You MUST give the customer the downloadable router configuration and confirm the MD5 key matches exactly on both ends.
You MUST check the virtual interface state and BGP status:
aws directconnect describe-virtual-interfaces --virtual-interface-id {virtual_interface_id} --region {region}If the session does not come up, you MUST work the BGP-not-coming-up branch (MD5, VLAN, ASN/peer IP, Layer 2, Layer 1) rather than stopping.
Constraints:
You MUST present the Direct Connect console link, filling {virtual_interface_id} and {region} from
the response, and tell the customer to confirm the virtual interface and BGP status there:
https://console.aws.amazon.com/directconnect/v2/home?region={region}#/virtual-interfaces/{virtual_interface_id}You SHOULD recommend CloudWatch alarms on the virtual interface state and BGP status metrics, and
confirm CloudTrail is capturing directconnect API calls with log file validation enabled and the
trail encrypted with a KMS key, and any CloudWatch Logs log groups receiving these events or alarm
state data encrypted with a KMS key, so state changes trigger alerts and configuration changes are
audited with assured log integrity and confidentiality rather than relying on manual detection.
You SHOULD ensure any SNS topics receiving Direct Connect alarm notifications are encrypted with a KMS key and that subscriptions are restricted to authorized operations personnel.
aws sts assume-role) for Direct Connect management operations rather than long-lived
IAM user access keys.directconnect API actions to the
specific actions and resource ARNs each principal needs, and MUST NOT grant directconnect:* on
resource * or attach any *FullAccess managed policy.