By using AWS re:Post, you agree to the Terms of Use

The route for the VPC not showing in iproute2 when a subnet has different mask


I have a VPC with network and a subnet with address.

The route table in AWS console shows the default gateway route and with target local. The same routes show in cloud-init log, but ip route show only shows the default gateway and a local route to

I tested with Amazon Linux and Debian with the same result.

How do I get a route to in the OS? Is this expected behaviour?


1 Answer
Accepted Answer

It is expected behavior. The VPC router (.1 address) will take care of routing across subnets. The OS of the instance will only see a default route to the .1 address. You should be able to communicate within the VPC (please ensure that Security Groups, NACLs allow appropriate access).

Here's a good landing page for VPC routing:

answered 8 months ago
profile picture
reviewed 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions