Top Banner
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc. From One to Many: Evolving VPC Design Robert Alexander, AWS Solutions Architect
137

From One to Many: Evolving VPC Design

Sep 08, 2014

Download

Technology

As more customers adopt Amazon Virtual Private Cloud architectures, the features and flexibility of the service are squaring off against increasingly complex design requirements. This session follows the evolution of a single regional VPC into a multi-VPC, multi-region design with diverse connectivity into on-premises systems and infrastructure. Along the way, we investigate creative customer solutions for scaling and securing outbound VPC traffic, managing multi-tenant VPCs, conducting VPC-to-VPC traffic, extending corporate federation and name services into VPC, running multiple hybrid environments over AWS Direct Connect, and integrating corporate multiprotocol label switching (MPLS) clouds into multi-region VPCs.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: From One to Many: Evolving VPC Design

© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.

From One to Many:

Evolving VPC DesignRobert Alexander, AWS Solutions Architect

Page 2: From One to Many: Evolving VPC Design

Disclaimer:

Do Try This at Home!

All these designs are in use

by customers

Page 3: From One to Many: Evolving VPC Design

Design…

then spend a lot of time building and deploying

Build and deploy virtual datacenters as fast as you

design them

version

Page 4: From One to Many: Evolving VPC Design

Route Table Elastic Network

InterfaceAmazon VPC Router

Internet

Gateway

Customer

GatewayVirtual

Private

Gateway

VPN

ConnectionSubnet

Elements of VPC Design

Page 5: From One to Many: Evolving VPC Design

Availability Zone A Availability Zone B

Page 6: From One to Many: Evolving VPC Design

Subnet

Availability Zone A

Subnet

Availability Zone B

VPC CIDR: 10.1.0.0 /16

Page 7: From One to Many: Evolving VPC Design

Plan your VPC IP space before

creating it

• Consider future AWS region expansion

• Consider future connectivity to your internal networks

• Consider subnet design

• VPC can be /16 down to /28

• CIDR cannot be modified after creation

• Overlapping IP spaces = future headache

Page 8: From One to Many: Evolving VPC Design

Public Subnet

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

VPC CIDR: 10.1.0.0 /16

Availability Zone A

Page 9: From One to Many: Evolving VPC Design

Public Subnet

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

Instance A

10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

VPC CIDR: 10.1.0.0 /16

Availability Zone A

Page 10: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

Instance A

10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

VPC CIDR: 10.1.0.0 /16

.1

.1 .1

.1

Page 11: From One to Many: Evolving VPC Design

Public Subnet

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

Instance A

10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

VPC CIDR: 10.1.0.0 /16

Route Table

Destination Target

10.1.0.0/16 local

Availability Zone A

Page 12: From One to Many: Evolving VPC Design

Leave the Main Route Table Alone

Page 13: From One to Many: Evolving VPC Design

Availability Zone B

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Private Subnet

Instance A

10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

VPC CIDR: 10.1.0.0 /16

Route Table

Destination Target

10.1.0.0/16 local

10.1.1.0/24 Instance B

Page 14: From One to Many: Evolving VPC Design

Availability Zone B

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Private Subnet

Instance A

10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

VPC CIDR: 10.1.0.0 /16

Route Table

Destination Target

10.1.0.0/16 local

10.1.1.0/24 Instance B

Page 15: From One to Many: Evolving VPC Design

Network ACLs vs. Security Groups

NACLs

• Applied to subnets (1 per)

• Stateless

• Allow & deny (blacklist)

• Rules processed in order

Security groups• Applied to instance ENI (up

to 5 per)

• Stateful

• Allow only (whitelist)

• Rules evaluated as a whole

• Can reference other security groups in the same VPC

VPC Subnet

Elastic network

interface

Security group

Network ACL

Page 16: From One to Many: Evolving VPC Design

VPC Network ACLs: What Are They Good For?

• Enforcing baseline security policy– Example:

“No TFTP, NetBIOS or SMTP shall egress this

subnet”

• Catchall for holes in instance

security groups

• Segregation of security between

network ops and dev ops

VPC Subnet

Instance

Page 17: From One to Many: Evolving VPC Design

VPC Network ACLs: Best Practices

• Use sparingly, keep it simple

• Avoid ephemeral port range allows

