Module 5 Vpc and Peering Assignment
Module 5 Vpc and Peering Assignment
Production Network:
1. Design and build a 4-tier architecture.
2. Create 5 subnets out of which 4 should be private named app1, app2, dbcache and db and
one should be public, named web.
3. Launch instances in all subnets and name them as per the subnet that they have been
launched in.
4. Allow dbcache instance and app1 subnet to send internet requests.
5. Manage security groups and NACLs.
Development Network:
1. Design and build 2-tier architecture with two subnets named web and db and launch
instances in both subnets and name them as per the subnet names.
2. Make sure only the web subnet can send internet requests.
3. Create peering connection between production network and development network.
4. Setup connection between db subnets of both production network and development
network respectively.
Ans:
10. To get internet to public subnet (WEB) make subnet Association with WEB.
11. Now launch five EC2 instances in the Production vpc namely
a) APP-1 b) APP-2 c) DB d) DB-CACHE and e) WEB with all ubuntu
instances in their respectively subnets with default security groups.
12. Now check the internet connecting in the public subnet (WEB). So connect instance and
update with commands sudo nano test.pem, sudo chmod 400 test.pem, sudo ssh -i ubuntu
[email protected] and sudo apt update and ping google.com
13. As per the question allow db-cache instance and app1 subnet to send internet requests. For
that create NAT gateway with the name Production-nat in the WEB subnet and connectivity
type public with a elastic IP allocation to it.
14. Create another route table with a name Nat-Prod and edit route for make connection to
public (WEB) subnet to private subnets (APP-1 and DB-CACHE to pass internet. As destination
0.0.0.0/0 to target Nat gateway of Production-Nat
15. Make subnet association with APP-1 and DB-CACHE for internet request.
16. To check internet request from public subnet of WEB instance to the APP-1 and DB-CACHE
instances
Now check the internet connecting in the public subnet (WEB). So connect instance and
update with commands sudo nano test.pem, sudo chmod 400 test.pem, sudo ssh -i ubuntu
[email protected] and sudo apt update and ping google.com
7. To get internet to public subnet (WEB-2) make subnet Association with WEB.
9. Now check the internet connecting in the public subnet (WEB-2). Sudo apt update and ping
google.com
PEERING CONNECTION
1. Go to peering connecion in vpc and create peering connection
2. Now create peering connection with the name Prod-Devel-peer having requester vpc as
production and accepter vpc as development.
3. Peering connection is created with pending acceptance.
6. Go to route table and create route table with a name produ-devel-RT in the Production vpc.
7. Edit route give the CIDR of the DB-2 (20.20.2.0/24) instance of the Development subnet
8. Make subnet association with DB (10.10.4.0/24) instance of the Production subnet.
9. Similarly create another route table with a name Deve-prod-RT in the Development vpc.
10. Edit route give the CIDR of the DB (10.10.4.0/24) instance of the Production subnet
11. Make subnet association with DB-2 (20.20.2.0/24) instance of the Development subnet.
******************************END******************************************
**