DMVPN - mGRE / NHRP / IPsec



 ◆ DMVPN - コンフィグ設定

 mGRE、NHRP、IPsecの技術を組み合わせたDMVPNのコンフィグ設定のうち、mGREのコンフィグ設定と
 NHRPのコンフィグ設定は解説したので、最後にDMVPN用のIPsecのコンフィグ設定を以下に解説します。
 DMVPNのコンフィグ設定では、ポイントツーポイントのGRE over IPsecと同様に「IKEフェーズ1の設定」
 と「IKEフェーズ2の設定」をしますが、以下の点が異なります。

 先ず、mGREでは対向のVPNゲートウェイのIPアドレスが1つに固定されないことからも、IKEフェーズ1の
 crypto isakmp key addressで対向のVPNゲートウェイのIPアドレスを指定せず、全てのIPアドレスを示す
 0.0.0.0 の設定を行います。認証を事前共有鍵で行わずに、RSA署名を使用することも可能です。

 
◆ IPsec IKEフェーズ 1 - 対向のVPNゲートウェイのIPアドレスの指定
 (config)# crypto isakmp key string address 0.0.0.0


 次に、IKEフェーズ 2の crypto map の設定においても、set peer コマンドで対向のVPNゲートウェイの
 IPアドレス指定するという設定ではなく、crypto ipsec profile コマンドを使用します。IPsecトンネルを
 確立するためのVPNゲートウェイのIPアドレスとして、
NHRPにより解決したNBMAアドレスを使用します。

 
◆ IPsec IKEフェーズ 2 - IPsecプロファイルの作成
 (config)# crypto ipsec profile name

 ◆ IPsec IKEフェーズ 2 - IPsecトランスフォームセットの適用
 (ipsec-profile)# set transform-set name

 
◆ Tunnelインターフェースに対してIPsecプロファイルの適用
 (config)#
interface tunnel number
 (config-if)#
tunnel protection ipsec profile name


 ◆ DMVPN - コンフィグ設定例

 下図を前提にDMVPNの設定例を紹介します。IKEフェーズ1とIKEフェーズ2のパラメータは下表とします。


    



 
◆ IKEフェーズ 1
設定パラメータ R1 R2 R3
暗号化アルゴリズム 3DES 3DES 3DES
ハッシュアルゴリズム MD5 MD5 MD5
認証方式 Pre-shared-key Pre-shared-key Pre-shared-key
DHグループ 2(1024bit) 2(1024bit) 2(1024bit)
Pre-shared key cisco cisco cisco
IKEキープアライブ 30秒 30秒 30秒


 ◆ IKEフェーズ 2
設定パラメータ R1 R2 R3
IPsecプロファイル名 PRO-DMVPN1 PRO-DMVPN1 PRO-DMVPN1
トランスフォームセット名 TS-IPSEC1 TS-IPSEC1 TS-IPSEC1
ESPトランスフォーム 3DES/ESP-MD5-HMAC 3DES/ESP-MD5-HMAC 3DES/ESP-MD5-HMAC


 R1(config)# crypto isakmp policy 1
 R1(config-isakmp)# encr 3des
 R1(config-isakmp)# hash md5
 R1(config-isakmp)# authentication pre-share
 R1(config-isakmp)# group 2


 R1(config)# crypto isakmp key cisco address 0.0.0.0
 R1(config)# crypto isakmp keepalive 30

 R1(config)# crypto ipsec transform-set TS-IPSEC1 esp-3des esp-md5-hmac
 R1(cfg-crypto-trans)# mode transport

 R1(config)# crypto ipsec profile PRO-DMVPN1
 R1(config-profile)# set transform-set TS-IPSEC1


 
