Translate

2010年2月15日月曜日

How to Create a Subnet: Amazon VPC Getting Started Guide p24

How to Create a Subnet
Subnet作成手順

The next objects to create are the Amazon VPC subnets in your VPC. If you add more than one subnet to a VPC, they are laid out in a star topology with a logical router in the middle.
次にAmazon VPC subnet を作成します。
VPCへ複数のsubnetを追加したいならば、中央に論理ルータを使った星形トポロジで配置されることになります。


When creating each subnet, you provide the VPC ID and the CIDR block for the subnet. The subnet's CIDR block can be the same as the VPC's CIDR (assuming you want only a single subnet in the VPC), or a subset of the VPC's CIDR. If you create more than one subnet in a VPC, the CIDR blocks of the subnets must not overlap.
各subnet作成時、VPC IDと、Subnet CIDRブロックを指定します。Subnet CIDRブロックはVPCのCIDR(VPC内で単一のSubnetのみ使用するのであれば)と同じ値にすることができます。複数のSubnetを作成するのであれば、CIDRブロックはオー場ラップさせるべきではありません。

Important
重要

AWS reserves both the first four and the last IP address in each subnet's CIDR block. They're not available for use.
AWAは、各Subnet CIDRブロックの最初の4つと最後のIPアドレスを予約しています。このためこれらのIPアドレスは使用することができません。


When you create a subnet, you receive the unique ID that Amazon VPC assigns to the subnet, the subnet's current state (pending or available), the number of available IP addresses in the subnet, and the subnet's Availability Zone.
Subnet作成時、Amazon VPCをSubnetに割り当てるためのユニークなID、Subnetの現在のステータス(pendingかavailable)、Subnet上の有効IPアドレス数、SubnetのAvailability Zoneをを受け取ります。


In this example, the VPC uses CIDR block 10.0.0.0/24, which provides 256 addresses. We'll break the VPC's CIDR block into two subnets, which means each will have 128 addresses. One subnet will have CIDR block 10.0.0.0/25 (for addresses 10.0.0.0 - 10.0.0.127) and the other will have CIDR block 10.0.0.128/25 (for addresses 10.0.0.128 - 10.0.0.255).
この例では、VPCはCIDRブロック10.0.0.0/24(256個のアドレス)を使用します。
これからこのVPCのCIDRブロックを2つのSubnet(各128個のアドレス)に分割します。
片方のSubnetはCIDRブロック10.0.0.0/25(10.0.0.128から10.0.0.255まで)の範囲とします。


Tip
There are many tools available to help you calculate subnet CIDR blocks. For a commonly used tool, go to http://www.subnet-calculator.com/cidr.php. Also, your network engineering group can help you determine the CIDR blocks to specify for your subnets.

Tip
多くののSubnet CIDRブロックを計算するための有用なツールがあります。
一般的に使用されているツールは、http://www.subnet-calculator.com/cidr.phpを参照してください。
ネットワーク技術グループが、Subnet CIDRブロック決定の支援を受けることもできます。


To create your subnets
Subnet作成

1. Use the ec2-create-subnet command, and provide the ID of the VPC and the CIDR block for the subnet.
ec2-create-subnetコマンドを使う。引数としてVPC IDとSubnet CIDRブロックを指定する。

PROMPT> ec2-create-subnet -c vpc_id -i 10.0.0.0/25

SUBNET subnet_id pending vpc_id 10.0.0.0/25 123 us-east-1a

The response includes the unique ID for the subnet (e.g., subnet-9d4a7b6c), the current state of the subnet (pending or available), the VPC ID, the subnet's CIDR block, the number of unused IP addresses in the subnet, and the subnet's Availability Zone.
返却情報には、subnetのユニークID(e.g. subbet-9d4a7b6c)、ステータス(pendingかavailable)、VPC ID、SubnetのCIDRブロック、Subnet内未使用IPアドレス数、SubnetのAvailability Zoneが含まれている。


2. Use the command again to create the second subnet.
もう一度コマンドを使って2番目のsubnetを作成。

PROMPT> ec2-create-subnet -c vpc_id -i 10.0.0.128/25

SUBNET subnet_id pending vpc_id 10.0.0.128/25 123 us-east-1a


You need to wait until each subnet's state is available before moving forward. You can get the current state of the subnets from their descriptions.
必ずステータスがavailableになってから次の作業を行ってください。
subnetの詳細情報から現在のステータスを参照することができます。


To get a subnet's description
subnet詳細情報の取得

・Use the ec2-describe-subnets command.
ec2-describe-subnetsコマンドを使用する。

PROMPT> ec2-describe-subnets

SUBNET subnet_id available vpc_id 10.0.0.0/25 123 us-east-1a

SUBNET other_subnet_id available vpc_id 10.0.0.128/25 123 useast-
1a

0 件のコメント:

既存アプリケーションをK8s上でコンテナ化して動かす場合の設計注意事項メモ

既存アプリをK8sなどのコンテナにして動かすには、どこを注意すればいいか..ちょっと調べたときの注意事項をメモにした。   1. The Twelve Factors (日本語訳からの転記) コードベース   バージョン管理されている1つのコードベースと複数のデプロイ 依存関係 ...