0% found this document useful (0 votes)
11 views

Module 5 Vpc and Peering Assignment

Module 5 Vpc and Peering Assignment

Uploaded by

Krrishna Chauhan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Module 5 Vpc and Peering Assignment

Module 5 Vpc and Peering Assignment

Uploaded by

Krrishna Chauhan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Module 5:VPC AND PEERING

SUBMITTED BY :-HITESH CHAUHAN

COURSES OFFERED:ADVANCED CLOUD COMPUTING AND DEVELOPS


VPC AND PEERING ASSIGNMENT
You work for XYZ Corporation and based on the expansion requirements of your corporation you
have been asked to create and set up a distinct Amazon VPC for the production and development
team. You are expected to perform the following tasks for the respective VPCs.

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:

For Production Network:


1. Open up the AWS Management Console
2. Check for the region [us-east-1(N. Virginia)]
3.Now create two VPC namely 1. Production and 2. Development
4. Create five subnets in the production vpc namely

a) APP-1 b) APP-2 c) DB d) DB-CACHE and e)WEB

5. Making WEB as subnet Public one by Auto-assign IP setting.


6. Create internet gateway with a name Production-IGW

7. Attach this Production-IGW to Production VPC.

8. Create Route table with the name production-RT in VPC of Production.


9. Edit routes with destination as internet (0.0.0.0/0) to target internet gateway of production
(Production-IGW).

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

For Development Network:

1. Already VPC for development network created.


2. Now create two subnet namely a) WEB-2 and b) DB-2 in the development vpc.

3. Create internet gateway with a name Development-IGW


4. Attach this Development-IGW to Development VPC.

5. Create Route table with the name Development-RT in VPC of development.


6. Edit routes with destination as internet (0.0.0.0/0) to target internet gateway of development
(DevelopmentIGW).

7. To get internet to public subnet (WEB-2) make subnet Association with WEB.

8. Now launch five EC2 instances in the Development vpc namely


a) WEB-2 b) DB-2 with all ubuntu instances in their respectively subnets with default security
groups.

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.

4. Go to action and accept request


5.Now VPC peering connection is successful. It is now to modify route table.

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.

12. Two-way peering connection is done

13. Now connect Web instance (10.10.5.230) ubuntu of production to DB instance(10.10.4.74)

linux by ssh -i test.pem [email protected]


14. Now ping from DB instance (10.10.4.74) of Production network to DB-2 instance
(20.20.2.153) of the Development network

******************************END******************************************
**

You might also like