My AWS Notebook
11111111 11111111 hhhhhhhh hhhhhhhh
→ 2^16 = 65536 IPs)11111111 11111111 11111111 1111hhhh
→ 2^(32-28) = 2^4 = 16 IPs)+0 network, +1 VPC router, +2 DNS, +3 future, .255 broadcast
100.64.0.0/10
(RFC 6598)198.19.0.0/16
10.0.0.0/8
=> any other CIDR from 10.0.0.0/8
range
10.0.0.0/15
, cannot add a CIDR block from 10.0.0.0/16
172.16.0.0/12
=> any other CIDR from 172.16.0.0/12
, except 172.31.0.0/16
192.168.0.0/16
=> any other CIDR from 192.168.0.0/16198.19.0.0/16
100.64.0.0/10
E.g. 10.0.8.0/21 encompasses addresses from 10.0.8.0 to 10.0.15.255.
Calculation: (Source)
10.0.8.0 in binary: 00000010 00000000 00001000 00000000
Network mask (21): 11111111 11111111 11111000 00000000 (twenty-one 1s)
----------------------------------- [Logical AND]
FirstIP/NetworkAddr: 00000010 00000000 00001000 00000000 ----> 10.0.8.0
10.0.8.0 in binary: 00000010 00000000 00001000 00000000
Host bit mask (21): 00000000 00000000 00000hhh hhhhhhhh ----> 2^11 = 2048 IPs
----------------------------------- [Force host bits]
LastIP/BroadcastAddr: 00000010 00000000 00001111 11111111 ----> 10.0.15.255
curl http://169.254.169.254/latest/meta-data/public-ipv4
ErrorPortAllocation > 0
too many concurrent (55,000) connections, split the resources between multiple subnets and create multiple NAT gateways per AZ.<version> <account-id> <interface-id> <srcaddr> <dstaddr> <srcport> <dstport> <protocol> <packets> <bytes> <start> <end> <action> <log-status>
2 123456789010 eni-xxxx 203.0.113.12 172.31.16.139 0 0 1 4 336 1432917027 1432917142 ACCEPT OK
IGW (EC2-based VPN, EIP) ← vpn → IGW (EC2-based VPN, EIP)
VGW (VPC) ← vpn → IGW (EC2-based VPN, VPC)
VGW (VPC-1) ← site-to-site vpn → CGW ← site-to-site vpn → VGW (VPC-2)
VGW (VPC) ← private VIF → CGW
VGW (VPC) ← vgw association → DX Gateway ← private VIF → CGW
VPC ← vpc attachment → Transit Gateway ← site-to-site vpn, vpn attachment → CGW
VPC ← vpc attachment → Transit Gateway ← transit VIF → CGW
VPC ← vpc attachment → Transit Gateway ← tg association → DX Gateway ← transit VIF → CGW
IGW (EC2-based VPN, transit VPC) ← vpn → VGW (spoke VPC)
IGW (EC2-based VPN, transit VPC) ← vpn → (EC2-based VPN, spoke VPC)
IGW (EC2-based VPN, transit VPC) ← vpn → detached VGW ← private VIF → CGW
IGW (EC2-based VPN, transit VPC) ← vpn → CGW
VGW (VPC) ← site-to-site vpns (diff ASN) → CGWs (offices)
AWS Client VPN Endpoint (Subnet) ← vpn → Client device
(vpn client e.g. openvpn client)tracepath
is used to check MTU between 2 hosts; Path MTU Discovery; need UDPRemote machine → DNS server (on-prem, example.com) → DNS Forwarder (AWS) → R53
Remote machine → DNS server (on-prem) → Inbound Endpoint (VPC) → R53 Resolver (AWS)
Resolver (AWS) → Outbound Endpoint (forward query with Conditional Forward rule) → DNS server (on-prem)
.amazonappstream.com
(Session Gateway) on the network from which users initiate access to the
streaming instances.appstream2.<region>.aws.amazon.com
to enable user authentication.