AWS EC2 instance route table and VPC route table

0 votes
Is the VPC route table supposed to be installed as the routing table on my ec2 instance? My instance is in the associated subnet yet its route table seems to be independent of what I do in the VPC route table. I'm in the process of setting up NAT and want to have my instances take the VPC route table so they use my NAT instance as the default gateway.
Apr 12, 2022 in IoT (Internet of Things) by Aditya
• 7,680 points
790 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

 EC2 instances inside VPC use their default route to send all traffic to the virtual router provided by VPC itself.

The VPC router then forwards the traffic according to the VPC route tables for the instance's subnet.

The routes in the VPC route table do not propagate back into the instances themselves, but they're used to make forwarding decisions for all the traffic.

Forwarding traffic "directly" from one instance to another in VPC isn't a meaningful concept, because the VPC network is not a "real" Ethernet network, in spite of appearances to the contrary -- everything is virtual (it's a software-defined network). All traffic between any two instances, whether they're on the same subnet or not, always traverses the VPC network infrastructure in pretty much the same way.

If an instance is on a subnet that has the NAT instance as its default route in the subnet's VPC route table, the instance will automatically use the NAT machine as its default gateway for all traffic outside the VPC supernet, with no configuration necessary in the instance itself.

Note that, unlike a conventional network, the NAT instance needs to be on a different subnet than any of the instances that use it as their gateway. The route table for the subnet where the NAT instance is actually installed must have the igw-xxxxxxxx Internet Gateway object as its default route.

answered Apr 13, 2022 by Rahul
• 9,680 points

edited Mar 5

Related Questions In IoT (Internet of Things)

0 votes
0 answers
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP