VPC Basics Flashcards
How many classes of addresses are in the IPv4 format?
What are the ranges?
There are 3 classes:
○ Class A - 0.0.0.0 to 127.255.255.255.255
○ Class B - 128.0.0.0 - 191.255.255.255
Class C - 192.0.0.0 - 225.255.255.255
Can multiple entities use the same private IP address space?
Yes - so long as the overlapping IP’s remain within their intern network and do not get advertised or communicate over the internet.
What address class is the default VPC in AWS configured with?
Class B - 172.16.0.0
What is CIDR?
Classless Inter-Domain Routing – this method allows you to create networks of any size within the respective network range and the notation is the IP address followed by a “slash” i.e 10.10.0.0 /16.
REVIEW: CIDR Notation
- notation is the IP address followed by the /xx which tells you the size of the network. The “slash” is called the PREFIX.
- the BIGGER the prefix, the smaller the network and the SMALLER the prefix the larger the network
- a /16 network is a lot bigger than a /17 network and so on
- prefix /0 means “all IP addresses” and prefix /32 means one single usable IP
- the most common ranges are /8, /16, /24, /32
- Each time you increase the prefix, you are creating MORE networks but SMALLER networks
- Each time it goes up, it’s a multiple of TWO: from /16 to /17 it creates 2 more networks, from /16 to /18 it creates 4 more, from /16 to /19 it creates 8, and so on….
→ If you’re given a 10.0.0.0/16 network, the “16” means that the first 2 octets are fixed (network address) and last 2 octets are yours to play around with for hosts - each octet has EIGHT bits so 16 = 2
○ If you wanted to cut the /16 in half, you could create 2 x /17 networks which would be:
1. 10.0.0.0 to 10.0.127.255 2. 10.0.128.0 - 10.0.255.255
*** All we’ve done is take the last 2 octets (which are ours to play around with) and cut it in half… the “10.0.x.x” portion stays fixed.
What is the difference in notation between IPv4 and IPv6?
v4 is Octets and v6 is Hextets
An octet is 8 bits whereas a hextet is 16 bits.
There are FOUR octets in IPv4 and EIGHT hextets in IPv6
REVIEW: IPv6
→ You can replace the HEXTETS full of 0’s with just a single 0, or you can simply put double colons “ :: “ if there are multiple hextets of 0’s in a row.
→ A hextet is 16 bits instead of 8 (like in IPv4) + IPv6 addresses are much longer i.e 2 x octets = 8 Hextets where each Hextet is 16 bits
Example:
→ 2001:db8:1234::/48 is the address
○ The network part is everything in front of the “ :: “ because each /48 means 3 x sets of Hextets which we see in the address (48 bits where each Hextet is 16 bits)
○ The rest of the address (after the “1234”) is the HOST part of the network. This would look like:
** 2001:db8:1234:0000:0000:0000:0000.0000 or 2001:db8:1234:ffff:ffff:ffff:ffff
** There are a total of EIGHT hextets in an IPv6 address
What are big things to consider when designing a VPC?
- what size should the VPC be?
- are there any networks that CANT be used?
- what is future growth like?
- what kind of structure do we need? Tiers/Resiliency/AZs/etc.
What is the VPC minimum of and maximum network sizes?
Review - when you are given a VPC by AWS, you’re always allocated 1 x Primary Private IPv4 CIDR address by default. The smallest or largest it can be are the answer to the above question.
Min = /28 (16 usable IP addresses) Max = /16 (65456 usable IP addresses)
REVIEW: Adrian Advice When Creating VPCs
– Personal preference is to use the 10.x.y.z range
– Avoid common ranges such as 10.0.x.x … it’s better to avoid 10.0.x.x through 10.10.x.x just to play it safe since everyone uses those. Basically, just start start at 10.16.0.0.
– the Private Block of IP’s (10.x.x.x) is the primary method for IP comms from VPC’s by default. Public IP’s are used when you need to make resources public, or communicate with the internet/public AWS zone, or allow communication to the VPC from the outside
– When designing, you want to reserve 2+ network ranges with can be used in EACH region in EACH AWS account that your business uses.
§ Example: Your business has 3 x regions in the US, a region in Europe, and a region in Australia with a total of 4 x AWS accounts –> you want 2 x ranges per region for each of the 4 accounts, so that would be –> 2 x 5(regions) = 10 … 10 x 4 (accounts) = a total of 40 IP Ranges that the business can use
** this is IDEAL but not mandatory.
– Each subnet is contained in exactly ONE Availability Zone. When creating VPCs you also have to figure out how many AZ’s your VPC will need/use. Best practice is to accommodate for 3 x AZ’s and then have an extra 4th AZ as a spare (just for potential growth of that VPC).
How big is a “Micro Size” VPC?
This is a /24.
A /24 gives us 8 x subnets to work with that have 27 hosts in each for a total of 216 hosts.
How big is an “Extra Large” VPC?
This is a /16.
A /16 gives us 16 subnets to work with, each with 4091 hosts for a total of 65456 hosts.
Are VPC’s a global service?
False - they are regionally isolated/regionally resilient; they only operate our of the AZ’s of the region that they are created in.
Unless there is an explicit config allowing or denying traffic, nothing can get in or out of the localized zone.
What is a benefit of VPC’s being regionalized?
This effectively limits the blast radius - If a VPC vulnerability is exploited, only that VPC and potentially anything connected to it is affected - the threat cannot move about your AWS environment.
Are VPC’s single or multi-tenant?
They can be either on shared HW or or on dedicated HW, with dedicated obviously being much more expensive.
If you don’t make the designation, they the VPC will default to shared HW.