R1(config)# interface tunnel0
 R1(config-if)# ip address 172.16.0.1 255.255.255.0
 R1(config-if)# tunnel source 1.1.1.1
 R1(config-if)# tunnel mode gre multipoint
 R1(config-if)# tunnel key 10
 R1(config-if)# tunnel protection ipsec profile PRO-DMVPN1

 R1(config-if)# ip nhrp network-id 100
 R1(config-if)# ip nhrp map multicast dyanmic

 R1(config-if)# ip ospf network broadcast


 
R1(config)# router ospf 1
 R1(config-router)# network 172.16.0.1 0.0.0.0 area 0
 R1(config-router)# network 192.168.1.254 0.0.0.0 area 0


 R2(config)#
crypto isakmp policy 1
 R2(config-isakmp)# encr 3des
 R2(config-isakmp)# hash md5
 R2(config-isakmp)# authentication pre-share
 R2(config-isakmp)# group 2

 R2(config)# crypto isakmp key cisco address 0.0.0.0
 R2(config)# crypto isakmp keepalive 30

 R2(config)# crypto ipsec transform-set TS-IPSEC1 esp-3des esp-md5-hmac
 R2(cfg-crypto-trans)# mode transport

 R2(config)# crypto ipsec profile PRO-DMVPN1
 R2(config-profile)# set transform-set TS-IPSEC1


 
R2(config)# interface tunnel0
 R2(config-if)# ip address 172.16.0.2 255.255.255.0
 R2(config-if)# tunnel source 2.2.2.2
 R2(config-if)# tunnel mode gre multipoint
 R2(config-if)# tunnel key 10
 R2(config-if)# tunnel protection ipsec profile PRO-DMVPN1

 R2(config-if)# ip nhrp network-id 100
 R2(config-if)# ip nhrp nhs 172.16.0.1
 R2(config-if)# ip nhrp map 172.16.0.1 1.1.1.1
 R2(config-if)# ip nhrp map multicast 1.1.1.1

 R2(config-if)# ip ospf network broadcast
 R2(config-if)# ip ospf priority 0

 
R2(config)# router ospf 1
 R2(config-router)# network 172.16.0.2 0.0.0.0 area 0
 R2(config-router)# network 192.168.2.254 0.0.0.0 area 0


 R3(config)# crypto isakmp policy 1
 R3(config-isakmp)# encr 3des
 R3(config-isakmp)# hash md5
 R3(config-isakmp)# authentication pre-share
 R3(config-isakmp)# group 2

 R3(config)# crypto isakmp key cisco address 0.0.0.0
 R3(config)# crypto isakmp keepalive 30

 R3(config)# crypto ipsec transform-set TS-IPSEC1 esp-3des esp-md5-hmac
 R3(cfg-crypto-trans)# mode transport

 R3(config)# crypto ipsec profile PRO-DMVPN1
 R3(config-profile)# set transform-set TS-IPSEC1


 
R3(config)# interface tunnel0
 R3(config-if)# ip address 172.16.0.3 255.255.255.0
 R3(config-if)# tunnel source 3.3.3.3
 R3(config-if)# tunnel mode gre multipoint
 R2(config-if)# tunnel key 10
 R2(config-if)# tunnel protection ipsec profile PRO-DMVPN1

 R3(config-if)# ip nhrp network-id 100
 R3(config-if)# ip nhrp nhs 172.16.0.1
 R3(config-if)# ip nhrp map 172.16.0.1 1.1.1.1
 R3(config-if)# ip nhrp map multicast 1.1.1.1

 R3(config-if)# ip ospf network broadcast
 R3(config-if)# ip ospf priority 0

 
R3(config)# router ospf 1
 R3(config-router)# network 172.16.0.3 0.0.0.0 area 0
 R3(config-router)# network 192.168.3.254 0.0.0.0 area 0



 以上のDMVPNの設定により、スポーク間はオンデマンド(要求があった時だけ)にIPsec-VPNを確立します。



IPsec、IPsec-VPN、リモートアクセスVPN

ネットワークエンジニアとして

Copyright (C) 2002-2024 ネットワークエンジニアとして All Rights Reserved.