1300 VPC Randall
1300 VPC Randall
Deep Dive
Randall Hunt – Developer Evangelist, AWS
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
Related Presentations – Videos online
https://www.youtube.com/user/AmazonWebServices
VPC only
1. Routing & private connections
Implementing a hybrid architecture
A pair of VPN
connections (4 IPSec
tunnels total) protects
against failure of your
customer gateway
Corporate
192.168.0.0/16
Subnet with connectivity only
to other instances and the
Internet via the IGW
# VPC A
aws ec2 modify-network-interface-attribute --net eni-f832afcc --no-source-dest-check
aws ec2 create-route --ro rtb-ef36e58a --dest 10.20.0.0/16 --instance-id i-f832afcc
# VPC B
aws ec2 modify-network-interface-attribute --net eni-9c1b693a --no-source-dest-check
aws ec2 create-route --ro rtb-67a2b31c --dest 10.10.0.0/16 –-instance-id i-9c1b693a
Software VPN for VPC-to-VPC connectivity
Software VPN
between these
instances
Software VPN for VPC-to-VPC connectivity
Enabling communication
between instances in these
subnets; adding routes to the
default routing table
Software firewall to the Internet
• Common/core services
– Authentication/directory
– Monitoring
– Logging
– Remote administration
– Scanning
Provides infrastructure zoning
• Dev: VPC B
• Test: VPC C
• Production: VPC D
VPC peering for VPC-to-VPC connectivity
VPC B - 10.20.0.0/16
VPC A - 10.10.0.0/16 vpc-062dfc63
vpc-c15180a4 Account ID 472752909333
Instance 1 Instance 2
...........
Packet processing in Amazon EC2:
VIF
eth1
eth0
Physical NIC
Virtualization layer
Packet processing in Amazon EC2:
SR-IOV
Instance
eth1
eth0
Physical NIC
VF Driver
VF
Virtualization layer
Inter-instance latency
SR-IOV: Is this thing on?
It may already be!
No Yes!
[ec2-user@ip-10-0-3-70 [ec2-user@ip-10-0-3-70 ~]$
~]$ ethtool -i eth0 ethtool -i eth0
amzn-ami-hvm-2012.03.1.x86_64-ebs
hvm
Walkthrough: Enabling enhanced networking
(Amazon Linux)
--attribute
sriovNetSupport
Not yet!
InstanceId i-37c5d1d9
Walkthrough: Enabling enhanced networking
(Amazon Linux)
OS update
Reboot
(OS update)
Walkthrough: Enabling enhanced networking
(Windows)
Walkthrough: Enabling enhanced networking
(Windows)
Add to Windows driver store
Walkthrough: Enabling enhanced networking
All EBS-backed instances
stop-instances
--sriov-net-support
simple
Enable SRIOV
Cannot be undone
Walkthrough: Enabling enhanced networking
All EBS-backed instances
start-instances
Start
Walkthrough: Enabling enhanced networking
All EBS-backed instances
start-instances
--attribute
sriovNetSupport
InstanceId i-37c5d1d9
Value simple
We’re on
Subnet A Subnet A2 Subnet C
us-east-1a us-east-1a us-east-1c
10.0.1.0/24 10.0.2.0/24 10.0.3.0/24
Instance
1
10.0.2.50
10.0.1.100 Instance
3 10.0.3.99
Instance
4
Instance
2
10.0.2.51
10.0.1.101
Elastic
network
interface
Subnet A Subnet A2 Subnet C
us-east-1a us-east-1a us-east-1c
10.0.1.0/24 Placement group 10.0.2.0/24 10.0.3.0/24
Instance
1
10.0.2.50
10.0.1.100 Instance
3 10.0.3.99
Instance
4
Instance
2
10.0.2.51
10.0.1.101
elastic
network
interface
Placement Groups
Route53
ELB
RDS DB
Instance
ClassicLink
Route53
ELB
RDS DB
Instance
ClassicLink
Route53
ELB
RDS DB
Instance
ClassicLink
Route53
ELB
RDS DB
Instance
ClassicLink
Route53
ELB
RDS DB
Instance
ClassicLink
Route53
RDS DB
Instance
ClassicLink
Route53
RDS DB
Instance
ClassicLink
• Preparation: Create VPC and configure for ClassicLink
• Create VPC security groups and deploy VPC components
• Add EC2-Classic instances to your VPC security groups
• Deploy components in stages in VPC
• Clean up un-used EC2-Classic instances
Pros Cons
(Potentially) No disruptive maintenance Additional complexity during migration
Direct private IP connectivity and security group Still need to replace EC2-Classic
integration instances with new VPC instances
Designed for the largest deployments
ClassicLink – Component stages
i-2b3ecd1c
vpc-4325f426 sg-da107fbf
i-2b3ecd1c
vpc-4325f426 sg-da107fbf
• Spot
– Running spot instances can be linked
• Auto Scaling
– Configure to link classic instances following launch