You are on page 1of 75

SUMMIT

London
AWS Networking fundamentals

Perry Wald & Tom Adamski


AWS Solutions Architects

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introductory - 200
“These sessions provide an overview of AWS services and
features, and they assume that attendees are new to the
topic. These sessions highlight basic use cases, features,
functions, and benefits."

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Default VPC Amazon Virtual Private Cloud (Amazon VPC)

/16 IPv4 CIDR block


(172.31.0.0/16). 54.4.5.6

/20 default subnet

172.31.0.128 172.31.1.24
Connected Internet 54.2.3.4
Gateway

Security Group (SG)


172.31.0.129 172.31.1.27
Network Access Control
List (NACL)
Subnet in availability zone Subnet in availability zone
(AZ) 1 (AZ) 2
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC concepts & fundamentals

IP Creating Routing in a Security


addressing subnets VPC

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Choosing an IP address
range

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Choosing an IP address range for your VPC

Avoid ranges that overlap with


other networks to which you
might connect

172.31.0.0/16
RFC1918 range: Recommended:
• 10.0.0.0/8
/16
• 172.16.0.0/12
• 192.168.0.0/16 (65,536 addresses)

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Creating subnets in a VPC

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC subnets and Availability Zones

172.31.0.0/16

eu-west-1a eu-west-1b eu-west-1c

172.31.0.0/24 172.31.1.0/24 172.31.2.0/24

VPC subnet VPC subnet VPC subnet

Availability Zone Availability Zone Availability Zone

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IPv6 in your VPC
• Can have a dual-stack VPC by adding an IPv6 CIDR
• Fixed sizes for VPC and subnets:
• /56 VPC (4,722,366,482,869,645,213,696 addresses)

• /64 subnets (18,446,744,073,709,551,616 addresses)

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC subnets and Availability Zones

172.31.0.0/16
2600:1f16:14d:6300::/56

eu-west-1a eu-west-1b eu-west-1c

172.31.0.0/24 172.31.1.0/24 172.31.2.0/24


2600:1f16:14d:6300::/64 2600:1f16:14d:6301::/64 2600:1f16:14d:6302::/64

VPC subnet VPC subnet VPC subnet

Availability Zone Availability Zone Availability Zone

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Routing in a VPC

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Routing in your VPC
• Route tables contain rules for which packets go where
• Your VPC has a default route table
• But, you can create and assign different route tables to different
subnets

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Traffic destined for my VPC
stays in my VPC

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
But what about the
Internet?

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Destination Target
172.31.0.0/16 local
0.0.0.0/0 igw_id

198.51.100.3 Inbound internet


access
198.51.100.4

NAT
gateway
Internet
gateway

Destination Target
172.31.0.0/16 local
0.0.0.0/0 Nat_gw_id

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Outbound internet
access
Security groups Network access Flow logs
control list

Network security

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security groups Network access Flow logs
control list

Network security

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security groups follow application structure

“MyWebServers” security group

Allow only
“MyWebServers”

“MyBackends” security group

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security groups example: Web servers

Allow HTTP traffic from anywhere

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security groups example: Backends

Allow application traffic


from web servers only

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security groups Network access Flow logs
control list

Network security

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security groups vs. NACLs
Security group Network ACL
Operates at instance level Operates at subnet level
Supports allow rules only Supports allow and deny rules
Is stateful: return traffic is automatically Is stateless: return traffic must be explicitly
allowed regardless of any rules allowed by rules
All rules evaluated before deciding whether to Rules evaluated in order when deciding whether
allow traffic to allow traffic
Applies only to instances explicitly associated Automatically applies to all instances launched
with the security group into associated subnets
Doesn’t filter traffic to or from link-local addresses (169.254.0.0/16) or AWS-reserved IPv4
addresses; these are the first four IPv4 addresses of the subnet (including the Amazon VPC DNS
server)

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security groups Network access Flow logs
control list

Network security

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC flow logs
• Visibility

• Troubleshooting

• Analyze traffic AZ 1 AZ 2
flow

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC flow logs: Setup

VPC traffic metadata


captured in Amazon S3

or Amazon CloudWatch Logs

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC flow logs format

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC flow logs format

Accept ssh from public address 210.21.226.2


SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
DNS in a VPC

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC DNS options

Have EC2 auto-assign DNS


host names to instances Use Amazon DNS server

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Connecting your VPC

Connecting to Connecting to your


other VPCs on-premises network

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC Peering Transit Gateway

Connecting to other VPCs

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC Peering Transit Gateway

Connecting to other VPCs

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC peering

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC peering
• Full private IP connectivity
between two VPCs

