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
feita há 2 anos377 visualizações
1 Resposta
2
Resposta aceita

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 há 2 anos
profile pictureAWS
ESPECIALISTA
avaliado há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas