- Newest
- Most votes
- Most comments
Hello Crown,
The repost Agent is correct. You don't need to move your appliance. The fix is simple: for NO_ENCAP Connect Peers, the SubnetArn must reference the subnet where the peer IP actually resides, not the subnet used by the VPC/transport attachment.
Root Cause:
The --subnet-arn parameter for NO_ENCAP Connect Peers serves a different purpose than you might expect. It tells Cloud WAN which subnet contains the ENI that will be the BGP peer. AWS validates that --peer-address falls within that subnet's CIDR range.
Your peer address is 10.0.1.50, which is in subnet-aaa (10.0.1.0/24). But you specified subnet-bbb (10.0.2.0/24), hence the "outside of subnet CIDR range" error.
Fix:
aws networkmanager create-connect-peer \ --connect-attachment-id attach-0abc123 \ --peer-address 10.0.1.50 \ --inside-cidr-blocks "10.255.0.0/29" \ --subnet-arn arn:aws:ec2:us-east-1:111122223333:subnet/subnet-aaa \ --bgp-options PeerAsn=65000
Simply change subnet-bbb to subnet-aaa the subnet where your CGW appliance (10.0.1.50) actually lives.
Why This Is Different from GRE Connect:
This is where the confusion comes from. With GRE-based Connect (encapsulated), the architecture is:
Core Network ←→ Connect Attachment ←→ Transport (VPC Attachment) ←→ Transit Subnet ←→ GRE Tunnel ←→ Appliance
In GRE mode, the transport attachment's subnet carries the outer GRE packets, and the SubnetArn logically refers to the transport path. The peer IP is the GRE tunnel endpoint, which can be a different IP than the ENI.
With NO_ENCAP Connect (tunnel-less), there's no encapsulation layer:
Core Network ←→ Connect Attachment ←→ Directly to Appliance ENI
The BGP session runs directly between the Core Network edge and your appliance's ENI. There's no tunnel, no outer header, no transport subnet involvement in the data path. The SubnetArn must point to where the actual ENI lives because:
- AWS needs to know which subnet to create/manage the Connect Peer's network path in
- AWS validates the peer IP belongs to that subnet
- The Core Network edge routes traffic directly to that subnet
Architecture Implications:
Your transit subnet (subnet-bbb) is still used for the VPC attachment, that's fine. The VPC attachment and the Connect Peer's subnet can be different. The routing works like this:
- VPC attachment uses
subnet-bbbfor its ENIs (this enables the VPC-to-CoreNetwork path) - Connect Peer references
subnet-aaawhere your appliance lives (this enables direct BGP peering) - The Connect attachment sits on top of the VPC attachment but the peer traffic flows directly to the appliance subnet
Important: Make sure subnet-aaa has a route table entry pointing the inside-cidr-blocks (10.255.0.0/29) toward the Core Network (via the VPC attachment). Without this route, return BGP traffic from your appliance won't reach the Core Network edge's inside IPs.
References:
The error you're encountering occurs because when using the NO_ENCAP protocol for a Cloud WAN Connect Peer, the peer address (your appliance's IP) must fall within the CIDR range of the subnet you specify in the --subnet-arn parameter.
In your case, you're specifying subnet-bbb (10.0.2.0/24) as the subnet ARN, but your appliance's peer address is 10.0.1.50, which belongs to subnet-aaa (10.0.1.0/24). This mismatch is causing the validation error.
To resolve this, you should specify the subnet where your appliance actually resides in the --subnet-arn parameter. Update your command to use subnet-aaa instead:
aws networkmanager create-connect-peer \ --connect-attachment-id attach-0abc123 \ --peer-address 10.0.1.50 \ --inside-cidr-blocks "10.255.0.0/29" \ --subnet-arn arn:aws:ec2:us-east-1:111122223333:subnet/subnet-aaa \ --bgp-options PeerAsn=65000
The --subnet-arn parameter is specifically for NO_ENCAP protocol and indicates which subnet contains the Connect peer appliance. This is separate from the subnets used by your VPC attachment. You don't need to move your appliance to the transit subnet - the Connect attachment can still be associated with your VPC attachment while the Connect peer references the subnet where your appliance actually lives.
Sources
ConnectPeerError - AWS Global Networks for Transit Gateways
create_connect_peer - Boto3 1.42.50 documentation
answered 5 months ago
Relevant content
asked a year ago
asked 6 months ago
asked 2 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 2 years ago

Cheers for the explanation!!!