• Can peer VPCs across regions

• VPCs can be in different


accounts

• VPC CIDR ranges must not


overlap

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Establish a VPC peering: Initiate request

172.31.0.0/16 Step 1 10.55.0.0/16

Initiate peering
request

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Establish a VPC peering: Accept request

172.31.0.0/16 Step 1 10.55.0.0/16

Initiate peering
request

Step 2

Accept peering
request

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Establish a VPC peering: Create a route

172.31.0.0/16 Step 1 10.55.0.0/16

InitiateTraffic
peeringdestined for the peered VPC
should go to the peering
request

Step 2

Accept peering
request

Step 3

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC Peering Transit Gateway

Connecting to other VPCs

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Before Transit Gateway …

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With Transit Gateway …

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With Transit Gateway …
Traffic destined for any VPC in
172.16.0.0/12 range should go via TGW

Route back to our VPC

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With Transit Gateway …

Centralized private IP connectivity


between multiple VPCs

VPCs must be in the same region as


Transit Gateway

VPCs can be in different accounts

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC peering or TGW?

VPC Peering Transit Gateway


VPC LIMIT 125 peerings 5,000 attachments
BANDWIDTH LIMIT N/A (intra-region) 50Gbps per VPC attachment
MANAGEMENT Decentralised Centralised
COST DIMENSIONS Data Transfer Data Transfer & Attachment

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS
AWS VPN Direct Connect

Connecting to on-premises
networks:

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Extend an on-premises network into your VPC

AWS VPN

AWS
Direct Connect

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS VPN basics
192.168.0.0/16 Two IPSec tunnels 172.31.0.0/16

virtual
customer private
gateway gateway

192.168/16

VPN connection

Your networking device


SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Direct Connect basics
192.168.0.0/16 172.31.0.0/16
Private virtual interface
(VLAN)
virtual
private
gateway

Customer or
partner cage AWS cage

AWS Direct Connect location


Public virtual interface
(VLAN)
AWS services

Customer network

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Direct Connect – Multiple VPCs
192.168.0.0/16
Private virtual interface
(VLAN)

Customer or
partner cage AWS cage AWS Direct Connect
Gateway
AWS Direct Connect location

Customer network

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Before Transit Gateway …
Customer
Customer
network
network

Customer
Gateway
Direct Connect
Gateway

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With Transit Gateway …
Customer
Customer
network
network

Customer
Gateway
Direct Connect
Gateway

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With Transit Gateway …
Route to on-premise via TGW Customer
Customer
network
network

Customer
Gateway Route to on-premise via VPN (or Direct
Direct Connect
Connect) Gateway

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What about DNS?

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Route 53 Resolver for hybrid clouds

Conditional forwarding
rules

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
…more AWS networking

VPC Sharing VPC endpoints and Amazon Global


AWS PrivateLink Accelerator

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sharing VPC resources

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC Sharing – owner account

NACL

NACL

SUMMIT
Infrastructure account © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC Sharing – participant account
Account Web

Account DB

Account APP

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why VPC sharing?

Preserve IP space Interconnectivity


Use fewer IPv4 CIDRs No VPC Peering required

Separation of duties Billing and Security


A central team can create and Continue to enjoy segregation
manage your Amazon VPC with multiple accounts
Same AZ cost for data transfer is nil!
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Gateway VPC Interface VPC PrivateLink
endpoints endpoints

VPC endpoints

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Gateway VPC endpoints: Amazon S3 and DynamoDB

Route S3-bound traffic


to the VPC endpoint
S3 bucket

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Interface VPC endpoints

AWS
Services
APIs
Private IP: Private IP:
172.31.1.6 172.31.2.10

*service*.eu-west-1.amazonaws.com

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS PrivateLink: VPC endpoint services

Private IP: Endpoint


10.10.1.6 vpce-1234

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Global Accelerator

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introducing AWS Global Accelerator

Client Global AWS Applications


Accelerator

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introducing AWS Global Accelerator

Access Application!

Local ISP Network A B C D E F

Accessing
It can take
your
many
application
networksisto
not
reach
this the
straightforward!
application
Paths to and from the application may differ
Each hop impacts performance and can introduce risk

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Accessing your web applications with
AWS Global Accelerator

Local ISP AWS Network

Adding AWS Global Accelerator removes these inefficiencies


Leverages the Global AWS Network
Resulting in improved performance

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
DATACENTER
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
Perry Wald
perrwald@amazon.co.uk

Tom Adamski
tomada@amazon.co.uk

SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SUMMIT © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

You might also like