祝:VPC in 東京 さっそくさわってみた!

記事タイトルとURLをコピーする

こんにちは、インフラエンジニアの柳瀬です。
最近、技術ブログによく顔を出しておりますが、『この人暇なんだな』なんて思わないでください(笑)
さてさて、早速ですが…

VPC東京リージョンおめでとうございます!!(AA略)

正直、アメリカだけではキツイなって思っていた方は多かったのではないでしょうか?
まさしく私もその一人だったので、さっそく会社のRTXにVPCの設定を入れてみました。
今回はそちらの作業手順とVPCインスタンスとの通信テスト結果を記載したいと思います。

  • AmzonVPCの設定(AWS Management Console)
  • YAMAHA RTX1500の設定方法
  • インスタンスを起動して行う通信テスト

1.Amazon VPCの設定

それではさっそくVPCの設定を行いたいと思います
ManagementConsoleのVPCタブを開きます Get started creating a VPCからウィザード形式で作成出来ます VPCのネットワーク構成を指定します(今回は完全なプライベートネットワークです) VPCと接続するYAMAHAルータのWAN側IPアドレスを指定します VPCのネットワーク構成はデフォルトでOKです
10.0.0.0/16のVPCネットワーク内に一つのサブネット(10.0.1.0/24)を作成します VPCの作成中です。ステータスがちょっとかっこいいです 設定ファイルのダウンロードができます VendorやPlatformは以下のように指定してダウンロードします
RTX用の設定がダウンロード出来るようになって嬉しい人はたくさんいらっしゃると思います これでVPCの設定は完了です。とっても簡単ですね。

2.YAMAHA RTX1500の設定

VPCでは冗長化の為、IPsecの設定を2つとBGPの設定が必要となります。
ダウンロードしたファイルを元にRTX1500に設定を行います。
弊社のRTXに追加した設定は以下のようなものです。

tunnel select 51
tunnel name swx-amazon01
 ipsec tunnel 51
  ipsec sa policy 51 51 esp aes-cbc sha-hmac
  ipsec ike duration ipsec-sa 51 3600
  ipsec ike duration isakmp-sa 51 28800
  ipsec ike encryption 51 aes-cbc
  ipsec ike group 51 modp1024
  ipsec ike hash 51 sha
  ipsec ike keepalive use 51 on dpd 10 3
  ipsec ike local address 51 192.168.1.254
  ipsec ike pre-shared-key 51 text SET_YOUR_PRE_SHARED_KEY
  ipsec ike remote address 51 27.0.1.16
 ipsec tunnel outer df-bit clear
 ip tunnel address 169.254.252.18/30
 ip tunnel remote address 169.254.252.17
 ip tunnel tcp mss limit 1396
 tunnel enable 51
tunnel select 52
 tunnel name swx-amazon02
 ipsec tunnel 52
  ipsec sa policy 52 52 esp aes-cbc sha-hmac
  ipsec ike duration ipsec-sa 52 3600
  ipsec ike duration isakmp-sa 52 28800
  ipsec ike encryption 52 aes-cbc
  ipsec ike group 52 modp1024
  ipsec ike hash 52 sha
  ipsec ike keepalive log 52 off
  ipsec ike keepalive use 52 on dpd 10 3
  ipsec ike local address 52 192.168.1.254
  ipsec ike pre-shared-key 52 text SET_YOUR_PRE_SHARED_KEY
  ipsec ike remote address 52 27.0.1.144
  ipsec auto refresh 52 on
 ipsec tunnel outer df-bit clear
 ip tunnel address 169.254.252.22/30
 ip tunnel remote address 169.254.252.21
 ip tunnel tcp mss limit 1396
 tunnel enable 52
bgp use on
bgp autonomous-system 65000
bgp neighbor 1 10124 169.254.252.17 hold-time=30 local-address=169.254.252.18
bgp neighbor 2 10124 169.254.252.21 hold-time=30 local-address=169.254.252.22
bgp import filter 1 equal 0.0.0.0/0
bgp import 10124 static filter 1
bgp configure refresh

IPsecの動作確認は以下のコマンドで実行できます

# show ipsec sa

BGPの動作確認は以下のコマンドで実行します

# show status bgp neighbor

3.Amazon VPCとの通信テスト

会社のパソコンからVPC内に起動したインスタンスにPingを実行してみました

●VPC in 東京リージョン
$ ping -c 3 10.0.1.160
PING 10.0.1.160 (10.2.1.160) 56(84) bytes of data.
64 bytes from 10.0.1.160: icmp_req=1 ttl=61 time=17.4 ms
64 bytes from 10.0.1.160: icmp_req=2 ttl=61 time=14.3 ms
64 bytes from 10.0.1.160: icmp_req=3 ttl=61 time=14.9 ms

●参考情報:US-EASTに作成したVPCインスタンスでの結果
$ ping -c 3 10.0.1.60
PING 10.0.1.60 (10.0.1.60) 56(84) bytes of data.
64 bytes from 10.0.1.60: icmp_req=1 ttl=61 time=199 ms
64 bytes from 10.0.1.60: icmp_req=2 ttl=61 time=198 ms
64 bytes from 10.0.1.60: icmp_req=3 ttl=61 time=197 ms

--- 10.0.1.60 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 197.425/198.108/199.093/0.672 ms

次は100MBのファイルのダウンロードテストです

●VPC in 東京リージョン
$ curl -OL http://10.0.1.160/file
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  100M  100  100M    0     0  1088k      0  0:01:34  0:01:34 --:--:-- 1050k

●参考情報:US-EASTに作成したVPCインスタンスでの結果
$ curl -OL http://10.0.1.60/file
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  100M  100  100M    0     0   579k      0  0:02:56  0:02:56 --:--:--  361k

Pingの応答時間は10倍程度の速度ですし、アメリカと比較すると東京は早くていいですね!
これからVPCを利用するケースも増えそうで楽しみです☆
Enjoy Virtual Private Cloud!!