Hi, everyone, and welcome back.
Now, in today's video, we'll go ahead and deploy the transit gateway and we'll look into the steps
that are involved.
Now, before we deploy the transit gateway, let's look into the architecture that we will be following
for our practical video.
So the overall architecture is very simple.
You have a transit gateway.
There are two pieces with a different side block.
Both the VPC are attached to the transit gateway, and the transit Gateway has a specific route entry
here.
And what is the success criteria to ensure everything is working?
The easy to instance from the VPC, one should be able to communicate to the AC, to instance from the
VPC to through the transit gateway.
So we will be launching one AC two in the VPC, one second, e, c two in the VPC two, and we'll see
if both of these instances are able to communicate to each other through transit gateway.
So this is the high level overview.
Let's go ahead and deploy our first transit gateway.
Now from the console, let's quickly go to the VPC.
And at this stage there is one default VPC that is already available.
So this is the first VPC that we'll be using.
We'll be creating one more VPC with a different CIDR block.
Let's just call it as custom VPC.
This idea.
BLOCK I'll say 192 160 800 slash 16 will keep it very simple.
Where we have only one private subnet.
We do not really need the VPC endpoints as well and we'll keep things very simple.
Right.
So this is a quick VPC configuration here.
Once then you can go ahead and create the VPC.
So let's quickly go back to the VPC.
As we know, there are two pieces that are available.
The second step is the transit gateway.
So let's go ahead and quickly create the transit gateway.
I'll go to transit Gateway here.
Let's quickly create a transit gateway.
I'll say demo Transit Gateway.
We'll keep everything as default.
We'll go ahead and directly create the transit gateway here.
Now, as we're discussing in the transit gateway concepts as well, one of the first thing that you
need to do after Transit Gateway is created is you'll have to create an attachment.
Now, since we have to VPC, we'll go ahead and attach both the VPC to the transit gateway.
It generally takes a minute or two for the transit gateway to be available.
Let's quickly wait for a moment here.
All right.
So it has been a minute and our transit gateway is now available.
Now, the next thing that you need to do is you have to create a transit gateway attachment.
So let's create an attachment.
I'll say VPC, attachment one.
We'll select the transit gateway that is created, the attachment type.
Here.
There are multiple types.
Make sure that the VPC is selected and within just select the appropriate VPC.
First, I'll be selecting the VPC with this idea of one 7231, which is the default one.
All right.
Once this is, then let's go ahead and create a transit gateway attachment in a similar way.
We'll also create one more attachment, I'll say VPC attachment to we'll select the Transit Gateway
ID, we'll select the VPC.
This time it should be 192 168 and since there is only one subnet, you can select this one subnet.
Ensure that this subnet is selected and you go ahead and create a transit gateway.
Attachment number two.
All right, let's quickly check the state.
The state is pending.
So now what we will be doing in each of the VPC will be creating a EC two instance to ensure the connectivity
is present.
So let's quickly go to the easy to console.
We'll go to the instances, we'll launch an instance, I'll say VPC, one, EC two all within just ensure.
That this is associated with a VPC.
One, let's quickly verify.
So this is associated with a VPC.
One 7231.
This is completely fine.
Let's launch the instance.
Great.
Similarly, let's also launch one more instance.
I'll say VPC, too easy to this thing.
We'll have to select a different VPC here.
So from the VPC, I'll select the 1931 68 VPC.
And within the pair, I'll just say proceed without the key pair and let's go ahead and launch the instance.
Great.
So what we'll be doing from the VPC number one will test the connectivity towards the VPC number two
through ping.
So if you want to test the ping connectivity, the security group of the VPC two should allow the ICMP
traffic as well.
So at this stage you don't have the ICMP traffic that is allowed.
So let's go ahead and quickly allow that.
So I'll edit the inbound rule here.
Let's add one more rule.
In fact, we'll just keep it simple.
Will allow all the traffic from one 7230 100 16, and I'll click on Save.
All right.
Let's go to the instances.
Both the instances are now running similarly.
Let's quickly go back to the transit gateway attachment console.
Let's refresh now.
You see that both the attachments are now available once the attachments are available.
One more thing that you'll have to check here is the root table.
So if you quickly go to the transit gateway, root tables here.
Let's open this.
Now, within your you have to ensure that there are two root entries available.
So here you see I have two root entries, one associated with the CIDR of one 7231 second associated
with a side of 192 168 Sometimes it takes a few minutes for the root entries to be available, so this
is something to keep a note of.
Now, at this stage, let's go ahead and connect to the instance.
Number one, you can either connect through SSH in case if you added a key or you can also connect through
browser, whichever way works.
All right.
So I'm connected to the instance number one from here.
Let's go ahead and try to perform a ping operation to the instance.
Number two, I'll copy the private IP.
I'll say ping.
And if I do a thing, you see, things are not working at this stage.
Now, the reason why it is not working is not because of the transit gateway per se.
It is because of the VPC route table.
So let's do one thing.
Let's quickly go to the VPC.
Now, there are two VPC.
Now, if you look into the route table, in fact, the default VPC with the CIDR of one 7231 ends with
f5a.
So in your case it might be a little different.
So just verify.
So you have a f for a I'll select this.
Now, if you go to the route table here, there is one route table.
Let's look into the route.
There are only two route entries, one towards the internet and second towards the local.
So now you will have to edit and add one more route towards the destination VPC, which is 192 160 800
16.
So any traffic that goes towards this specific destination, where should the VPC route table direct
the traffic to?
It should be directed towards the transit gateway.
All right, let's save the change.
Similarly, for our other VPC, let's go to the route table.
Now, for the route table that has the subnet associated, which is 2d6 in my case.
So let's also verify.
So the second VPC only has one subnet ending with 2d6.
So associated with that, let's open up the route table.
We'll edit that out.
We'll add one route towards the VPC number one.
So I'll say one 7230 100 slash 16.
And the target again is towards the transit gateway.
I'll save the change.
All right.
Now, if you go ahead and try to ping again, you see things are working perfectly well.
Great.
So I hope with this you understood the steps involved in the overall transit gateway, Practical.
Now, one of the good things here is that whenever you add an attachment to the transit gateway, you
do not have to manually add the route entry at the transit gateway route level.
However, at a VPC level, you still will have to add an entry towards the transit gateway so that the
traffic can be routed towards the transit gateway.
So this is the high level overview and with this will conclude today's video.