【NEC UNIVERGE IX2106】トンネルに静的 IP を使用した IPsec の設定例

ルータ

はじめに

  • UNIVERGE IX での IPsec トンネル設定例を記載します
  • IPsec トンネルインターフェースの IP アドレスとして静的 IP を使用します

作業環境

■UNIVERGE IX

  • 型番:UNIVERGE IX2106
  • バージョン:10.2.16

■対向ルータ

  • 型番:Cisco C891FJ-K9
  • バージョン:15.3(3)M5

■中間ルータ(通信を中継するだけ)

  • 型番:FortiGate 60E
  • バージョン:6.2.4

ネットワーク構成

IPsec 設定

IPsec 設計

項目IKE フェーズ1IKE フェーズ2
セキュリティプロトコルesp
暗号化アルゴリズム3des3des
ハッシュアルゴリズムsha1
認証方式/認証アルゴリズムpre-shareesp-sha-hmac
DH/PFS グループ1無効
ISAKMP/IPsec  SA ライフタイム86400秒3600秒
Pre-shared Keypassword
IPsec 通信モードtunnel
IKE キープアライブ(DPD)無効
IPsec の対象トラフィックANY ⇔ ANY
IKE モードMainQuick
ISAKMP/IPsec のピアアドレス200.1.1.1 (200.1.2.1)200.1.1.1 (200.1.2.1)
IPsec トンネルセグメント10.254.1.0/30

IX2106 の設定

※IPsec 関係の設定を抜粋

# IKE 設定
ike proposal ike_prop encryption 3des hash sha lifetime 86400
ike policy ike_pol peer 200.1.2.1 key password ike_prop

# IPsec 設定
ip access-list ips_acl permit ip src any dest any
ipsec autokey-proposal ips_prop esp-3des esp-sha lifetime time 3600
ipsec autokey-map ips_map ips_acl peer 200.1.2.1 ips_prop

# インターフェース設定
interface GigaEthernet0.0
  ip address 200.1.1.1/30
  no shutdown

interface GigaEthernet1.0
  ip address 192.168.1.254/24
  no shutdown

interface Tunnel0.0
  tunnel mode ipsec
  ip address 10.254.1.1/30
  ipsec policy tunnel ips_map out
  no shutdown

# ルーティング設定
ip route 10.10.3.0/24 Tunnel0.0
ip route 200.1.2.0/30 200.1.1.2

  • interface Tunnel0.0 で ip address 10.254.1.1/30 と静的に IP を設定
  • トンネルソースの設定はありませんが、IPsec のローカルアドレスとしては自動で GigaEthernet0.0 の IP である 200.1.1.1/30 が使用されます
    • 恐らく IPsec ピアへの出力インターフェースの IP がローカルアドレスとして使用される

C891FJ の設定

※IPsec 関係の設定を抜粋

# IKE ポリシーの設定
crypto isakmp policy 1
 authentication pre-share
 encryption 3des
 group 1
 hash sha
 lifetime 86400

# 共通鍵の指定 (password) と対向ルータのIPアドレス (200.1.1.1) の設定
crypto isakmp key password address 200.1.1.1

# IPsec トランスフォーム (TF-SET) の設定
crypto ipsec transform-set TF-SET esp-3des esp-sha-hmac
 mode tunnel

# IPsec プロファイルの作成
crypto ipsec profile IPS-PRF
 set security-association lifetime kilobytes 1000000
 set transform-set TF-SET

# IPsec トンネルの作成
interface Tunnel0
 ip address 10.254.1.2 255.255.255.252
 tunnel source Vlan202
 tunnel mode ipsec ipv4
 tunnel destination 200.1.1.1
 tunnel protection ipsec profile IPS-PRF

# インターフェース設定
interface GigabitEthernet1
 switchport access vlan 113
 no ip address

interface GigabitEthernet7
 switchport access vlan 202
 no ip address

interface Vlan113
 ip address 10.10.3.254 255.255.255.0

interface Vlan202
 ip address 200.1.2.1 255.255.255.252

# ルーティング設定
ip route 192.168.1.0 255.255.255.0 Tunnel0
ip route 200.1.1.0 255.255.255.252 200.1.2.2

動作確認

ネットワーク構成(再掲)

疎通確認

◆端末A → 端末B

C:\WINDOWS\system32>ping 10.10.3.10

10.10.3.10 に ping を送信しています 32 バイトのデータ:
10.10.3.10 からの応答: バイト数 =32 時間 =5ms TTL=126
10.10.3.10 からの応答: バイト数 =32 時間 =2ms TTL=126
10.10.3.10 からの応答: バイト数 =32 時間 =2ms TTL=126
10.10.3.10 からの応答: バイト数 =32 時間 =3ms TTL=126

