Networks Flashcards
AWS PrivateLink
AWS PrivateLink provides private connectivity between virtual private clouds (VPCs), supported AWS services, and your on-premises networks without exposing your traffic to the public internet. Interface VPC endpoints, powered by PrivateLink, connect you to services hosted by AWS Partners and supported solutions available in AWS Marketplace.
VPC Peering Connection
A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. You can create a VPC peering connection between your own VPCs, or with a VPC in another AWS account. The VPCs can be in different Regions (also known as an inter-Region VPC peering connection).
AWS DirectConnect
Dedicated connection to the AWS network
Gateway Endpoints
- Provides private access to the supported services.
- Can access public services (S3 and DynamoDB) from private VPC.
- Operates at VPC level, not subnet!
- Target specific routes
- Is highly available
- Is not billed for S3 access
- Use Amazon S3 public IP addresses
- Does not allow access from on premises
- Does not allow access from another AWS Region
Interface Endpoints
- Provides private access to the supported services.
- Operates at subnet level
- Target specific DNS names
- Have associated costs to access S3 bucket
- Use private IP addresses from your VP to access Amazon S3
- Allow access from on premises
- Allow access from a VPC in another AWS Region using VPC peering or AWS Transit Gateway
FSx
Windows file services. Resilient and highly available
Can be deployed in single or multi AZ mode.
Full range of backups
Accesible via VPC, Peering, VPN, Direct Connect
Transit Gateway
- AWS Transit Gateway connects your Amazon Virtual Private Clouds (VPCs) and on-premises networks through a central hub.
-Transit gateways are local devices and only can be associated with the VPCs in the same region (can be peered with the TG in other regions). - TG can connect directly to the user VPN gateway
- Is transitive capable device
Security Group
- Applied to the instance/service interface
- Is stateful
- Only contains ALLOW rule
- Can filter traffic between instances in the same subnet
Network ACL
- Applied at the subnet level
- Not stateful
- Can contain ALLOW and DENY rules
- Filter traffic entering on leaving subnet
ENI
Elastic Network Interface
- Primary ENI is attached to the instance and cannot be detached
- ENI only have private IPs
- Private IP address is assigned automatically and stays same during the lifetime of instance
- Public IP is not visible to the OS
- Public IP is not static, it can change after instance restart
- IPv6 is visible to the OS because it is publically routable
Elastic IP
Static public IP allocated per 1 private IP
SR-IOV
Single Route IO virtualisation. Allows many VMs share single NIC without impacting performance
- NICs are virtualisation-aware and can create multiple “virtual functions” NICs (cut down version) inside physical NIC
- 1 Physical NIC can support up to 256 virtual functions
- VM can communicate with the VF directly avoiding Hypervisor.
5-Tuple
5 Tuple- SRC IP, DST IP, SRC Port, DST Port, Protocol.
- Considered as “single flow”
- 5Gbps max for single 5 Tuple flow. Applies to the traffic between regions.
- Same region- physical limits of NIC e.g. 10 or 100Gbps
MPTCP
Multi Path TCP. Protocol to use many streams of TCP which is presented to the application as single stream.
EFA
Elastic Fabric Adapter
- Type of NIC on EC2
- Allows OS bypass, is used on HPC or ML (machine learning) applications
- HPC/ML application which use MPI or NCCL (???) are candidates for EFA
- Single subnet only, cannot be routed, security group should have “allow all” self reference inbound and outbound
Placement Groups
How physically close instances are placed.
- Cluster (keep instances together). Should be placed in the same AZ. Same rack and/or same host. Can achieve 10Gbps per stream instead of 5Gbps per stream.
- Spread (keep instances separated). Each instance runs in separate rack. 7 instances per AZ.
- Partition (spread groups of instances apart). More than 7 instances per AZ. max 7 partitions.
R53 Public Hosted Zone
Public zone is accessible from the internet, VPC can use public resolver via R53 endpoint on VPC +2 IP addressess
R53 Private hosted Zone
Associated with particular VPC, is not accessible from public Internet
CNAME record
Maps name to the another name. Cannot be used on “naked/apex domain” (e.g. kestasli.click). To solve this, ALIAS record should be used.
ALIAS record
Maps name to AWS resource. Can be used for naked or normal records. Default to pick ALIAS if AWS resources are used
Classic Load Balancer (CLB)
V1, Not really L7 device, can only use 1 SSL certificate per LB
Application Load Balancer (ALB)
- V2, L7 aware device, HTTP/S/WebSockets. Requires 8+ free IP addresses per subnet. /27 is minimal subnet size (/28 is absolute minimum).
- ELB is a DNS A Record pointing at 1+ Nodes per AZ
- EC2 doesn’t need to be public to work with a LB
Network Load Balancer (NLB)
- V2, Can balance TCP, TLS, UDP. Requires 8+ free IP addresses per subnet. /27 is minimal subnet size (/28 is absolute minimum).
- ELB is a DNS A Record pointing at 1+ Nodes per AZ
- EC2 doesn’t need to be public to work with a LB
CrossZone Load Balancer
Feature which allows LB to distribute load across all Availability Zones. Otherwise load can be distributed unequally if e.g. one AZ runs more EC2 instances. For Application Load Balancer this is enabled by default.
X-Forwarded-For
Helps identify client ID behind Load Balancer. Is L7 thing, works only with HTTP/S. NLB don’t use the header because it operates at L3-4
PROXY protocol
Helps identify client ID behind Load Balancer. Works at L4, TCP header is added. Can be used if unbroken (by ALB) HTTPS connection is needed.
Gateway Load Balancer (GWLB)
Help run and scale 3rd party security appliances. Uses GENEVE tunneling protocol to fix problem with IP addresses. GWLB will load balance across multiple security appliances.
Ingress Route Table
Defines what happens when packet arrives at the VPC. Usually configured on the Internet gateway
Internet Gateway
- 1 IGV per 1 VPC
- Used to access internet as well as public AWS services
- HA and scalable
- Works IPv4 and IPv6 inbound and outbound
- For IPv4 1:1 NAT is done. For IPv6 no NAT is performed.
- Flows from VPC to the public AWS services never leave AWS network
DX Gateway
- Direct Connect Gateway
- Global device (accessible in all regions vs. VGW, which is accessible only from the same region)
- Is used to overcome limitation of Private VIF only to be able to communicate in the same region.
- DX gateway not route traffic from VPC to VPC, only between on-prem and VPCs
- DX gateway works cross-account
- DX can connect to the private VIF & VGW or transit VIF & transit GW, not both (cannot mix).
- One Transit GW can be attached up to 50 DX gateways
Virtual Private Gateway
- Gateway object connecting VPC and non-AWS networks (e.g. other clouds).
- Is used for site2site VPNs
- Attached to max 1 VPC
- It can be as target in the VPC route table.
VPN CloudHub
- Allows few connections to terminate in one point and exchange routing info.
Customer Gateway
- Logical object representing customer device in AWS config for VPN connection
- Physical customer device to establish VPN
- Speed cap of 1.25Gbps is applied for the VPN.
Static VPN
Uses static routes
Dynamic VPN
- Uses BGP to establish routes
- Route propagation should be enabled on VPC
Global Accelerator
- Global Accelerator improves performance for a wide range of applications over TCP or UDP by proxying packets at the edge to applications running in one or more AWS Regions. Global Accelerator is a good fit for non-HTTP use cases, such as gaming (UDP), IoT (MQTT), or Voice over IP, as well as for HTTP use cases that specifically require static IP addresses or deterministic, fast regional failover.
- Provides you with a set of two static IP addresses that are anycast from the AWS edge network.
- Assigns a default Domain Name System (DNS) name to your accelerator.
- Supports both TCP and UDP protocols (CloudFront only HTTP/S).
- Integrate with AWS Shield for DDoS protection.
- Improves performance for a wide range of applications over TCP or UDP by proxying packets at the edge to applications running in one or more AWS Regions.
Route association
Which route table will be used when exiting TG association
Route propagation
To which route table routes learned from the attachment will be propagated
DX Private VIF
- Used to access private IP ranges in VPC (cannot access public services/IPs)
- Limited to the same region (there is workaround to use Transit GW)
- Can be terminated on VGW (Virtual Private Gateway) or Direct Connect Gateway
- Can use Jumbo Frames
- Max 100 prefixes can be advertised on private VIF
DX Public VIF
- Used to access AWS public zone services. No access to the private VPC IP ranges. Not limited to the same region.
- Your prefixes no leave AWS (are not transitive)
- Supports bi-directional communities
Lambda@Edge
Feature of Amazon CloudFront that lets you run code closer to users of your application, which improves performance and reduces latency
Virtual Private Gateway route prioritisation
Virtual private gateway prioritizes routes as follows, from MOST preferred to LEAST preferred:
-BGP propagated routes from an AWS Direct Connect connection
-Manually added static routes for a Site-to-Site VPN connection
-BGP propagated routes from a Site-to-Site VPN connection
-For matching prefixes where each Site-to-Site VPN connection uses BGP, the AS PATH is compared and the prefix with the shortest AS PATH is preferred. Alternatively, you can prepend AS_PATH, so that the path is less preferred.
-When the AS PATHs are the same length and if the first AS in the AS_SEQUENCE is the same across multiple paths, multi-exit discriminators (MEDs) are compared. The path with the lowest MED value is preferred.
Amazon Inspector
- Scans EC2 OS and containers for vulnerabilities and deviations from best security practices.
- Network assessment
- OS/host assessment (requires agent)
- Assessment is running at the regular interval (15m, 30min etc)
ip-ranges.json
AWS published structure of all public service IP range usage for all AWS regions. SNS topic is upgraded when update is made in the file.
CloudTrail
- Can log, continuously monitor, and retain account activity related to actions across your AWS infrastructure.
- Logs API calls, is NOT real time. Action taken by user, role or a service.
- Stores 90 days of history.
- By default only logs management events.
- Is regional service.
- Can be configured as one region or all regions (adds other regions automatically). Global services leave records in us-east-1 region.
AWS Shield
- AWS Shield is a managed Distributed Denial of Service (DDoS) protection service that safeguards applications running on AWS.
- Can be Professional (paid) or Std version.
AWS Macie
Data security service that discovers sensitive data (in S3) using machine learning and pattern matching, provides visibility into data security risks, and enables automated protection against those risks.
NAT64
Network address translation from IPv6 to IPv4. NAT gateway supports NAT64.
OpenSearch
- Open source, distributed search and analytics suite derived from Elasticsearch.
GuardDuty
Threat detection service that continuously monitors your AWS accounts and workloads for malicious activity and unauthorized behavior.