Network infrastructure on AWS involves network planning, architecture, defining public & private network boundaries; define how subnets interact with each other, limit & secure network access; plan required set of public & private network addresses to operate the payload, etc.
Network infrastructure is provided as a service for SaaS, PaaS & IaaS consumers - hence the required network devices, gateways, routers & related hardware components are managed by the cloud providers; consumers however need to plan the network architecture to support their workload;
VPC connectivity options with AWS
- Customer network to Amazon VPC connectivity options - requires non-overlapping IP ranges, hence unique CIDR blocks to be used by each VPC
- AWS managed VPN - VPN connection from network equipment on remote network to AWS managed network equipment; data-center redundancy & fail-over ensured by AWS; static routes & dynamic / BGP peering supported;
- limitation - customer responsible for redundancy & fail-over on consumer side; device should support single-hop BGP (if leveraged)
- AWS Direct Connect - private connection between on-premises to AWS networks; range 1-10 Gbps; BGP peering & routing policies supported;
- limitation - cost factor; additional telecom & hosting provider relationships
- AWS VPN Cloud Hub - hub & spoke model; AWS managed VPG with redundancy & fail-over; BGP & routing policies supported;
- limitation - latency, variability & availability are dependent on the internet; consumer-managed redundancy & fail-over;
- Transit VPC - global network transit on AWS; AWS managed VPN connection b/w hub & spoke - redundancy managed by AWS;
- limitation - HA managed by customer
- Amazon VPC to VPC connectivity options
- VPC Peering - connect VPCs within & across AWS regions; leverages AWS network backbone; no other external hardware interference since connectivity is direct;
- limitation - transitive peering is not supported
- software VPN to AWS managed VPN - connect VPCs b/w customer managed VPN appliance & AWS managed VPN appliance; leverages AWS network backbone - between & across regions; availability, redundancy & fail-over are managed by AWS;
- limitation - HA for software appliance VPN endpoints are managed by the customer;
- (a) compute costs, (b) personnel costs, (c) availability costs, (d) VPN performance (e) no hardware acceleration
- AWS managed VPN - routing across VPCs via IP Sec VPN connections; reuse existing Amazon VPN VPC connections; redundancy & fail-over managed by AWS; static routes & BGP peering with routing policies are supported;
- limitation - HA, fail-over & redundancy for VPC endpoints are managed by the customer
- AWS Direct Connect & AWS Private Link - leverage logical connections & VPC interface endpoints / VPC endpoint services to connect VPCs; managed HA, fail-over & redundancy managed by AWS; static & BGP peering are supported with routing policies; no single-point-of-failure;
- limitation - additional hosting for Direct Connect; VPC endpoint services with Private Link are region specific;
- Connect remote VPC users
- connect remote users to VPC resources using remote-access solution; leverage existing end-user internal & remote access policies + technologies
- low-cost, elastic & secure web-services can be implemented with this option
- limitation - requires existing user internal & remote access implementations
Set of steps to configure site-to-site VPN connection:
- configure virtual gateway (VGW) or transit gateway
- confirm customer gateway device (CGD) meets requirements
- configure customer gateway (CGW)
- configure VPN connections
- configure VPC route tables
- configure VPN settings on CGD
- for each site-to-site VPN connection, AWS gives us "2" tunnel endpoints in different AZs;
- the 2-tunnel connections operate in active/passive mode
- meaning only one of the tunnel connections are active at any given time
- tunnel is between the virtual private gateway [VPG] and customer gateway device [CGD]
- With site-to-site VPN connectivity, limitations relates to the network bandwidth & capacity to route via single tunnel
- all network traffic, even if configured on separate VGW on cloud and different customer gateways on-premise, are converged to a single tunnel
- this means that the total bandwidth of 1.25 Gbps is capped at that limit across all connections configured over the secure tunnel network; no matter how many customer gateway devices / VGWs are inter-connected;
- even while returning the traffic, meaning responding to the requests, A SINGLE TUNNEL IS USED; each AWS IPSec VPN tunnel only supports a single pair of one-way security associations
For scalable connectivity across VPCs, AWS provides variety of options for service consumers to support their payload:
- Virtual private cloud (VPCs) to segment consumer workload, defining logical network boundaries
- Inter-connect on-premise & cloud networks at scale using Direct Connect & VPN;
- Inter-connect VPCs within & across regions at scale using VPC peering & transit gateways;
- Centralized egress endpoints to access internet using NAT gateways, VPC endpoints, PrivateLink, etc
- DNS management - network address resolution & routing services;
-------------------------------------------------------------------------------------------
Connectivity solutions to communicate between VPCs
VPC peering - simplest procedure to connect 2 VPCs on-cloud; cost incurred relates to the amount of data transferred between the VPCs; it's a point-to-point direct connectivity (P2P) - transitive (forwarding / proxy) connections is not possible with this option;
Problem with VPC peering relates to scalability - since it results in a complex mesh of P2P connections at scale (100's-1000's of VPCs); max limit = 125 peering connections per VPC;
Inter-region VPC peering is an AWS offering, ensures communication across VPCs are secure; No additional network interfaces, network appliances, gateways are required; network traffic always remains in VPC space - packet delivery is ensured, secure from DDoS / malware intrusion with no external data broadcasted to network / internet gateway; requires unique CIDR block range (inter-region VPC peering does not work with overlapping CIDR block ranges);
- easier to manage & maintain VPCs at scale (>100s); transit gateways are available as fully-managed with AWS managing the VPCs
- abstracts managing VPN connections
- availability & reliability managed & ensured by AWS
- better performant, improved bandwidth for VPC communication with burst speeds up-to 50 Gps per AZ
- reduces latency - does not require EC2 proxies;
- supports multi-cast (not supported by other AWS network services)
- transit gateways are neater, with hub & spoke architecture avoiding P2P single / direct connections between VPCs
- VPC peering connections are lower in cost comparatively - no additional cost other than data transfer costs; no connection charges;
- VPC peering - being direct connection - does not have bandwidth limits; reduced latency - no additional hops;
- security groups referencing work for intra-region VPC peering, not supported with transit gateways
Hybrid connectivity
Connections to on-premises data centers require one-to-one connectivity or an edge consolidation; one-to-one connectivity involves setting up Direct-Connect or VPN connection (using virtual private gateway VGW) - difficult to scale & maintain as & when customers scale their VPCs; edge consolidation however interacts with multiple VPC endpoints, hence scalable;
AWS VPN termination options are:
- use transit gateway with IP sec termination for site-to-site VPN;
- terminate VPN on EC2 instance, with transit VPC for edge consolidation;
- terminate VPN on virtual private gateway (VPG);
- private virtual interface (VIF) to VGW attached to VPC - limited to 50 VIFs per Direct Connect connection; One BGP peering per VPC & restricted to AWS region to which Direct Connect location connects to;
- range --> 1-10 Gbps per connection; private VIF to Direct Connect gateway attached to multiple VGWs (each VGW attached to a VPC) - can connect up to 10 VGWs globally;
- great option for smaller number of VPCs, to combine & visualize as a single, managed connection; sub-1G connections with link aggregation groups (LAG) can be used to aggregate multiple 1G / 10G connections at single AWS Direct Connect endpoint;
- private VIF to Direct Connect gateway associated with transit gateway - scalable option to connect on-premises data center to transit gateways (in turn attached to 1000s of VPCs) --> across regions & accounts; Limitations - up to 3 transit gateways can connect to 1 Direct Connect gateway, 20 CIDR ranges can be advertised from 1 transit gateway to on-premises router;
- VPN Cloud hub leverages VPC virtual private gateway with multiple gateways, each with unique BGP autonomous system numbers (ASNs);
- gateways advertise routes with BGP prefixes over the respective VPN connection; CloudHub allows other connected networks to learn about each other;
- routing advertisements are re-advertised to each BGP peer in the network - to be able to send & receive data across BGP peers;
- pre-requisite here is that the VPCs have unique IP address ranges (overlapping IP addresses won't work) & ASNs are unique for each spoke
- can combine with VPN + Direct Connect or other VPN options - as per the requirements;
- Route 53 resolver inbound endpoint resolves inbound DNS queries into the VPC
- Route 53 resolver outbound endpoint resolves outbound DNS queries from the VPC
- VPC endpoints are not extendable across VPC boundaries
- DNS resolution is needed within a VPC
- by default, VPC endpoints policy is unrestricted
- policies in a VPC may override policies within objects / other resources e.g. S3 bucket / S3 objects / RDS object policies
No comments:
Post a Comment