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

0

I have a VPC with 10.0.0.0/24 network and a subnet with 10.0.0.0/27 address.

The route table in AWS console shows the default gateway route and 10.0.0.0/24 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 10.0.0.0/27.

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

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

Cheers

Raphael
preguntada hace 2 años377 visualizaciones
1 Respuesta
2
Respuesta aceptada

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: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html

AWS
AC
respondido hace 2 años
profile pictureAWS
EXPERTO
revisado hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas