Networking Basics

Network → 2 or more computers connected to communicate. Can be logically partitioned into subnets.

A networking device is needed → Router or Switch.

IPs → Unique directions in the internet:

OSI Model

OSI Model

Classless Inter-Domain Routing (CIDR) → X.X.X.X/Y (Y bits of network, 32-Y bits of host)

Amazon Virtual Private Cloud (VPC)

Allows to provision logically isolated sections of AWS Cloud, you can control:

VPCs → Virtual network, logically isolated section of the AWS cloud (isolated from other VPCs) (5 VPCs, per account, per region).

Reserved IP addresses (per subnet)

Reserved IP addresses (per subnet)

Components

SubnetsIsolated segment of the VPC’s IP addressing.

Route Table:

Internet Gateway (IGW)Amazon VPC side of a connection to the public internet. Allow resources in VPC to communicate with the internet.

Nat Gateway (NGW) → Allow private subnets to access the internet or other AWS services.

Virtual Private Gateway (VPGW)Amazon VPC side of a VPN connection.

Peering Connection → Route traffic via private IPs between 2 peered VPCs.

VPC EndpointsPrivate connectivity to services hosted in AWS from within the VPC, without using a IGW, VPN, NAT, or proxies.

Egress-Only Internet Gateway → Stateful GW for IPv6 traffic from the VPC to the internet.

Elastic Network Interface → Virtual network interface that can be attached to an instance.

Best design practices:

Use cases examples:

Ideas for use cases → Data location, latency, price per service, and service availability.

Connectivity

How to connect VPC to the internet:

  1. Create the Internet Gateway and attach it to VPC.
  2. Update the Route Table for the subnet to be connected → Set 0.0.0.0/0 to the Internet Gateway.

Bastion Hosts → Server that provides access from an external network to a private network.

Security

AWS Network Firewall

Managed service to deploy essential protections to VPCs. Scales automatically with traffic.

Features:

VPC Peering

One to one networking connections between 2 VPCs, private connections. You can connect with VPC in other region/account via the AWS backbone and with no bottlenecks. Traffic remains in the private IP address space, but the CIDR blocks cannot overlap and transitive peering is not supported (DirectConnect or Site-to-Site VPN count as peering, so is not transitive).

Steps to enable: