Welcome to AWS VPN Cloud Hub

Welcome everyone! Today we're diving deep into AWS VPN Cloud Hub - one of the most powerful yet underutilized networking solutions in AWS.

I've been working with VPN Cloud Hub implementations for several years, and I can tell you it's a game-changer for organizations with multiple branch offices. Instead of managing complex mesh VPN networks, you get a simple hub-and-spoke model.

Think of it like the hub of a bicycle wheel - all the spokes (your branch offices) connect to the central hub (AWS), and traffic can flow between any two spokes through the hub.

By the end of this presentation, you'll know exactly how to implement this solution step-by-step, troubleshoot common issues, and optimize costs.

What Problems Does VPN Cloud Hub Solve?

Let me share a real scenario I encountered. A client had 8 branch offices and wanted each office to communicate with every other office. Without Cloud Hub, they'd need 28 separate VPN connections in a full mesh topology!

Traditional solutions require either expensive MPLS circuits or complex site-to-site VPN meshes. Both are costly to manage and scale poorly.

VPN Cloud Hub transforms this into a simple hub-and-spoke model where each office only needs one VPN connection to AWS. The magic happens through BGP route propagation - offices automatically discover each other's networks.

The key benefits we're looking at include simplified management, automatic route discovery, built-in redundancy, and significant cost savings as you scale.

Understanding the Core Architecture

This diagram shows the fundamental architecture of VPN Cloud Hub. At the center, we have the Virtual Private Gateway - this is your hub that everything connects to.

Each branch office has a Customer Gateway - this represents the physical VPN device at that location. It could be a Cisco router, pfSense firewall, or even a software VPN endpoint.

The beauty is in the simplicity - instead of configuring VPN tunnels between every pair of offices, each office only configures one tunnel to AWS. The VGW handles routing traffic between offices automatically.

Notice how each office has its own IP range - 192.168.1.0/24, 192.168.2.0/24, etc. These ranges are learned automatically through BGP and propagated to all other offices.

AWS acts as the central nervous system, learning all the routes and making intelligent forwarding decisions.

How Traffic Flows Between Offices

Let me walk you through exactly what happens when Branch Office 1 wants to send data to Branch Office 2. This sequence diagram shows the complete flow.

First, a device in Branch Office 1 creates a packet destined for 192.168.2.100 - that's a server in Branch Office 2. The local Customer Gateway receives this packet and recognizes it needs to go through the VPN tunnel.

The Customer Gateway encrypts the packet using IPsec encryption and sends it through the tunnel to AWS. Here's where the magic happens - the Virtual Private Gateway examines the destination and consults its routing table.

Because of BGP route propagation, the VGW knows that 192.168.2.0/24 is reachable through Customer Gateway 2. It forwards the encrypted packet to the appropriate tunnel.

Customer Gateway 2 receives the packet, decrypts it, and delivers it to the destination server. The response follows the exact same path in reverse.

The entire process is transparent to end users - they just see normal network connectivity.

Implementation Roadmap

Now let's talk about the implementation process. I've broken this down into 10 logical steps that build upon each other.

We start with the foundation - creating the VPC and Internet Gateway. These provide the basic networking infrastructure in AWS.

Next, we create Customer Gateway objects for each remote location. These tell AWS about your on-premises VPN endpoints.

The Virtual Private Gateway is the heart of the solution - this is what actually terminates the VPN tunnels and performs routing.

Once we have the components, we create the VPN connections between each Customer Gateway and the VGW. Each connection provides two tunnels for redundancy.

Route propagation is critical - this enables the automatic discovery of remote networks. Without this, Cloud Hub simply won't work.

Finally, we configure the on-premises devices using the configuration files AWS generates for us.

Understanding Route Propagation

Route propagation is absolutely fundamental to how VPN Cloud Hub works. Let me explain what's happening here.

When you enable route propagation on the Virtual Private Gateway, it automatically takes routes learned via BGP from Customer Gateways and injects them into your VPC route tables.

For example, when Branch Office 1 establishes its BGP session and advertises 192.168.1.0/24, the VGW learns this route and automatically adds it to any route table with propagation enabled.

This means other offices automatically know how to reach Branch Office 1 without any manual configuration. It's completely dynamic - add a new office, and all existing offices immediately learn its routes.

This automatic route management is what makes Cloud Hub so scalable. In traditional networks, you'd need to manually configure routes on every device when adding new locations.

Prerequisites and Planning

Before we dive into commands, let's make sure we have everything we need. I've learned the hard way that proper planning prevents painful troubleshooting later.

First, you need the AWS CLI configured with appropriate permissions. Make sure your IAM user or role has EC2 VPN permissions - specifically ec2:CreateVpnConnection, ec2:CreateCustomerGateway, and related actions.

Public IP addresses are critical - each Customer Gateway location needs a static public IP. Dynamic IPs won't work because AWS needs to know exactly where to send traffic.

Plan your BGP ASN numbers carefully. Each Customer Gateway needs a unique ASN, and AWS will use 64512 by default. I typically use 65001, 65002, 65003, etc. for customer sites.

Network planning is crucial - make sure your branch office IP ranges don't overlap with your VPC CIDR or with each other. Document everything!

Step 1: Creating the Foundation VPC

Let's start building! The first step is creating our VPC - this is the foundation that everything else builds upon.

I'm using 10.0.0.0/16 here, which gives us plenty of room to grow. This CIDR block shouldn't conflict with any of your branch office networks.

The tag specification is important for organization and billing. I always recommend tagging your resources from day one - it makes management so much easier later.

You'll get back a VPC ID that looks like vpc-0a1b2c3d4e5f67890. Save this ID - you'll need it for subsequent commands.

The expected output shows the VPC in 'pending' state initially. It will move to 'available' within seconds. The DhcpOptionsId points to the default DHCP option set, and InstanceTenancy is 'default' unless you specifically need dedicated hardware.

Step 2: Internet Gateway Setup

Next, we need an Internet Gateway. This is essential because our VPN tunnels traverse the public internet to reach your branch offices.

The Internet Gateway provides the VPC with internet connectivity. Without it, the Virtual Private Gateway can't establish IPsec tunnels with your Customer Gateways.

Creating the gateway is just the first part - we also need to attach it to our VPC. This is a two-step process that's often overlooked.

The attachment command is critical and easy to forget. I've seen people wonder why their VPN isn't working, only to discover they created the IGW but never attached it!

Once attached, the Internet Gateway enables bidirectional internet communication for the VPC, which is required for IPsec tunnel establishment.

Step 3: Creating Customer Gateways

Now we're creating Customer Gateway objects for each of our branch offices. Think of these as AWS's representation of your physical VPN devices.

Each Customer Gateway needs three key pieces of information: the public IP address of your on-premises VPN device, the BGP ASN for that location, and a descriptive name.

I'm using different ASN numbers for each location - 65001, 65002, 65003. This is crucial for BGP to work properly. Each autonomous system needs a unique identifier.

The public IP addresses must be static. If you're using dynamic IPs from your ISP, you'll need to upgrade to static IPs or use a dynamic DNS solution.

Notice how I'm being very descriptive with the naming - 'Branch-Office-1-CGW' tells you exactly what this resource represents. Good naming conventions save time during troubleshooting.

Each Customer Gateway can support multiple VPN connections if needed, but for Cloud Hub, we typically use one connection per gateway.

Step 4: Creating the Virtual Private Gateway

Here's where we create the heart of our Cloud Hub - the Virtual Private Gateway. This is the central component that everything else connects to.

The VGW acts as the AWS-managed VPN concentrator. It handles IPsec tunnel termination, BGP routing, and traffic forwarding between all connected sites.

I'm specifying the Amazon-side ASN as 64512, which is AWS's default. This needs to be different from all your Customer Gateway ASNs to prevent BGP conflicts.

The VGW supports multiple routing options, but for Cloud Hub, we definitely want BGP dynamic routing. Static routing severely limits Cloud Hub functionality.

One VGW can support many VPN connections - the limit is quite high, so you're unlikely to hit it in normal deployments.

The 'pending' state you see initially will change to 'available' once AWS finishes provisioning the gateway.

Step 5: Attaching VGW to VPC

The attachment step is crucial - this is what connects our VGW to the VPC and enables it to inject routes into our route tables.

During attachment, AWS is setting up the internal plumbing that allows the VGW to communicate with resources in your VPC and propagate routes to route tables.

The attachment process typically takes 1-2 minutes. You'll see the state progress from 'attaching' to 'attached'. Don't proceed to the next step until this completes!

I always run the describe command afterward to verify the attachment succeeded. Look for 'State': 'attached' in the VpcAttachments section.

Once attached, the VGW becomes an available target for route table entries and can participate in route propagation.

Step 6: Creating VPN Connections

Now we're creating the actual VPN connections between each Customer Gateway and our Virtual Private Gateway. This is where the rubber meets the road!

Each VPN connection creates two IPsec tunnels for redundancy. AWS terminates these tunnels in different Availability Zones, so you get built-in high availability.

The key parameter here is 'StaticRoutesOnly=false'. This enables BGP dynamic routing, which is essential for Cloud Hub functionality. With static routing, offices can't discover each other automatically.

The CustomerGatewayConfiguration in the output is pure gold - it contains the complete configuration needed for your on-premises VPN device. AWS generates device-specific configs for major vendors.

VgwTelemetry shows the status of each tunnel. Initially, they'll show 'DOWN' because we haven't configured the on-premises side yet. Once configured, you should see 'UP' status.

Each connection takes 5-10 minutes to fully establish after both sides are configured.