10.10.3.10 の ping 統計:
    パケット数: 送信 = 4、受信 = 4、損失 = 0 (0% の損失)、
ラウンド トリップの概算時間 (ミリ秒):
    最小 = 2ms、最大 = 5ms、平均 = 3ms

C:\WINDOWS\system32>
C:\WINDOWS\system32>
C:\WINDOWS\system32>tracert -d 10.10.3.10

10.10.3.10 へのルートをトレースしています。経由するホップ数は最大 30 です

  1    <1 ms    <1 ms    <1 ms  192.168.1.254
  2     1 ms     1 ms     1 ms  10.254.1.2
  3     2 ms     2 ms     2 ms  10.10.3.10

トレースを完了しました。

◆端末B → 端末A

C:\Windows\system32>ping 192.168.1.1

192.168.1.1 に ping を送信しています 32 バイトのデータ:
192.168.1.1 からの応答: バイト数 =32 時間 =2ms TTL=126
192.168.1.1 からの応答: バイト数 =32 時間 =2ms TTL=126
192.168.1.1 からの応答: バイト数 =32 時間 =2ms TTL=126
192.168.1.1 からの応答: バイト数 =32 時間 =2ms TTL=126

192.168.1.1 の ping 統計:
    パケット数: 送信 = 4、受信 = 4、損失 = 0 (0% の損失)、
ラウンド トリップの概算時間 (ミリ秒):
    最小 = 2ms、最大 = 2ms、平均 = 2ms

C:\Windows\system32>
C:\Windows\system32>
C:\Windows\system32>tracert -d 192.168.1.1

192.168.1.1 へのルートをトレースしています。経由するホップ数は最大 30 です

  1     1 ms    <1 ms    <1 ms  10.10.3.254
  2     1 ms     1 ms     1 ms  10.254.1.1
  3     2 ms     1 ms     2 ms  192.168.1.1

トレースを完了しました。

どちらの端末からでも IPsec トンネルを通っていることが分かります。

IX2106 での IPsec 状態確認

show ike sa

Router(config)# show ike sa
ISAKMP SA - 1 configured, 1 created
Local address is 200.1.1.1, port is 500
Remote address is 200.1.2.1, port is 500
  IKE policy name is ike_pol
  Direction is responder
  Initiator's cookie is 0x0dc10a2a5bc2f9d2
  Responder's cookie is 0x891ec9d1e9b87eaa
  Exchange type is main mode
  State is established
  Authentication method is pre-shared
  Encryption algorithm is 3des
  Hash algorithm is sha1
  DH group is modp768, lifetime is 83466 seconds
  #ph1 success: 1, #ph1 failure: 0
  #ph1 hash err: 0, #ph1 timeout: 0, #ph1 resend: 0
  #ph2 success: 1, #ph2 failure: 0
  #ph2 hash err: 0, #ph2 timeout: 0, #ph2 resend: 0

  • ISAKMP SA – 1 configured, 1 created
  • ph1 success: 1
  • ph2 success: 1

show ipsec sa

Router(config)# show ipsec sa
IPsec SA - 1 configured, 2 created
Interface is Tunnel0.0
  Key policy map name is ips_map
    Tunnel mode, 4-over-4, autokey-map
    Local address is 200.1.1.1
    Remote address is 200.1.2.1
    Outgoing interface is GigaEthernet0.0
    Interface MTU is 1446, path MTU is 1500
    Inbound:
      ESP, SPI is 0xf29ad90a(4070234378)
        Transform is ESP-3DES-HMAC-SHA-96
        Remaining lifetime is 645 seconds, lifebyte is 999974404 bytes
      Replay detection support is on
    Outbound:
      ESP, SPI is 0x2fa7e370(799531888)
        Transform is ESP-3DES-HMAC-SHA-96
        Remaining lifetime is 645 seconds, lifebyte is 999988696 bytes
      Replay detection support is on
    Perfect forward secrecy is off

  • IPsec SA – 1 configured, 2 created

show tunnel status

Router(config)# show tunnel status
Interface Tunnel0.0
  Tunnel mode is ipsec (4-over-4)
  Tunnel is ready
  Destination address is 200.1.2.1
  Source address is 200.1.1.1
  Nexthop address is 200.1.1.2
  Outgoing interface is GigaEthernet0.0
  Interface MTU is 1446
  Path MTU is 1500
  Statistics:
    17 packets input, 1564 bytes, 0 errors
    17 packets output, 1904 bytes, 0 errors
  Received ICMP messages:
    0 errors
      0 network unreachable
      0 host unreachable
      0 protocol unreachable
      0 fragmentation needed
      0 TTL exceeded
      0 parameter problem

  • 17 packets input, 1564 bytes, 0 errors
  • 17 packets output, 1904 bytes, 0 errors

―――――――――――――

タイトルとURLをコピーしました