• Create rule #’s with room to grow

• Use IAM to control tightly who can alter or delete NACLs

Pushing this will hurt!Default network ACL:

Page 18: From One to Many: Evolving VPC Design

Create an IAM VPC Admin Group

Examples of “High Blast Radius” VPC API calls that should be restricted:

AttachInternetGateway

AssociateRouteTable

CreateRoute

DeleteCustomerGateway

DeleteInternetGateway

DeleteNetworkAcl

DeleteNetworkAclEntry

DeleteRoute

DeleteRouteTable

DeleteDhcpOptions

ReplaceNetworkAclAssociation

DisassociateRouteTable

{Support

Resource

Permissions

Page 19: From One to Many: Evolving VPC Design

Example IAM Policy for NACL Admin{

"Version": "2012-10-17",

"Statement": [

{

"Effect": "Allow",

"Action": [

"ec2:DeleteNetworkAcl",

"ec2:DeleteNetworkAclEntry"

],

"Resource": "arn:aws:ec2:us-west-2:123456789012:network-acl/*",

"Condition": {

"StringEquals": {

"ec2:ResourceTag/Environment": "prod"

},

"Null": {

"aws:MultiFactorAuthAge": "false"

}

}

}

]

}

Page 20: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

Instance A

10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

VPC CIDR: 10.1.0.0 /16

Creating ways “out”

of a VPC

Page 21: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

Instance A

10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

VPC CIDR: 10.1.0.0 /16

Virtual

Private

Gateway

Internet

Gateway

Only 1 IGW and 1 VGW

per VPC

VPN

connectionCustomer

data center

Customer

data center

AWS Direct

Connect

Route Table

Destination Target

10.1.0.0/16 local

Internal CIDR VGW

Page 22: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

Instance A

10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

VPC CIDR: 10.1.0.0 /16

Route

TableRoute Table

Destination Target

10.1.0.0/16 local

0.0.0.0/0 IGW

Page 23: From One to Many: Evolving VPC Design

Ways to Assign Public IPs

Elastic IP address (EIP)• Associated with AWS account and not a specific instance

• 1 public IP to 1 private IP static NAT mapping

• Instance does not “see” an EIP associated to it

• Persists independently of the instance

• Can be assigned while instance is stopped or running

• Can be moved, reassigned to other ENIs

Page 24: From One to Many: Evolving VPC Design

Ways to Assign Public IPs

Automatic dynamic public IP assignment• Done on instance launch into VPC subnet

• Public IP is dynamic and could change if instance is stopped and restarted

• Does not count against AWS account EIP limits

• Works only on instances with a single ENI

Page 25: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

Instance A

Public: 54.200.129.18

Private: 10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

Route

Table

Internet

Amazon S3 Amazon Dynamo DB

AWS

region

AWS outside the VPC

Page 26: From One to Many: Evolving VPC Design

Examples of AWS outside the VPC

• AWS API endpoints

– Think about which APIs you might be calling from instances within the

VPC

– Good examples: Amazon EC2, AWS CloudFormation, Auto Scaling,

Amazon SWF, Amazon SQS, Amazon SNS

• Regional services

– Amazon S3

– Amazon Dynamo DB

• Software and patch repositories

– Amazon Linux repo allows access only from AWS public IP blocks

Page 27: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

Instance A

Public: 54.200.129.18

Private: 10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

Route

Table

Internet

Amazon S3

AWS

region

And what if instance C

in a private subnet

needs to reach outside

the VPC?

It has no route to the

IGW and no public IP.

Amazon Dynamo DB

Page 28: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

NAT A

Public: 54.200.129.18

Private: 10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

Internet

Amazon S3

AWS

region

Deploy an instance that

functions as a

N etwork

A ddress

T ranslat(or)

Route Table

Destination Target

10.1.0.0/16 local

0.0.0.0/0 NAT

instanc

e

Amazon Dynamo DB

Page 29: From One to Many: Evolving VPC Design

What makes up the

Amazon Linux NAT AMI?

$echo 1 > /proc/sys/net/ipv4/ip_forward

$echo 0 > /proc/sys/net/ipv4/conf/eth0/send_redirects

$/sbin/iptables -t nat -A POSTROUTING -o eth0 –s 10.1.0.0/16 -j MASQUERADE

$/sbin/iptables-save

$aws ec2 modify-instance-attributes –instance-id i-xxxxxxxx –source-dest-check “{\”Value\”:false}”

Not much to it:

1. IP forwarding enabled

2. IP NAT Masquerading enabled in iptables for VPC CIDR block

3. Source/destination check is turned off on primary interface

Page 30: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

NAT A

Public: 54.200.129.18

Private: 10.1.1.11 /24

Instance C

10.1.3.33 /24

Instance B

10.1.2.22 /24

Instance D

10.1.4.44 /24

Internet

Amazon S3

AWS

region

Other private subnets

can share the same

routing table and use

the NAT

But…

Amazon Dynamo DB

Page 31: From One to Many: Evolving VPC Design

Public Subnet

Availability Zone A

Private Subnet

Public Subnet

Availability Zone B

Private Subnet

NAT A

Public: 54.200.129.18

Private: 10.1.1.11 /24

Instance B

10.1.2.22 /24

Internet

Amazon S3

AWS

region

… you could reach

a bandwidth bottleneck

if your private instances

grow and their NAT-

bound traffic grows with

them.

Amazon Dynamo DB

Page 32: From One to Many: Evolving VPC Design

Scalable and Available NAT

Page 33: From One to Many: Evolving VPC Design

Do bandwidth-intensive processes need to be

behind a NAT?

• Separate out application components with bandwidth needs

• Run components from public subnet instances

• Goal is full instance bandwidth out of VPC

• Auto Scaling with Public IP makes this easy

• NAT still in place for remaining private instances

• Most common use case:

Multi-Gbps streams to Amazon S3

Page 34: From One to Many: Evolving VPC Design
Page 35: From One to Many: Evolving VPC Design
Page 36: From One to Many: Evolving VPC Design
Page 37: From One to Many: Evolving VPC Design
Page 38: From One to Many: Evolving VPC Design
Page 39: From One to Many: Evolving VPC Design
Page 40: From One to Many: Evolving VPC Design
Page 41: From One to Many: Evolving VPC Design

Auto Scaling Support for

Automatic Public IP Assignment

$aws autoscaling create-launch-configuration --launch-configuration-name hi-bandwidth-public --image-id ami-xxxxxxxx --instance-type m1.xlarge --associate-public-ip-address

Sample launch configuration (named “hi-bandwidth-public”):

Page 42: From One to Many: Evolving VPC Design

Availability Zone A

Private Subnet

Availability Zone B

Private Subnet

Internet

Amazon S3

AWS

region

Public Subnet Public SubnetNAT

• Use Auto Scaling for NAT

availability

• Create 1 NAT per Availability

Zone

• All private subnet route tables to

point to same zone NAT

• 1 Auto Scaling group per NAT

with min and max size set to 1

• Let Auto Scaling monitor the

health and availability of your

NATs

• NAT bootstrap script updates

route tables programmatically

Auto scale HA NAT

NAT

Amazon Dynamo DB

Page 43: From One to Many: Evolving VPC Design

Auto Scaling for Availability

$aws autoscaling create-auto-scaling-group --auto-scaling-group-name ha-nat-asg --launch-configuration-name ha-nat-launch --min-size 1 --max-size 1 --vpc-zone-identifier subnet-xxxxxxxx

Sample HA NAT Auto Scaling group (named “ha-nat-asg”):

Page 44: From One to Many: Evolving VPC Design

HA NAT User Data sample:PRIVATE_SUBNETS="`aws ec2 describe-subnets --query 'Subnets[*].SubnetId’ --filters Name=availability-zone,Values=\$AVAILABILITY_ZONE Name=vpc-id,Values=$VPC_ID Name=state,Values=available Name=tag:network,Values=private`”

if [ -z "$PRIVATE_SUBNETS" ]; then

die "No private subnets found to modify for HA NAT."

else log "Modifying Route Tables for following private subnets: $PRIVATE_SUBNETS"

fi

for subnet in $PRIVATE_SUBNETS; do

ROUTE_TABLE_ID=`aws ec2 describe-route-tables --query 'RouteTables[*].RouteTableId’ \

--filters Name=association.subnet-id,Values=$subnet`;

if [ "$ROUTE_TABLE_ID" = "$MAIN_RT" ]; then

log "$subnet is associated with the VPC Main Route Table. HA NAT script will NOT edit Main Route Table.”

elif [ -z "$ROUTE_TABLE_ID" ]; then

log "$subnet is not associated with a Route Table. Skipping this subnet."

else

aws ec2 create-route --route-table-id $ROUTE_TABLE_ID --destination-cidr-block 0.0.0.0/0 \

--instance-id $INSTANCE_ID &&

log "$ROUTE_TABLE_ID associated with $subnet modified to point default route to $INSTANCE_ID."

if [ $? -ne 0 ] ; then

aws ec2 replace-route --route-table-id $ROUTE_TABLE_ID --destination-cidr-block 0.0.0.0/0 \

--instance-id $INSTANCE_ID

fi

fi

done

Page 45: From One to Many: Evolving VPC Design

Tag Early, Tag Often!

• Tagging strategy should be part of early design

• Project code, cost center, environment, version, team, business unit

• Tag resources right after creation

• Tags supported for resource permissions

• AWS Billing also supports tags

• Tight IAM controls on the creation and editing of tags

Page 46: From One to Many: Evolving VPC Design

IAM EC2 Role for HA NAT Instance{

"Version": "2012-10-17",

"Statement": [

{

"Effect": "Allow",

"Action": [

"ec2:DescribeInstances",

"ec2:ModifyInstanceAttribute",

"ec2:DescribeSubnets",

"ec2:DescribeRouteTables",

"ec2:CreateRoute",

"ec2:ReplaceRoute"

],

"Resource": "*"

}

]

}

Page 47: From One to Many: Evolving VPC Design

Automating HA NAT with EC2 User Data

Latest version of the script:

https://github.com/ralex-aws/vpc

Page 48: From One to Many: Evolving VPC Design

If Design Requirements Keep High

Bandwidth Streams Behind NAT:

• Use the 1 HA NAT per Availability Zone design

• Vertically scale your NAT instance type to one with a High Network Performance rating

• Keep a close watch on your network metrics

m1.small

Low

m1.large

Moderate

m1.xlarge, c3.2xlarge

Hight1.micro

Very Low

Page 49: From One to Many: Evolving VPC Design

Take Advantage of Enhanced

Networking

• Only available in VPC

• Higher PPS, Lower Latency, Lower Jitter

• Supported by C3, I2, R3 instance types

• Built into Amazon Linux, but supported in many flavors

(including Windows)

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html

Page 50: From One to Many: Evolving VPC Design

One VPC, Two VPC

Page 51: From One to Many: Evolving VPC Design

AWS

region

Considering Multiple VPCs

Public-facing

web app

Internal

company

app

What’s next?

VPN

connection

Customer

data center

Page 52: From One to Many: Evolving VPC Design

Common Customer Use Cases:

• Application isolation

• Scope of audit containment

• Risk level separation

• Separate production from non-production

• Multi-tenant isolation

• Business unit alignment

Page 53: From One to Many: Evolving VPC Design

Controlling the Border

Page 54: From One to Many: Evolving VPC Design

AWS

region

Internal Application to VPC

Public-facing

web app

Internal

company

app

VPN

connection

Customer

data center

Page 55: From One to Many: Evolving VPC Design

Availability Zone A

Private Subnet Private Subnet

AWS

region

Virtual

Private

Gateway

VPN

connection

Customer

data center

Intranet

App

Intranet

App

Availability Zone B

Internal customers

Internal Application to VPC

Route Table

Destination Target

10.1.0.0/16 local

Corp CIDR VGW

Page 56: From One to Many: Evolving VPC Design

But… the app will leverage this for storing data

Amazon S3

Page 57: From One to Many: Evolving VPC Design

Availability Zone A

Private Subnet Private Subnet

AWS

region

Virtual

Private

Gateway

VPN

connection

Customer

data center

Intranet

App

Intranet

App

Availability Zone B

And you don’t really want to do this:

Amazon

S3

Internet

Customer border router

Customer VPN

Internet

Page 58: From One to Many: Evolving VPC Design

Control IGW Access through a Proxy Layer

• Deploy a proxy control layer between application and IGW

• Restrict all outbound HTTP/S access to only approved URL destinations like Amazon S3

• No route to IGW for private subnets

• Control access to proxy through security groups

• Must configure proxy setting in OS of instances

Page 59: From One to Many: Evolving VPC Design

Availability Zone A

Private Subnet Private Subnet

AWS region

VPN

connection

Customer

data center

Intranet

App

Intranet

App

Availability Zone B

Internal customers

Controlling the Border

Internal

Load

balancer

Elastic Load Balancing

Private SubnetElastic Load Balancing

Private Subnet

ELB Multi AZ Auto Scaling group

• Deploy internal Elastic Load

Balancing layer across

Availability Zones

• Add all instances allowed

outside access to a security

group

• Use this security group as the

only source allowed access to

the proxy port in the load

balancer’s security group

Page 60: From One to Many: Evolving VPC Design

Put Elastic Load Balancers in Their

Own Subnets

• Elastic Load Balancing is Amazon EC2 in your subnets

• Elastic Load Balancing is using your private addresses

• Separate subnets = separate control

• Distinguish load balancing layer from app layers

Page 61: From One to Many: Evolving VPC Design
Page 62: From One to Many: Evolving VPC Design
Page 63: From One to Many: Evolving VPC Design
Page 64: From One to Many: Evolving VPC Design
Page 65: From One to Many: Evolving VPC Design
Page 66: From One to Many: Evolving VPC Design
Page 67: From One to Many: Evolving VPC Design
Page 68: From One to Many: Evolving VPC Design
Page 69: From One to Many: Evolving VPC Design

Squid.conf Sample Config:# CIDR AND Destination Domain based Allow

# CIDR Subnet blocks for Internal ELBs

acl int_elb_cidrs src 10.1.3.0/24 10.1.4.0/24

# Destination domain for target S3 bucket

acl s3_v2_endpoints dstdomain $bucket_name.s3.amazonaws.com

# Squid does AND on both ACLs for allow match

http_access allow int_elb_cidrs s3_v2_endpoints

# Deny everything else

http_access deny all

Page 70: From One to Many: Evolving VPC Design

Using Squid Proxy Instances for Web Service Access

in Amazon VPC:

http://aws.amazon.com/articles/5995712515781075

Page 71: From One to Many: Evolving VPC Design

AWS region

Public-facing

web app

Internal

company

app

What’s next?

VPN

connection

Customer data center

Page 72: From One to Many: Evolving VPC Design

AWS region

Public-facing

web app

Internal

company

app #1

HA pair VPN

endpoints

Internal

company

app #2

Internal

company

app #3

Internal

company

app #4

Customer data center

Customer gateways (CGW):

• 1 per VPN tunnel

• 1 public IP per CGW

• AWS provides 2 tunnel

destinations per region

Page 73: From One to Many: Evolving VPC Design

Public-facing

web app

Internal

company

app #2

HA pair VPN

endpointsCustomer data center

Internal

company

app #3

Internal

company

app #4

Internal

company

app #1

Internal

company

Dev

Internal

company

QA

AWS region

BackupAD, DNS Monitoring

Logging

Page 74: From One to Many: Evolving VPC Design
Page 75: From One to Many: Evolving VPC Design
Page 76: From One to Many: Evolving VPC Design

VPC Peering

Page 77: From One to Many: Evolving VPC Design
Page 78: From One to Many: Evolving VPC Design
Page 79: From One to Many: Evolving VPC Design
Page 80: From One to Many: Evolving VPC Design
Page 81: From One to Many: Evolving VPC Design
Page 82: From One to Many: Evolving VPC Design

10.1.0.0/16

10.0.0.0/16

Route Table

Destination Target

10.1.0.0/16 local

10.0.0.0/16 PCX-1

Route Table

Destination Target

10.0.0.0/16 local

10.1.0.0/16 PCX-1

PCX-1

• No IGW or VGW Required

A

B • No SPoF

• No Bandwidth Bottlenecks

Page 83: From One to Many: Evolving VPC Design

10.0.0.0/16 10.0.0.0/16

PCX-1 PCX-2

Subnet 1

10.1.1.0/24

Subnet 2

10.1.2.0/24

10.1.0.0/16

Route Table Subnet 1

Destination Target

10.1.0.0/16 local

10.0.0.0/16 PCX-1

Route Table Subnet 2

Destination Target

10.1.0.0/16 local

10.0.0.0/16 PCX-2

A

B C

Page 84: From One to Many: Evolving VPC Design

10.0.0.0/16 10.0.0.0/16

PCX-1 PCX-2

Subnet 1

10.1.1.0/24

Subnet 2

10.1.2.0/24

10.1.0.0/16

Route Table Subnet 1

Destination Target

10.1.0.0/16 local

10.0.1.11/32 PCX-1

Route Table Subnet 2

Destination Target

10.1.0.0/16 local

10.0.0.0/16 PCX-2

A

B CSubnet 3

Route Table Subnet 3

Destination Target

10.0.0.0/16 local

10.1.1.0/24 PCX-1

10.0.1.11

Route Table Subnet 1

Destination Target

10.1.0.0/16 local

10.0.0.0/16 PCX-1

Page 85: From One to Many: Evolving VPC Design
Page 86: From One to Many: Evolving VPC Design
Page 87: From One to Many: Evolving VPC Design
Page 88: From One to Many: Evolving VPC Design
Page 89: From One to Many: Evolving VPC Design

10.1.0.0/16

10.0.0.0/16 10.0.0.0/16

10.3.0.0/16

172.16.0.0/16192.168.0.0/16

10.2.0.0/16

172.17.0.0/16

company data center

10.10.0.0/16

Page 90: From One to Many: Evolving VPC Design
Page 91: From One to Many: Evolving VPC Design
Page 92: From One to Many: Evolving VPC Design
Page 93: From One to Many: Evolving VPC Design

10.1.0.0/16

10.0.0.0/16 10.0.0.0/16

10.3.0.0/16

172.16.0.0/16192.168.0.0/16

10.2.0.0/16

172.17.0.0/16

company data center

10.10.0.0/16

Page 94: From One to Many: Evolving VPC Design

10.0.0.0/16 10.0.0.0/16

172.16.0.0/16192.168.0.0/16

172.17.0.0/16

10.1.0.0/1610.2.0.0/1610.3.0.0/16

Page 95: From One to Many: Evolving VPC Design
Page 96: From One to Many: Evolving VPC Design
Page 97: From One to Many: Evolving VPC Design
Page 98: From One to Many: Evolving VPC Design
Page 99: From One to Many: Evolving VPC Design
Page 100: From One to Many: Evolving VPC Design

Use IAM to Define & Enforce a

VPC’s Operational State

Use EC2 Run Resource Permissions to control:

• What AMI can be launched

• What VPC or subnet can be targeted

• What Security Groups must be in place

• Which VPCs allow Peering

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_IAM.htmlFor more policy examples:

Page 101: From One to Many: Evolving VPC Design

AWS

region

Public-facing

web app

HA pair VPN

endpoints

Customer data center

AWS

regionProd QA Dev

Page 102: From One to Many: Evolving VPC Design

Bringing It All Back Home

Page 103: From One to Many: Evolving VPC Design

Customer

data centerAWS Direct Connect

location

AWS Direct Connect Private Virtual

Interface (PVI) connects to VGW on

VPC• 1 PVI per VPC

• 802.1Q VLAN Tags isolate traffic

across AWS Direct Connect

Private fiber connectionOne or multiple

50 – 500 Mbps,

1 Gbps or 10 Gbps pipes

Simplify with AWS Direct Connect

Public-facing

web app

AWS

regionProd QA Dev

Page 104: From One to Many: Evolving VPC Design

A few bits on AWS Direct Connect…

• Dedicated, private pipes into AWS

• Create private (VPC) or public interfaces to AWS

• Cheaper data-out rates than Internet (data-in still free)

• Consistent network performance compared to Internet

• At least 1 location to each AWS region (even GovCloud!)

• Recommend redundant connections

• Multiple AWS accounts can share a connection

Page 105: From One to Many: Evolving VPC Design

VPC 1

Private Virtual Interface 1

VLAN Tag 101

BGP ASN 7224

BGP Announce 10.1.0.0/16

Interface IP 169.254.251.5/30 10.1.0.0/16

VGW 1

Multiple VPCs Over AWS Direct Connect

Customer

Switch + Router

Customer Interface 0/1.101

VLAN Tag 101

BGP ASN 65001

BGP Announce Customer Internal

Interface IP 169.254.251.6/30

VLAN 101

VLAN 102

VLAN 103

VPC 2

10.2.0.0/16

VGW 2

VPC 3

10.3.0.0/16

VGW 3

Private Virtual Interface 2

VLAN Tag 102

BGP ASN 7224

BGP Announce 10.2.0.0/16

Interface IP 169.254.251.9/30

Customer Interface 0/1.102

VLAN Tag 102

BGP ASN 65002

BGP Announce Customer Internal

Interface IP 169.254.251.10/30

Customer Interface 0/1.103

VLAN Tag 103

BGP ASN 65003

BGP Announce Customer Internal

Interface IP 169.254.251.14/30

Private Virtual Interface 3

VLAN Tag 103

BGP ASN 7224

BGP Announce 10.3.0.0/16

Interface IP 169.254.251.13/30

Route Table

Destination Target

10.1.0.0/16 PVI 1

10.2.0.0/16 PVI 2

10.3.0.0/16 PVI 3

Customer Internal

Network

Page 106: From One to Many: Evolving VPC Design
Page 107: From One to Many: Evolving VPC Design
Page 108: From One to Many: Evolving VPC Design
Page 109: From One to Many: Evolving VPC Design
Page 110: From One to Many: Evolving VPC Design
Page 111: From One to Many: Evolving VPC Design
Page 112: From One to Many: Evolving VPC Design
Page 113: From One to Many: Evolving VPC Design
Page 114: From One to Many: Evolving VPC Design
Page 115: From One to Many: Evolving VPC Design
Page 116: From One to Many: Evolving VPC Design
Page 117: From One to Many: Evolving VPC Design
Page 118: From One to Many: Evolving VPC Design
Page 119: From One to Many: Evolving VPC Design
Page 120: From One to Many: Evolving VPC Design

AWS Direct Connect in the United States

AWS Direct Connect

Equinix, San Jose

us-west-1

us-west-2

us-east-1

AWS Private NetworkDisaster Recovery

VPN to VGW

Page 121: From One to Many: Evolving VPC Design
Page 122: From One to Many: Evolving VPC Design
Page 123: From One to Many: Evolving VPC Design
Page 124: From One to Many: Evolving VPC Design
Page 125: From One to Many: Evolving VPC Design
Page 126: From One to Many: Evolving VPC Design
Page 127: From One to Many: Evolving VPC Design
Page 128: From One to Many: Evolving VPC Design
Page 129: From One to Many: Evolving VPC Design
Page 130: From One to Many: Evolving VPC Design
Page 131: From One to Many: Evolving VPC Design
Page 132: From One to Many: Evolving VPC Design
Page 133: From One to Many: Evolving VPC Design

See What Your VGW Sees

Before: Enable:

After:

Page 134: From One to Many: Evolving VPC Design

Customer routers

Customer internal

network

AWS DX routers

AWS

region

AWS Direct Connect

location

Multiple physical connections:

• Active / Active links via BGP multi-pathing

• Active / Passive also an option

• BGP MEDs or local preference can influence

route

• Bidirectional Forwarding Detection (BFD)

protocol supported

Page 135: From One to Many: Evolving VPC Design

Customer

routers

Customer global

MPLS backbone

network

US-East-1

AWS

region

AWS Direct Connect

location:

Virginia or NYC

Going Global

Customer

routers

AWS DX

routers

AWS Direct Connect

location:

Ireland or London

EU-West-1

AWS

region

AWS DX

routers

Page 136: From One to Many: Evolving VPC Design

With AWS regions just another spoke on your global network,

it’s easy to bring the cloud down to you as you expand around the world.

US customer

data center

EU-West-1 region

EU customer

data center

Customer MPLS

backbone

AWS Direct

Connect PoP

Ireland or London

US-West-1 region

AWS Direct

Connect PoP

Virginia or NYC

AP-Southeast-1

region

AWS Direct

Connect PoP

Singapore

AP customer

data center

Page 137: From One to Many: Evolving VPC Design

Evolving VPC Design: Recap

• Elements of VPC Design

• Scalable and Available NAT

• One VPC, Two VPC

• Controlling the Border

• Directory and Name Services in the VPC

• VPC Peering

• Bringing It All Back Home