There is something I don't understand when configuring VPCs and subnets for aws...

Asked 1 years ago, Updated 1 years ago, 47 views

I am a student who is currently learning about the network.
While I am working on building an application using aws with the knowledge I have learned from books,
There was something I didn't understand when I configured the VPC and subnet.

I created the VPC at 10.0.0.0/16, and I created the subnet at 10.1.0.0/24.
This is the VPC configuration with 10.0.0.0 to 65536 network space (from 4th octet?) and
Is there no problem with the understanding that subnets are available from 10.1.0.0 to 10.1.0.256?
If I wanted to start any instances on this subnet, would it be an image that allocates IP addresses in the range 10.1.0.0 to 10.1.0.256?

If I run out of IP or want to separate subnets, is it okay to assign them in the same way as 10.2.0.0/24, 10.3.0.0/24, etc.?

Also, I am very sorry that I may not understand fundamentally, but what is the reason for allocating VPCs at 10.0.0.0/16?
I don't understand why the first octet starts with 10…
Is there any reason why I have to start with 10?

I asked because there was no one around me who could ask questions and I wanted to proceed with the study with confidence.
I'm sorry for the rudimentary question, but I'd appreciate it if you could answer it.
Thank you for your cooperation.

aws network

2022-09-29 21:57

2 Answers

This is the VPC configuration with 10.0.0.0 to 65536 network space (from 4th octet?) and
Is there no problem recognizing that subnets range from 10.1.0.0 to 10.1.0.256?

Subnets range from 10.1.0.0 to 10.1.0.255

If I wanted to start any instances on this subnet, would it be an image that allocates IP addresses in the range 10.1.0.0 to 10.1.0.256?

0,255 is reserved for networks and broadcasts. AWS also has 1,2,3 reservations.
I can use 251 pieces from 4 to 254.

If I run out of IP or want to separate subnets, is it okay to assign them in the same way as 10.2.0.0/24, 10.3.0.0/24, etc.?

No problem

Why do I assign VPCs at 10.0.0.0/16?

http://www.faqs.org/rfcs/rfc1918.html determines the space available for private addresses

10.0.0.0-10.255.255.255 (10/8 prefix)
 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

If you use something other than this, you may use it as a global address, so it is not impossible to use it. If you wear it, you will have to choose which route to go to.

I don't know why I use 10.
Starting with 10 is 24bit 10...*You can use it, so if you want 16bit, you should use 172
If I have to say something, 10 is easier to remember, so if you don't think about exhaustion, 10 might be fine.


2022-09-29 21:57

I created a VPC at 10.0.0.0/16, and a subnet at 10.1.0.0/24.

The subnet is out of range for VPC.
Split the subnet within the address range of the VPC.

  • VPCs: 10.0.0.0/16 ... from 10.0.0.0 to 10.0.255.255
    • Subnet1:10.0.0.0/24...10.0.0.0 to 10.0.0.255
    • Subnet2:10.0.1.0/24 ... from 10.0.1.0 to 10.0.1.255
      ::
    • Create up to Subnet256 (actually limited to 200 AWS)
  • Subnet1:10.0.0.0/24...10.0.0.0 to 10.0.0.255
  • Subnet2:10.0.1.0/24 ... from 10.0.1.0 to 10.0.1.255
    ::
  • Create up to Subnet256 (actually limited to 200 AWS)

As shown in the picture below, there is a subnet in the VPC box and a server in the subnet box.

◆ VPC Image Diagram
VPC image diagram

Why do I assign VPCs at 10.0.0.0/16?

You can change the address range freely, so it depends on the design.
However, private address space is recommended.

  • 10.0.0.0-10.255.255.255 (10/8 prefix)
  • 172.16.0.0 - 172.16.255.255 (172.16/12 prefix)
  • 192.168.0.0-192.168.255.255 (192.168/16 prefix)

For more information, see the User Guide.
https://docs.aws.amazon.com/ja_jp/vpc/latest/userguide/VPC_Subnets.html

(By the way) As you are studying networking, please note that there are some differences between actual networking and AWS.AWS is more abstract and easier.(That's the good thing)

Personally, I feel that using VyOS in a Docker or KVM virtual environment is more like a real network.If you are interested, please check it out.


2022-09-29 21:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.