Step 7: Enabling Route Propagation

Route propagation is absolutely critical for Cloud Hub - this is what makes the magic happen. Without it, your offices can't discover each other's networks.

First, we need to find our route table ID. Every VPC has a main route table created automatically. You can also create custom route tables for more granular control.

The enable-vgw-route-propagation command tells the route table to automatically accept routes learned by the Virtual Private Gateway via BGP.

Once enabled, when a Customer Gateway advertises its local network via BGP, that route automatically appears in your route table pointing to the VGW.

This is what enables the hub-and-spoke model - each office's routes are automatically distributed to all other offices through the central route table.

You can enable propagation on multiple route tables if you have a more complex VPC design with multiple subnets and routing domains.

Step 8: Verifying Route Propagation

Verification is crucial - this is how you know everything is working correctly. The route table should show all your branch office networks once BGP sessions are established.

In the expected output, you can see routes for 192.168.1.0/24, 192.168.2.0/24, and 192.168.3.0/24 - these are the networks from our three branch offices.

Each route points to the Virtual Private Gateway as the target. This tells AWS to send traffic destined for these networks through the VPN tunnels.

The 'PropagatingVgws' section confirms that route propagation is enabled for this VGW. If this is empty, propagation isn't working.

If routes aren't appearing, check that your on-premises BGP configuration is advertising the correct networks and that the BGP sessions are established.

This verification step often reveals configuration issues before they become production problems.

Step 9: Monitoring VPN Status

Monitoring is essential for maintaining healthy VPN connections. The VgwTelemetry data tells you everything about tunnel health.

When tunnels are UP and working properly, you'll see 'Status': 'UP' and 'StatusMessage': 'IPSEC IS UP'. The AcceptedRouteCount shows how many routes were learned via BGP.

Both tunnels should ideally be UP for full redundancy. If only one tunnel is up, you still have connectivity, but you've lost redundancy.

The LastStatusChange timestamp helps with troubleshooting - frequent status changes might indicate network instability or configuration issues.

I always set up CloudWatch alarms to notify me when tunnel status changes. You don't want to discover connectivity issues when users start complaining!

AcceptedRouteCount is particularly important - if it's zero, BGP isn't working properly even if the tunnel is up.

Step 10: Customer Gateway Configuration

The final step is configuring your on-premises VPN devices. This is where AWS makes your life easier by generating device-specific configurations.

The CustomerGatewayConfiguration XML contains everything needed - tunnel endpoints, pre-shared keys, BGP parameters, and IPsec settings.

AWS provides configurations for major vendors like Cisco, Juniper, pfSense, and others. The syntax is already correct for your device type.

Key configuration elements include the tunnel interface (for BGP traffic), BGP neighbor relationships, IPsec parameters, and the pre-shared keys for authentication.

Always configure both tunnels for redundancy. Each tunnel has different endpoint IPs and pre-shared keys.

Make sure your local firewall allows IPsec traffic - that's typically UDP 500 for IKE and IP protocol 50 for ESP.

The BGP configuration advertises your local network to AWS and learns routes from other sites. This is what enables the Cloud Hub functionality.

Advanced Configuration Options

Let me show you some advanced configurations that give you more control over your Cloud Hub deployment.

Custom route tables are useful when you want granular control over which subnets can access the VPN connections. Maybe you only want certain servers to communicate with branch offices.

You can create separate route tables for different subnet tiers - public, private, database - and selectively enable route propagation on each one.

Static routing is an alternative to BGP, but I only recommend it for simple point-to-point connections. With static routing, you lose the automatic route discovery that makes Cloud Hub so powerful.

The static route approach requires manual route management - every time you add a new branch office, you need to manually update routes on all existing sites.

For Cloud Hub scenarios, dynamic BGP routing is almost always the right choice because of the automatic route discovery and simplified management.

Troubleshooting Common Issues

Let me share the most common issues I've encountered and how to resolve them. This troubleshooting flowchart covers 90% of the problems you'll face.

Start by checking tunnel status - if tunnels are DOWN, the problem is usually with the Customer Gateway configuration, firewall rules, or IPsec parameters.

Verify your pre-shared keys match exactly - even a single character difference will prevent tunnel establishment. Also check that your public IP addresses are correct.

If tunnels are UP but BGP isn't working, check your ASN numbers, BGP neighbor configurations, and make sure you're advertising the right networks.

Route propagation issues usually stem from forgetting to enable propagation or having incorrect BGP advertisements.

I always recommend testing connectivity incrementally - get one tunnel up first, then add BGP, then add route propagation, then add additional sites.

Monitoring and Maintenance

Proper monitoring prevents small issues from becoming big problems. These commands help you stay on top of your VPN health.

The table output format makes it easy to see the status of multiple connections at a glance. I run these commands regularly to check system health.

Set up CloudWatch alarms for tunnel status changes, BGP route counts, and data transfer metrics. You want to know immediately if connectivity is lost.

VPC Flow Logs are invaluable for troubleshooting connectivity issues. They show you exactly what traffic is flowing and where it's being dropped.

Implement automated health checks between branch offices. Simple ping tests or application-level checks can detect issues before users notice.

Document your configuration thoroughly - you'll thank yourself during disaster recovery scenarios or when training new team members.

Security Best Practices

Security is paramount in VPN deployments. Let me share the essential security practices I follow on every implementation.

Strong pre-shared keys are critical - use long, complex, unique keys for each tunnel. Never reuse keys across different connections.

AWS VPN supports Perfect Forward Secrecy by default, which ensures that compromising one session's keys doesn't compromise other sessions.

Implement regular key rotation - I recommend changing pre-shared keys quarterly. This limits the impact of any potential key compromise.

Use security groups and NACLs to control traffic flow. Just because sites can reach each other doesn't mean all traffic should be allowed.

Enable logging everywhere - VPC Flow Logs, CloudTrail, and device logs provide comprehensive audit trails for security analysis.

Consider implementing network segmentation even within the VPN - not every branch office needs to access every other branch office.

Cost Optimization

Let's talk about costs because VPN Cloud Hub is very cost-effective, especially as you scale to more locations.

VPN connections cost $36 per month each, regardless of how much data you transfer through them. This is the base cost for maintaining the connection.

Data transfer charges apply for traffic leaving AWS to your branch offices. However, traffic between branch offices that transits through AWS is not charged twice.

The Virtual Private Gateway itself has no additional charge - you only pay for the VPN connections that attach to it.

Compare this to MPLS circuits or dedicated connections - VPN Cloud Hub becomes increasingly cost-effective as you add more locations.

For high-volume sites, consider AWS Direct Connect instead of VPN. For most branch offices, VPN provides the right balance of cost and performance.

Monitor your data transfer usage to understand your total costs and identify opportunities for optimization.

Key Benefits Summary

Let me summarize the key benefits that make VPN Cloud Hub such a compelling solution for multi-site connectivity.

Simplified network architecture eliminates the complexity of mesh VPN networks. Instead of managing N*(N-1)/2 connections, you manage just N connections.

Automatic route discovery through BGP means new sites are immediately reachable by all existing sites without manual configuration changes.

High availability comes built-in with dual tunnels per connection, terminated in different Availability Zones.

Scalability is fantastic - adding new branch offices is as simple as creating a new Customer Gateway and VPN connection. Existing sites automatically learn the new routes.

Cost effectiveness improves with scale. The fixed cost per connection makes it very economical for organizations with many small offices.

AWS manages the heavy lifting - you don't need expensive hardware or complex software at each location.

Wrap-up and Next Steps

We've covered everything you need to implement AWS VPN Cloud Hub successfully. From the basic architecture to detailed commands to troubleshooting and optimization.

The key takeaways are: plan your IP addressing and BGP ASNs carefully, enable route propagation for automatic route discovery, always configure both tunnels for redundancy, and implement proper monitoring and alerting.

Remember that testing is crucial - verify connectivity thoroughly before going to production. Test both normal operations and failover scenarios.

Document everything - your future self and your colleagues will appreciate detailed documentation of the configuration and any customizations you made.

Start small with a pilot implementation, validate the solution works for your environment, then scale to additional sites.

VPN Cloud Hub is a powerful solution that can dramatically simplify your multi-site networking while reducing costs and improving reliability. Thanks for your attention, and good luck with your implementation!

AWS VPN Cloud Hub

Complete Implementation Guide

Hub-and-Spoke VPN Architecture for Multi-Site Connectivity

🔗 Simplified Connectivity

One connection per site instead of mesh networks

📡 Auto Route Discovery

BGP automatically shares routes between all sites

💰 Cost Effective

Linear scaling vs exponential mesh costs

🔒 Built-in Security

IPsec encryption with redundant tunnels

Traditional vs Cloud Hub Architecture

❌ Traditional Mesh Network

  • N×(N-1)/2 VPN connections required
  • 8 offices = 28 connections!
  • Complex routing management
  • Exponential scaling costs
  • Manual route configuration
Problem: Each new office requires connections to ALL existing offices

✅ VPN Cloud Hub

  • N connections (one per office)
  • 8 offices = 8 connections
  • Automatic BGP routing
  • Linear scaling costs
  • Zero-touch route discovery
Solution: Each office connects only to AWS hub

VPN Cloud Hub Architecture

graph TB subgraph "AWS Cloud" VGW["Virtual Private Gateway
(VPN Hub)"] VPC["VPC
10.0.0.0/16"] IGW["Internet Gateway"] RT["Route Table"] VGW ---|Attached| VPC VPC ---|Connected| IGW VPC ---|Uses| RT end subgraph "Branch Office 1" CGW1["Customer Gateway 1
Public IP: 203.0.113.10"] LAN1["Local Network
192.168.1.0/24"] CGW1 ---|Serves| LAN1 end subgraph "Branch Office 2" CGW2["Customer Gateway 2
Public IP: 203.0.113.20"] LAN2["Local Network
192.168.2.0/24"] CGW2 ---|Serves| LAN2 end subgraph "Remote Office" CGW3["Customer Gateway 3
Public IP: 203.0.113.30"] LAN3["Local Network
192.168.3.0/24"] CGW3 ---|Serves| LAN3 end CGW1 -.->|IPsec VPN| VGW CGW2 -.->|IPsec VPN| VGW CGW3 -.->|IPsec VPN| VGW

Network Traffic Flow

sequenceDiagram participant B1 as Branch Office 1
(192.168.1.0/24) participant CGW1 as Customer Gateway 1 participant AWS as AWS VPN Hub
(Virtual Private Gateway) participant CGW2 as Customer Gateway 2 participant B2 as Branch Office 2
(192.168.2.0/24) Note over B1,B2: Inter-Branch Communication Flow B1->>CGW1: Send packet to 192.168.2.100 CGW1->>AWS: Encrypt and tunnel packet Note over AWS: Route packet based on
propagated routes AWS->>CGW2: Forward encrypted packet CGW2->>B2: Decrypt and deliver packet Note over B1,B2: Response Flow B2->>CGW2: Response packet CGW2->>AWS: Encrypt and tunnel response AWS->>CGW1: Forward encrypted response CGW1->>B1: Decrypt and deliver response

Implementation Roadmap

graph TD A[1. Create VPC] --> B[2. Create Internet Gateway] B --> C[3. Create Customer Gateways] C --> D[4. Create Virtual Private Gateway] D --> E[5. Attach VGW to VPC] E --> F[6. Create VPN Connections] F --> G[7. Configure Route Propagation] G --> H[8. Update Route Tables] H --> I[9. Configure Customer Gateway Devices] I --> J[10. Verify Connectivity]
Key Success Factors:
  • Each step builds upon the previous one
  • BGP configuration is critical for Cloud Hub functionality
  • Route propagation enables automatic network discovery
  • Proper testing validates the complete solution

Route Propagation Magic

graph LR subgraph "Route Propagation Flow" VGW["Virtual Private Gateway
Route Propagation Enabled"] RT1["Main Route Table"] RT2["Custom Route Table"] subgraph "Propagated Routes" R1["192.168.1.0/24 → CGW1"] R2["192.168.2.0/24 → CGW2"] R3["192.168.3.0/24 → CGW3"] end VGW -->|Auto-propagates| RT1 VGW -->|Auto-propagates| RT2 RT1 --> R1 RT1 --> R2 RT1 --> R3 RT2 --> R1 RT2 --> R2 RT2 --> R3 end
Why This Matters: BGP route propagation eliminates manual route management and enables dynamic network discovery across all connected sites.

Prerequisites and Planning

🔧 Technical Requirements

  • AWS CLI: Configured with appropriate EC2 VPN permissions
  • Static Public IPs: Required for each Customer Gateway location
  • BGP ASN Numbers: Unique ASN for each site (65001, 65002, etc.)
  • Network Planning: Non-overlapping CIDR ranges for all locations

Required IAM Permissions

ec2:CreateVpnConnection ec2:CreateCustomerGateway ec2:CreateVpnGateway ec2:AttachVpnGateway ec2:EnableVgwRoutePropagation ec2:DescribeVpnConnections ec2:DescribeRouteTables

Network Planning

VPC CIDR: 10.0.0.0/16 Branch 1: 192.168.1.0/24 Branch 2: 192.168.2.0/24 Remote Office: 192.168.3.0/24 BGP ASNs: AWS VGW: 64512 (default) Branch 1: 65001 Branch 2: 65002 Remote Office: 65003

Step 1: Create VPC Foundation

aws ec2 create-vpc \ --cidr-block 10.0.0.0/16 \ --tag-specifications 'ResourceType=vpc,Tags=[{Key=Name,Value=VPN-Hub-VPC}]'

Expected Output:

{ "Vpc": { "VpcId": "vpc-0a1b2c3d4e5f67890", "State": "pending", "CidrBlock": "10.0.0.0/16", "DhcpOptionsId": "dopt-default", "InstanceTenancy": "default", "IsDefault": false, "Tags": [ { "Key": "Name", "Value": "VPN-Hub-VPC" } ] } }
Key Points:
  • Choose CIDR that doesn't conflict with branch offices
  • Save the VpcId for subsequent commands
  • Use descriptive tags for organization and billing

Step 2: Internet Gateway Setup

Create Internet Gateway

aws ec2 create-internet-gateway \ --tag-specifications 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=VPN-Hub-IGW}]'

Attach to VPC

aws ec2 attach-internet-gateway \ --internet-gateway-id igw-0a1b2c3d4e5f67890 \ --vpc-id vpc-0a1b2c3d4e5f67890
Critical: The Internet Gateway is required for VPN tunnel establishment. Without it, IPsec tunnels cannot be created to your Customer Gateways.
Why This Step Matters: The IGW enables the VPC to communicate with the internet, which is essential for establishing IPsec VPN tunnels to your branch offices over the public internet.

Step 3: Create Customer Gateways

Branch Office 1

aws ec2 create-customer-gateway \ --type ipsec.1 \ --public-ip 203.0.113.10 \ --bgp-asn 65001 \ --tag-specifications 'ResourceType=customer-gateway,Tags=[{Key=Name,Value=Branch-Office-1-CGW}]'

Branch Office 2

aws ec2 create-customer-gateway \ --type ipsec.1 \ --public-ip 203.0.113.20 \ --bgp-asn 65002 \ --tag-specifications 'ResourceType=customer-gateway,Tags=[{Key=Name,Value=Branch-Office-2-CGW}]'

Remote Office

aws ec2 create-customer-gateway \ --type ipsec.1 \ --public-ip 203.0.113.30 \ --bgp-asn 65003 \ --tag-specifications 'ResourceType=customer-gateway,Tags=[{Key=Name,Value=Remote-Office-CGW}]'
Important: Each Customer Gateway must have a unique BGP ASN and static public IP address.

Step 4: Create Virtual Private Gateway

aws ec2 create-vpn-gateway \ --type ipsec.1 \ --amazon-side-asn 64512 \ --tag-specifications 'ResourceType=vpn-gateway,Tags=[{Key=Name,Value=VPN-Cloud-Hub}]'

Expected Output:

{ "VpnGateway": { "VpnGatewayId": "vgw-0a1b2c3d4e5f67890", "State": "pending", "Type": "ipsec.1", "AmazonSideAsn": 64512, "Tags": [ { "Key": "Name", "Value": "VPN-Cloud-Hub" } ] } }
VGW Configuration:
  • ASN 64512: AWS default, must differ from Customer Gateway ASNs
  • High Availability: AWS automatically provides redundancy
  • Scalability: Single VGW supports multiple VPN connections

Step 5: Attach VGW to VPC

aws ec2 attach-vpn-gateway \ --vpn-gateway-id vgw-0a1b2c3d4e5f67890 \ --vpc-id vpc-0a1b2c3d4e5f67890

Verify Attachment:

aws ec2 describe-vpn-gateways \ --vpn-gateway-ids vgw-0a1b2c3d4e5f67890
Wait for Completion: The attachment process takes 1-2 minutes. Verify the state shows "attached" before proceeding to create VPN connections.
What This Enables:
  • Route propagation to VPC route tables
  • Traffic routing between VPC and VPN tunnels
  • BGP route advertisement capabilities

Step 6: Create VPN Connections

Connection to Branch Office 1

aws ec2 create-vpn-connection \ --type ipsec.1 \ --customer-gateway-id cgw-0a1b2c3d4e5f67890 \ --vpn-gateway-id vgw-0a1b2c3d4e5f67890 \ --options StaticRoutesOnly=false \ --tag-specifications 'ResourceType=vpn-connection,Tags=[{Key=Name,Value=Branch-Office-1-VPN}]'

Key Configuration

  • StaticRoutesOnly=false: Enables BGP dynamic routing
  • Dual Tunnels: AWS creates two tunnels for redundancy
  • Multi-AZ: Tunnels terminate in different AZs

What You Get

  • CustomerGatewayConfiguration: Device config XML
  • Tunnel Endpoints: Two AWS public IPs
  • Pre-shared Keys: Unique keys per tunnel
Repeat this process for each branch office - substitute the appropriate Customer Gateway ID and connection name.

Step 7: Enable Route Propagation

Find Route Table ID

aws ec2 describe-route-tables \ --filters "Name=vpc-id,Values=vpc-0a1b2c3d4e5f67890"

Enable Route Propagation

aws ec2 enable-vgw-route-propagation \ --route-table-id rtb-0a1b2c3d4e5f67890 \ --gateway-id vgw-0a1b2c3d4e5f67890
Critical Step: Without route propagation, Cloud Hub functionality will not work. Branch offices cannot discover each other's networks without this configuration.
What Route Propagation Does:
  • Automatically adds BGP-learned routes to route tables
  • Enables dynamic network discovery between sites
  • Eliminates manual route management
  • Essential for hub-and-spoke functionality

Step 8: Verify Route Propagation

aws ec2 describe-route-tables \ --route-table-ids rtb-0a1b2c3d4e5f67890

Expected Output (after BGP establishment):

{ "Routes": [ { "DestinationCidrBlock": "10.0.0.0/16", "GatewayId": "local", "State": "active" }, { "DestinationCidrBlock": "192.168.1.0/24", "GatewayId": "vgw-0a1b2c3d4e5f67890", "State": "active" }, { "DestinationCidrBlock": "192.168.2.0/24", "GatewayId": "vgw-0a1b2c3d4e5f67890", "State": "active" }, { "DestinationCidrBlock": "192.168.3.0/24", "GatewayId": "vgw-0a1b2c3d4e5f67890", "State": "active" } ], "PropagatingVgws": [ { "GatewayId": "vgw-0a1b2c3d4e5f67890" } ] }
Success Indicators: Routes for all branch office networks appear automatically with VGW as target.

Step 9: Monitor VPN Connection Status

aws ec2 describe-vpn-connections \ --vpn-connection-ids vpn-0a1b2c3d4e5f67890

Healthy Connection Output:

{ "VgwTelemetry": [ { "OutsideIpAddress": "203.0.113.100", "Status": "UP", "LastStatusChange": "2025-07-02T10:30:00.000Z", "AcceptedRouteCount": 1, "StatusMessage": "IPSEC IS UP" }, { "OutsideIpAddress": "203.0.113.101", "Status": "UP", "LastStatusChange": "2025-07-02T10:30:30.000Z", "AcceptedRouteCount": 1, "StatusMessage": "IPSEC IS UP" } ] }
Key Metrics:
  • Status: UP - Tunnel is operational
  • AcceptedRouteCount > 0 - BGP is working
  • Both tunnels UP - Full redundancy

Step 10: Customer Gateway Device Configuration

Extract Configuration

aws ec2 describe-vpn-connections \ --vpn-connection-ids vpn-0a1b2c3d4e5f67890 \ --query 'VpnConnections[0].CustomerGatewayConfiguration' \ --output text > branch-office-1-config.xml

Example Configuration Elements:

# Tunnel Interface Configuration interface tunnel1 ip address 169.254.10.1 255.255.255.252 tunnel source [Your-Public-IP] tunnel destination 203.0.113.100 # BGP Configuration router bgp 65001 bgp router-id [Your-Public-IP] neighbor 169.254.10.2 remote-as 64512 neighbor 169.254.10.2 activate network 192.168.1.0 mask 255.255.255.0 # IPsec Configuration crypto isakmp key [Pre-Shared-Key] address 203.0.113.100
Device-Specific: AWS provides configurations for Cisco, Juniper, pfSense, and other major vendors. Always configure both tunnels for redundancy.

Advanced Configuration Options

Custom Route Tables

# Create custom route table aws ec2 create-route-table \ --vpc-id vpc-0a1b2c3d4e5f67890 # Associate with subnet aws ec2 associate-route-table \ --route-table-id rtb-0b2c3d4e5f678901 \ --subnet-id subnet-0a1b2c3d4e5f67890 # Enable propagation aws ec2 enable-vgw-route-propagation \ --route-table-id rtb-0b2c3d4e5f678901 \ --gateway-id vgw-0a1b2c3d4e5f67890

Static Routing Alternative

# Create static VPN connection aws ec2 create-vpn-connection \ --type ipsec.1 \ --customer-gateway-id cgw-123 \ --vpn-gateway-id vgw-456 \ --options StaticRoutesOnly=true # Add static routes aws ec2 create-vpn-connection-route \ --vpn-connection-id vpn-123 \ --destination-cidr-block 192.168.1.0/24 # Manual route table entry aws ec2 create-route \ --route-table-id rtb-123 \ --destination-cidr-block 192.168.1.0/24 \ --gateway-id vgw-456
Recommendation: Use BGP dynamic routing for Cloud Hub. Static routing limits functionality and requires manual management.

Troubleshooting Guide

graph TD A[VPN Connection Issues] --> B{Tunnel Status?} B -->|DOWN| C[Check Customer Gateway Config] B -->|UP| D{BGP Status?} C --> E[Verify Pre-shared Keys] C --> F[Check Firewall Rules] C --> G[Validate IPsec Parameters] D -->|Not Established| H[Check BGP Configuration] D -->|Established| I{Route Propagation?} H --> J[Verify ASN Numbers] H --> K[Check Network Advertisements] I -->|Disabled| L[Enable Route Propagation] I -->|Enabled| M[Check Route Tables]
Common Issues:
  • Tunnel DOWN: Check pre-shared keys, firewall rules, public IPs
  • BGP Issues: Verify ASN numbers, neighbor configuration
  • No Routes: Ensure route propagation is enabled
  • Connectivity: Test with traceroute and ping

Monitoring and Maintenance

Essential Monitoring Commands

