

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Yamaha カスタマーゲートウェイデバイスと AWS Site-to-Site VPN の接続のトラブルシューティング
<a name="Yamaha_Troubleshooting"></a>

Yamaha のカスタマーゲートウェイデバイスの接続をトラブルシューティングする場合は、IKE、IPsec、トンネル、BGP の 4 つの要素を考慮します。これらの領域を任意の順序でトラブルシューティングできますが、IKE から (ネットワークスタックの下から) 開始して上に進むことをお勧めします。

**注記**  
IKE のフェーズ 2 で使用される `proxy ID` 設定は、Yamaha ルーターではデフォルトで無効になっています。これにより、Site-to-Site VPN への接続で問題が発生する可能性があります。`proxy ID` がルーターで設定されていない場合は、Yamaha が正しく設定できるように、 AWSが提供する設定ファイルの例を参照してください。

## IKE
<a name="YamahaIKE"></a>

以下のコマンドを実行してください。このレスポンスは、IKE が正しく設定されたカスタマーゲートウェイデバイスを示しています。

```
# show ipsec sa gateway 1
```

```
sgw  flags local-id                      remote-id        # of sa
--------------------------------------------------------------------------
1    U K   YOUR_LOCAL_NETWORK_ADDRESS     72.21.209.225    i:2 s:1 r:1
```

トンネル内で指定されたリモートゲートウェイの `remote-id` 値を含む行が表示されます。トンネル番号を省略すると、すべての Security Association (SA) を表示できます。

さらにトラブルシューティングする場合は、次のコマンドを実行して、診断情報を提供する DEBUG レベルログメッセージを有効にします。

```
# syslog debug on
# ipsec ike log message-info payload-info key-info
```

ログに記録された項目をキャンセルするには、次のコマンドを実行します。

```
# no ipsec ike log
# no syslog debug on
```

## IPsec
<a name="YamahaIPsec"></a>

以下のコマンドを実行してください。このレスポンスは、IPsec が正しく設定されたカスタマーゲートウェイデバイスを示しています。

```
# show ipsec sa gateway 1 detail
```

```
SA[1] Duration: 10675s
Local ID: YOUR_LOCAL_NETWORK_ADDRESS
Remote ID: 72.21.209.225
Protocol: IKE
Algorithm: AES-CBC, SHA-1, MODP 1024bit

SPI: 6b ce fd 8a d5 30 9b 02 0c f3 87 52 4a 87 6e 77 
Key: ** ** ** ** **  (confidential)   ** ** ** ** **
----------------------------------------------------
SA[2] Duration: 1719s
Local ID: YOUR_LOCAL_NETWORK_ADDRESS
Remote ID: 72.21.209.225
Direction: send
Protocol: ESP (Mode: tunnel)
Algorithm: AES-CBC (for Auth.: HMAC-SHA)
SPI: a6 67 47 47 
Key: ** ** ** ** **  (confidential)   ** ** ** ** **
----------------------------------------------------
SA[3] Duration: 1719s
Local ID: YOUR_LOCAL_NETWORK_ADDRESS
Remote ID: 72.21.209.225
Direction: receive
Protocol: ESP (Mode: tunnel)
Algorithm: AES-CBC (for Auth.: HMAC-SHA)
SPI: 6b 98 69 2b 
Key: ** ** ** ** **  (confidential)   ** ** ** ** **
----------------------------------------------------
SA[4] Duration: 10681s
Local ID: YOUR_LOCAL_NETWORK_ADDRESS
Remote ID: 72.21.209.225
Protocol: IKE
Algorithm: AES-CBC, SHA-1, MODP 1024bit
SPI: e8 45 55 38 90 45 3f 67 a8 74 ca 71 ba bb 75 ee 
Key: ** ** ** ** **  (confidential)   ** ** ** ** **
----------------------------------------------------
```

各トンネルインターフェイスに対して、`receive sas` と `send sas` がいずれも表示されます。

さらにトラブルシューティングする場合は、次のコマンドを使用してデバッグを有効にします。

```
# syslog debug on
# ipsec ike log message-info payload-info key-info
```

次のコマンドを実行して、デバッグを無効にします。

```
# no ipsec ike log
# no syslog debug on
```

## トンネル
<a name="YamahaTunnel"></a>

最初に、必要なファイアウォールルールがあることを確認します。ルールのリストについては、「[AWS Site-to-Site VPN カスタマーゲートウェイデバイスのファイアウォールルール](FirewallRules.md)」を参照してください。

ファイアウォールルールが正しくセットアップされた場合は、次のコマンドでトラブルシューティングを継続します。

```
# show status tunnel 1
```

```
TUNNEL[1]: 
Description: 
  Interface type: IPsec
  Current status is Online.
  from 2011/08/15 18:19:45.
  5 hours 7 minutes 58 seconds  connection.
  Received:    (IPv4) 3933 packets [244941 octets]
               (IPv6) 0 packet [0 octet]
  Transmitted: (IPv4) 3933 packets [241407 octets]
               (IPv6) 0 packet [0 octet]
```

`current status` 値がオンラインで `Interface type` が IPsec になっていることを確認します。両方のトンネルインターフェイスでコマンドを実行することを確認します。ここですべての問題を解決するには、設定を確認します。

## BGP
<a name="YamahaBGP"></a>

以下のコマンドを実行してください。

```
# show status bgp neighbor
```

```
BGP neighbor is 169.254.255.1, remote AS 7224, local AS 65000, external link
  BGP version 0, remote router ID 0.0.0.0
  BGP state = Active
  Last read 00:00:00, hold time is 0, keepalive interval is 0 seconds
  Received 0 messages, 0 notifications, 0 in queue
  Sent 0 messages, 0 notifications, 0 in queue
  Connection established 0; dropped 0
  Last reset never
Local host: unspecified
Foreign host: 169.254.255.1, Foreign port: 0

BGP neighbor is 169.254.255.5, remote AS 7224, local AS 65000, external link
  BGP version 0, remote router ID 0.0.0.0
  BGP state = Active
  Last read 00:00:00, hold time is 0, keepalive interval is 0 seconds
  Received 0 messages, 0 notifications, 0 in queue
  Sent 0 messages, 0 notifications, 0 in queue
  Connection established 0; dropped 0
  Last reset never
Local host: unspecified
Foreign host: 169.254.255.5, Foreign port:
```

両方のネイバーが表示されます。それぞれに対して、`Active` の `BGP state` 値が表示されます。

BGP ピアリングが起動している場合は、カスタマーゲートウェイデバイスが VPC へのデフォルトルート (0.0.0.0/0) をアドバタイズしていることを確認します。

```
# show status bgp neighbor 169.254.255.1 advertised-routes 
```

```
Total routes: 1
*: valid route
  Network            Next Hop        Metric LocPrf Path
* default            0.0.0.0              0        IGP
```

さらに、VPC に対応するプレフィックスを仮想プライベートゲートウェイから受け取っていることを確認します。

```
# show ip route
```

```
Destination         Gateway          Interface       Kind  Additional Info.
default             ***.***.***.***   LAN3(DHCP)    static  
10.0.0.0/16         169.254.255.1    TUNNEL[1]       BGP  path=10124
```