Network Flashcards

1
Q

f

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to connect two VPCs together

A

VPC PEERING

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. Instances in either VPC can communicate with each other as if they are within the same network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Max VPCs per account/region

A

you can have up to 5 VPCs per region per AWS account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are NACL rules evaluated

A

In Order. Rules are given a number and first rule to apply (Allow or Deny) is applied and no subsequent rules considered.

so to block a single IP, you would make this a low RULE number to get considered first.

NACL RULES ARE STATELESS. You must define both incoming and outgoing rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

VPC ENDPOINT

A

Some services (like S3) live in AWS Public VPC. To access those, you need to go over the internet.

If you don’t want to use the internet due to sensitive data, you can use VPC END POINTS which allows your private subnets to talk direct to AWS Public Services like S3.

THere are two types of VPC endpoint - EndPoint Gateway or Endpoint Interface. DynamoDB and S3 can use either - everything else must use Endpoint Interface. Gateway is FREE but has restrictions (cant use private ip, cant access from another region).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How would you connect On Prem to VPC

A

THere are TWO ways to do this:

Site To Site VPN -> Encrypted conncetion but goes over public internet.

DIrect Connect (DX) -> Physical connection between your DC and AWS. PRIVATE & FAST.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How would you connect VPC to VPC?

A

Using VPC Peering. There must be no overlapping IPs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Default SG rules

A

all subnets come with a default SG which allows NO inbound traffic but ALL outbound traffic. SG can only have ALLOW rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If VPC Region or Global?

A

Within each region, you can have multiple Virtual Private Clouds (VPCs). Each VPC exists within a single region and cannot span multiple regions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Is VPC Global or Regional ?

A

REGIONAL.

This means that a VPC exists within a specific AWS region and is isolated from VPCs in other regions.

Within a region, a VPC can span multiple Availability Zones (AZs),

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to connect VPC across Regions

A

Inter-Region Connectivity:

If you need to connect VPCs in different regions, you can use AWS services like VPC Peering, AWS Transit Gateway, or AWS VPN.

These services allow for secure connections between VPCs, even across regions,

Transit Gateway (Hub And Spoke) is a more powerful and flexible solution for connecting VPCs, but it is also more complex to set up and manage.

VPC peering is simpler to set up and manage but has more limitations (max 125 connections, complex at scale)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How many VPCs per region can you create by default ?

A

5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What type of subnets does deault VPC have

A

public

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What makes a subnet public ?

A

A subnet is public if …

Auto Assign Public IP4 = YES
Route Table has IGW

17
Q

How can a private subnet access the internet ?

A

either
NAT GATEWAY (AWS MANAGED) or NAT INSTANCE (SELF MANAGED).

The NAT Gateway/Instance is installed in the PUBLIC subnet and the private subnet is given a route to the public subnet

18
Q

How can the domain’s zone apex for example “myzoneapexdomain com” be pointed towards an Elastic Load Balancer?

A

use route53 ALIAS Record

A CName points a hostname to any other hostname (app.mydomain.com => bob.bob.com)

CNAME can only point to NONE ROOT domains. (i.e must be xxx.mydomain.com)

Alias points a hostname to an AWS resource (app.mydomain.com => xxx.amazonaws.com)

ALIAS works for ROOT and NONE ROOT domains (i.e could point mydomain.com)

ALIAS is also FREE and has built in Health Checks
Cant set the TLS for ALIAS
Used for: ELBs, CloudFront, API Gateway, S3 Websites ….
CANNOT be used for a direct EC2 DNS name.

19
Q

Which Route53 routing policy can direction traffic based on %

A

Weighted.

Control % of traffic to each resource. Good for load balancing or testing small amount of traffic to a new version of code.

20
Q

You have updated a Route 53 Record’s myapp.mydomain.com value to point to a new Elastic Load Balancer, but it looks like users are still redirected to the old ELB. What is a possible cause for this behavior?

A

TTL. Time To LIve.

Each DNS record has a TTL (Time To Live) which orders clients for how long to cache these values and not overload the DNS Resolver with DNS requests. The TTL value should be set to strike a balance between how long the value should be cached vs. how many requests should go to the DNS Resolver.

21
Q

Route 53 Latency v GeoLocaion Routing Policy

A

Latency will evaluate the latency between your users and AWS Regions

GeoLocation is more for routing based on where the users are (for example language specific websites or you want to deny traffic from certain country)

22
Q

You have purchased a domain on GoDaddy and would like to use Route 53 as the DNS Service Provider. What should you do to make this work?

A

Create a public hosted zone and update 3rd party registrar NS record.

23
Q

NACL and SG Defaults Rules.

A

AWS provides default NACL and SG.

By default, SG allows all traffic In and thus all traffic out (its stateless)

By default, NACL allows all traffic In and explicitly all traffic out.

However, if you CREATE a custom SG or ACL, they will have NO default In or Out rules.

24
Q

What is an AWS Partition ?

A

A partition is a group of AWS Regions. Each AWS account is scoped to one partition.

aws - AWS Regions
aws-cn - China Regions
aws-us-gov - AWS GovCloud (US) Regions

NOTE THAT IAM POLICIES DONT WORK ACROSS PARTITIONS.

25
Q

When would you use a Gateway Endpoint?

A

With a gateway endpoint, you can access Amazon S3 from your VPC, without requiring an internet gateway or NAT device for your VPC

must be in same region as S3 bucket

Your account has a default quota of 20 gateway endpoints per Region, which is adjustable. There is also a limit of 255 gateway endpoints per VPC.

26
Q

What are the 2 EndPoint Types?

A

Interface (all other services)
Gateway. (s3/dynamo + free, single region)

Allow you to connect to AWS services using a private network instead of www. This is for public services such as S3 or dyamodb. This gives enhbanced security and lower latency to AWS Services.

THere are two types of VPC endpoint - EndPoint Gateway or Endpoint Interface. DynamoDB and S3 can use either - everything else must use Endpoint Interface. Gateway is FREE but has restrictions (cant use private ip, cant access from another region).

27
Q

CloudFront - how many active key pairs can you have ?

A

When you use the root user to manage CloudFront key pairs, you can only have up to two active CloudFront key pairs per AWS account.

Whereas, with CloudFront key groups, you can associate a higher number of public keys with your CloudFront distribution, giving you more flexibility in how you use and manage the public keys. By default, you can associate up to four key groups with a single distribution, and you can have up to five public keys in a key group.

28
Q

Is eu-west-2 an AZ or Region ?

A

Region. AZ’s have a letter such as

eu-west-2a, eu-west-2b

eu-west-2 is the Region but 2a is the AZ

29
Q

How many EIPS can a Region have ?

A

By default, all AWS accounts are limited to 5 Elastic IP addresses per Region.

30
Q

Can ALB have an Elastic IP Address?

A

No. NLB can have one and its possible to have a NLB in front of a ALB.

31
Q

Do you pay for EIP

A

Elastic IPs are free if they are attached to a running instance. You will be charged only if you are not using it

31
Q
A
31
Q

When would you want an EIP?

A

If you need to keep the same IP forever. Public IPs will change if you stop/start instances. Sometimes this is required for IP whitelisting or for a Bastion Host where you want same IP each time.

32
Q
A
33
Q

Nat gateway v Nat instance

A

Gateway provides high availability and auto scaling and handles higher traffic throughput but is more expensive as incurs additional hourly charge. It’s fully managed.

Nat Instance is cheaper. Gives you more control but requires manual handling of scaling / patching etc.

34
Q

What level do you attach IGW?
Vpc/subnet/

A

Vpc