# Check all VPN connections status aws ec2 describe-vpn-connections \ --query 'VpnConnections[*].[VpnConnectionId,State,VgwTelemetry[*].[OutsideIpAddress,Status,AcceptedRouteCount]]' \ --output table # Monitor route propagation aws ec2 describe-route-tables \ --filters "Name=vpc-id,Values=vpc-0a1b2c3d4e5f67890" \ --query 'RouteTables[*].Routes[?GatewayId==`vgw-0a1b2c3d4e5f67890`].[DestinationCidrBlock,State]' \ --output table # Check BGP route advertisements aws ec2 describe-vpn-connections \ --vpn-connection-ids vpn-0a1b2c3d4e5f67890 \ --query 'VpnConnections[0].Routes[*].[DestinationCidrBlock,State,Source]' \ --output table
Monitoring Best Practices:
  • CloudWatch Alarms: Set up alerts for tunnel status changes
  • VPC Flow Logs: Enable for connectivity troubleshooting
  • Automated Health Checks: Implement cross-site connectivity tests
  • Documentation: Keep configuration details updated

Security Best Practices

🔐 Encryption & Authentication

  • Strong Pre-shared Keys: Unique, complex keys per tunnel
  • Perfect Forward Secrecy: Enabled by default
  • Regular Key Rotation: Quarterly updates recommended
  • IPsec Algorithms: AES-256, SHA-256 or higher
Never reuse pre-shared keys across different connections or tunnels

🛡️ Network Security

  • Security Groups: Control traffic at instance level
  • NACLs: Subnet-level traffic filtering
  • Network Segmentation: Isolate sensitive resources
  • Logging: VPC Flow Logs, CloudTrail
Principle of Least Privilege: Only allow necessary traffic between sites

Security Configuration Example

# Enable VPC Flow Logs aws ec2 create-flow-logs \ --resource-type VPC \ --resource-ids vpc-0a1b2c3d4e5f67890 \ --traffic-type ALL \ --log-destination-type cloud-watch-logs \ --log-group-name VPNCloudHubFlowLogs

Cost Analysis and Optimization

Component Cost Structure Monthly Cost (3 Sites) Notes
VPN Connections $36/month per connection $108 Fixed cost regardless of usage
Virtual Private Gateway No charge $0 Free with VPN connections
Data Transfer Out $0.09/GB (first 1GB free) Variable Traffic from AWS to branch offices
Inter-site Traffic No additional charge $0 Branch-to-branch via AWS

Cost Comparison Example

8 Branch Offices: Traditional Mesh: • 28 VPN connections • $1,008/month base cost • Complex management VPN Cloud Hub: • 8 VPN connections • $288/month base cost • Simplified management • 71% cost reduction!

Optimization Tips

  • Monitor Usage: Track data transfer patterns
  • Compression: Enable on Customer Gateways
  • Direct Connect: Consider for high-volume sites
  • Regional Placement: Position VPC near majority of sites

Benefits Summary

🎯 Simplified Architecture

Hub-and-spoke eliminates complex mesh topologies. N connections instead of N×(N-1)/2.

🤖 Automatic Route Discovery

BGP enables zero-touch network discovery. New sites immediately reachable.

⚡ High Availability

Dual tunnels per connection with multi-AZ termination. Built-in redundancy.

📈 Linear Scalability

Adding sites scales linearly in cost and complexity. Easy to grow.

💰 Cost Effective

Fixed cost per connection. Significant savings at scale vs. traditional solutions.

🛠️ AWS Managed

AWS handles heavy lifting. No expensive hardware or complex software required.

Real-World Impact

Customer Example: Global manufacturing company reduced network costs by 65% and deployment time from weeks to days when migrating from MPLS to VPN Cloud Hub for 25 branch offices.

Key Takeaways & Next Steps

🎯 Critical Success Factors

  1. Plan IP addressing carefully - No overlapping CIDRs
  2. Use unique BGP ASNs - Essential for proper routing
  3. Enable route propagation - Core Cloud Hub requirement
  4. Configure both tunnels - Don't skip redundancy
  5. Implement monitoring - Proactive issue detection
  6. Document everything - Future-proof your deployment

🚀 Implementation Strategy

  • Start Small: Pilot with 2-3 sites
  • Test Thoroughly: Validate before production
  • Plan Rollout: Systematic site migration
  • Train Teams: Ensure operational readiness
  • Establish Monitoring: CloudWatch and alerting
  • Scale Gradually: Add sites incrementally

🏆 When to Choose VPN Cloud Hub

  • Multiple branch offices needing interconnectivity
  • Cost-sensitive deployments where MPLS is too expensive
  • Dynamic environments with frequently changing sites
  • Organizations wanting to leverage AWS backbone reliability
  • Teams seeking simplified network management

Thank You!

Questions? VPN Cloud Hub transforms multi-site connectivity from complex to simple. Start your pilot today and experience the benefits of hub-and-spoke architecture with AWS.

1 / 24