AWS Session 16
AWS Session 16
What is VPC
Undesrstanding Subnet
Creating VPC and Subnet
Behaviuor of Public and Private Subnet
Working With Internet Gateways (IGW)
Working with Route Table
Making Subnet Public
By default subnet are private, I want to make one subnet as public ( as we want to make WebSN as Public )
Practical
We have some default VPCs , Default subnets and Default Route Tables.
Step – 2
Step – 3
Observe “Available Ipv4” column , it is showing as 251. But we should get 2^8 = 256 That means 5 IP addresses are
missing.
Note : In every subnet 5 Ip address are reserver. Just search in google “Reserver IP address in AWS”. Select VPC and
Subnet sizing. We can see the list of IPs which are reserved. (first 4 and the last IP are reserved)
We want to make one subnet as public. To make subnet public , its two step process.
Select the subnet (10.0.1.0/24) -> Actions -> Edit Subnet Settings Modify the Auto Assing IPSettings -> Enable Auto
Assign public Ipv4 Addesss -> Save
(From now, Public Ip will be assigned to the macihnes in the subnet)
Create Internet gateway -> Name tag – MyIGW -> Create -> Close
Now we can not Attach internet gateway to subnet. So we create new Route Table.
#!/bin/bash
sudo su
yum update -y
yum install httpd -y
cd /var/www/html
echo "Hello Google from MyVPC">index.html
service httpd start
chkconfig httpd on