VPC Flashcards
What are the elements of a VPC?
- IP Address Range (CIDR Block)
- Subnets
- Route Tables
- Internet Gateway
- NAT Gateway/NAT Instance
- Security Groups
- Network Access Control Lists (NACLs)
- Elastic IP Addresses
- VPC Peering
- VPC Endpoints
- Virtual Private Gateway (VPN/Direct Connect)
- Flow Logs
What is a Virtual Private Gateway?
A virtual private gateway enables secure communication between your VPC and your on-premises network using either VPN connections or AWS Direct Connect.
What is VPC CIDR Block?
IP Address Range (CIDR Block): When creating a VPC, you define an IP address range for the VPC using Classless Inter-Domain Routing (CIDR) notation. This range determines the available IP addresses for your VPC’s subnets.
What are VPC Subnets?
Subnets: Subnets are subdivisions of a VPC’s IP address range. Public subnets have direct access to the internet, while private subnets do not. 1 subnet is always in 1 Availability Zone.
What are VPC Route Tables?
Route Tables: A route table defines the rules for routing traffic between subnets, as well as to the internet or other network destinations. Each subnet is associated with a route table that specifies where network traffic should be directed.
What is VPC Internet Gateway?
Internet Gateway: An internet gateway allows resources in public subnets to connect to the internet or AWS public zone. It serves as a gateway for traffic between the VPC and the public internet.
What is a NAT Gateway/NAT Instance?
NAT Gateway/NAT Instance: NAT (Network Address Translation) gateways or NAT instances allow resources in private subnets to initiate outbound traffic to the internet while still maintaining security. They act as intermediaries for sending traffic from private subnets to the internet.
- Not associated with security groups.
- Should be added in a public subnet.
- 5-45 Gbps.
- If you’re using NAT Gateways and your resources are spread across different Availability Zones, it’s important to make sure each Availability Zone has its own NAT Gateway. If one NAT Gateway goes down, resources in other Availability Zones won’t lose internet access.
What are Security groups?
Security Groups: Security groups are virtual firewalls that control inbound and outbound traffic to instances within a subnet. They are stateful and control traffic based on security group rules.
- In order to communicate to your EC2 instances via SSH, RDP, or HTTP, you will need to open up the correct ports.
- By default, all inbound traffic is blocked, and all outbound traffic is blocked.
What are NACLs?
Network Access Control Lists (NACLs): NACLs are stateless network traffic filters that control traffic entering and leaving subnets. They are less granular than security groups but operate at the subnet level.
- Can block specific IP addresses.
- By default, all inbound/outbound traffic is allowed.
- A subnet can be associated with only 1 network ACL at a time. When you associate a network ACL with a subnet, the previous association is removed.
- Network ACLs contain a numbered list of rules that are evaluated in order, starting with the lowest-numbered rule.
What are Elastic IP Addresses?
Elastic IP Addresses: Elastic IP addresses are static, public IP addresses that you can associate with instances or network interfaces in your VPC. They are useful for resources that need to have a consistent public IP.
What is VPC peering?
VPC peering allows you to connect 2 VPCs using private IP addresses, enabling resources in different VPCs to communicate as if they were in the same network.
- You can peer VPCs with other AWS accounts.
- You can peer between regions.
- In the same region, ASGs can reference each other directly. In different regions, ASGs reference each other with IP addresses or IP ranges.
- Peering is in a star configuration (e.g., 1 central VPC peers with 4 others).
No transitive peering! ( hub-and-spoke model)
- We create a VPC peering, create the routes, and if necessary the SGs and ACLS
What are VPC endpoints?
VPC endpoints provide a private connection between your VPC and supported AWS services, avoiding the need to traverse the public internet.
2 Types of VPC Endpoints:
- Interface endpoints: an elastic network interface with a private IP address that serves as an entry point for traffic headed to a supported
service. They support a large number of AWS services.
-
Gateway endpoints: Similar to NAT gateways, a gateway endpoint is
a virtual device you provision. It supports connection to S3 and DynamoDB.
What are VPC Flow Logs?
VPC Flow Logs capture information about IP traffic flowing to and from network interfaces in your VPC, providing insight into network activity.
DON’T monitor packet contents … that requires a packet sniffer. Only packet metadata(source IP, destination IP, ports, packet size etc)
Can be stored on S3 or CloudWatch Logs.
Are NOT real time.
What is AWS PrivateLink?
AWS PrivateLink is a private networking technology that allows you to securely connect your VPC (Virtual Private Cloud) to services as if they were in your VPC. This means that you can connect to AWS services, services hosted by other AWS accounts, and supported AWS Marketplace services without exposing your traffic to the public internet.
- Doesn’t require VPC peering; no route tables, NAT gateways, internet gateways, etc.
What is ENI?
ENI stands for Elastic Network Interface. It’s a virtual network interface that you can attach to an Amazon Elastic Compute Cloud (Amazon EC2) instance in an Amazon Virtual Private Cloud (Amazon VPC). An ENI acts as a network adapter, providing networking capabilities to an EC2 instance.
what is AWS VPN CloudHub?
- If you have multiple sites, each with its own VPN connection, you can use
AWS VPN CloudHub to connect those sites together. It’s similar to VPC
peering in that it works on a hub-and-spoke model. - AWS VPN CloudHub is low-cost and easy to manage. Though it operates over the public internet, all traffic between the customer gateway and the AWS VPN CloudHub is encrypted.
What is Direct Connect?
AWS Direct Connect links your internal network to an AWS Direct Connect location over a standard Ethernet fiber-optic cable. One end of the cable is connected to your router, the other to an AWS Direct Connect router.
With this connection, you can create virtual interfaces directly to public AWS services (for example, to Amazon S3) or to Amazon VPC, bypassing internet service providers in your network path.
Business Premises => DX Location => AWS Region. AWS regions have multiply Direct Connect Locations.
Speed: 1G or 10G or 100G
What are the 2 types of Direct Connect connection?
- Dedicated Connection(Customer DX router to AWS DX router): A physical Ethernet connection associated with a single customer. Customers can request a dedicated connection through the AWS Direct Connect console, the CLI, or the API.
- Hosted Connection(Provider DX router to AWS DX router): A physical Ethernet connection that an AWS Direct Connect Partner provisions on behalf of a customer. Customers request a hosted connection by contacting a partner in the AWS Direct Connect Partner Program, who provisions the connection.
Direct Connect connections happen in AWS DX Locations. A connection is a port allocation to AWS DX router.
VPNs vs. Direct Connect
VPNs allow private communication, but it still traverses the public internet to get the data delivered. While secure, it can be painfully slow.
DIRECT CONNECT IS:
- Fast
- Secure
- Reliable
- Able to take massive throughput
Can be used together because Direct Connect takes time to be implemented while VPNs can be up in hours.
What is AWS Transit Gateway?
AWS Transit Gateway connects VPCs and on-premises networks through a central hub. This simplifies your network and puts an end to complex peering relationships. It acts as a cloud router — each new connection is only made once.
- Allows you to have transitive peering between thousands of VPCs and on-premises data centers.
- Works on a hub-and-spoke model.
- Works on a regional basis, but you can have it across multiple regions.
- You can use it across multiple AWS accounts using RAM (Resource Access Manager).
- You can use route tables to limit how VPCs talk to one another.
- Works with Direct Connect as well as VPN connections.
- Supports IP multicast (not supported by any other AWS service).
What is AWS Wavelength?
AWS Wavelength embeds AWS compute and storage services within
5G networks, providing mobile edge computing infrastructure for developing, deploying, and scaling ultra-low-latency applications.
How many default VPCs can exist in a Region?
1 default VPC but you can have many custom VPCs in a Region.
What is the default VPC CIDR block in AWS?
172.31.0.0/16 It only gets one and it is always the same.