AWS Service- Networks
Networking:
Basic Networking:
IP address
2 types :
classful IPS and Classless IPs (ip 4)
Class full IPs:
8 8 8 8
class A (1 - 126) N H H H 10. 254 x 254 x 254 = 1 crore IPs
255 0 0 0
class B (128 - 191) N N H H 172.16. 254 x 254 = 64000
255 255 0 0
class C (192 - 223) N N N H 192.168.1. 254 = 254
255 255 255 0
192.168.1.1/255.255.225.0 - inside machines
192.168.1.0/24 - (AWS)
—-------------------------------------------
class D (224 - 239) N N N N (research purpose)
class E (240 - 254) N N N N
N - network bit (constant)
H - host bit ( variable)
If you are changing the constant even though it is in the same class, it is considered a different network
132.16.17.1 - class B
why 254
2^7 + 2^6 + 5 + 4 + 3 + 2 + 1 + 0
1+2+4+8+16+32+64+128 = 255
special numbers:
0 - a whole network
public address and private address
limiting the IP address:
Search online subnet calculator in google and define the IPs you want and configure the
the subnet in switch and machine level.
switch and router
switch - the same network to communicate with each other
router - different networks to communicate with each other
VLAN
dividing the switch is called VLAN
class less IP:
class A - 10.0.0.0 = 1 crore
class B - 172 = 64000 = 1 crore
class C = 1 crore
CIDR - classless interdomain routing
https://www.subnet-calculator.com/cidr.php
– Creating VPC:
– Virtual Private Cloud
– It chooses the entire IP address for your network or product
– It allows only 5 VPC’s in the free tier
– Creating Subnet:
– Divides the VPC
– for web subnets enable: Enable auto-assign public IPv4 address
– Creating Internet Gateway:
– Not secure internet
– Creating Routetable:
– Controls the internet service and share to a machine which needs internet
– Creating EC2 instance in WEB and DB server in Own VPC:
– Launch web VPC server:
– Connect DB server using a web server in the same VPC:
– NAT GATEWAY(giving internet to private subnet):
– Give temporary internet to IP’s which needed
– create NAT gateway using web subnet then create a new Route table and add the Nat gateway
and associate the DB subnet
– Internet for DB Server:
– Endpoint:
– Mainly for S3 access and some specific services
– Not Full internet
– VPC Peering:
– Connect two different VPC
Used in:
– Same region
– Across region
– Different AWS account
Make sure that you are creating a different network. if we is having 10.0.0.0/21 then the
another region should have 20.0.0.0/21 to avoid the same IP conflicts
create peering connection in US region and add the India region VPC ID then accept the
connectivity in India region
go to the Route table and add the 20.0.0.0/21 IP in web associated Route table subnet
– (US region)
– (India region)
Comments
Post a Comment