5. インターネットVPN(IKEv2)設定
5.1. 固定IPアドレスによるインターネットVPN(IKEv2)
5.1.1. 設定
5.1.1.1. 本装置(A)の設定
Router# configure
Router(config)# ip route 192.168.1.0/24 Tunnel0.0
Router(config)# ikev2 authentication psk id keyid id-a key char key-a
Router(config)# ikev2 authentication psk id keyid id-b key char key-b
Router(config)# ppp profile ppp-profile
Router(config-ppp-ppp-profile)# authentication myname user-a@example.com
Router(config-ppp-ppp-profile)# authentication password user-a@example.com ppp-password-a
Router(config-ppp-ppp-profile)# exit
Router(config)# ikev2 default-profile
Router(config-ikev2-dprof)# local-authentication psk id keyid id-a
Router(config-ikev2-dprof)# exit
Router(config)# interface GigaEthernet2.0
Router(config-GigaEthernet2.0)# ip address 192.168.0.254/24
Router(config-GigaEthernet2.0)# no shutdown
Router(config-GigaEthernet2.0)# exit
Router(config)# interface GigaEthernet0.1
Router(config-GigaEthernet0.1)# encapsulation pppoe
Router(config-GigaEthernet0.1)# ppp binding ppp-profile
Router(config-GigaEthernet0.1)# ip address 203.0.113.1/32
Router(config-GigaEthernet0.1)# no shutdown
Router(config-GigaEthernet0.1)# exit
Router(config)# interface Tunnel0.0
Router(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Router(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Router(config-Tunnel0.0)# ip tcp adjust-mss auto
Router(config-Tunnel0.0)# ikev2 connect-type auto
Router(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
Router(config-Tunnel0.0)# ikev2 peer 198.51.100.1 authentication psk id keyid id-b
Router(config-Tunnel0.0)# no shutdown
Router(config-Tunnel0.0)# exit
Router(config)#
5.1.1.2. 本装置(B)の設定
Router# configure
Router(config)# ip route 192.168.0.0/24 Tunnel0.0
Router(config)# ikev2 authentication psk id keyid id-a key char key-a
Router(config)# ikev2 authentication psk id keyid id-b key char key-b
Router(config)# ppp profile ppp-profile
Router(config-ppp-ppp-profile)# authentication myname user-b@example.com
Router(config-ppp-ppp-profile)# authentication password user-b@example.com ppp-password-b
Router(config-ppp-ppp-profile)# exit
Router(config)# ikev2 default-profile
Router(config-ikev2-dprof)# local-authentication psk id keyid id-b
Router(config-ikev2-dprof)# exit
Router(config)# interface GigaEthernet2.0
Router(config-GigaEthernet2.0)# ip address 192.168.1.254/24
Router(config-GigaEthernet2.0)# no shutdown
Router(config-GigaEthernet2.0)# exit
Router(config)# interface GigaEthernet0.1
Router(config-GigaEthernet0.1)# encapsulation pppoe
Router(config-GigaEthernet0.1)# ppp binding ppp-profile
Router(config-GigaEthernet0.1)# ip address 198.51.100.1/32
Router(config-GigaEthernet0.1)# no shutdown
Router(config-GigaEthernet0.1)# exit
Router(config)# interface Tunnel0.0
Router(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Router(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Router(config-Tunnel0.0)# ip tcp adjust-mss auto
Router(config-Tunnel0.0)# ikev2 connect-type auto
Router(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
Router(config-Tunnel0.0)# ikev2 peer 203.0.113.1 authentication psk id keyid id-a
Router(config-Tunnel0.0)# no shutdown
Router(config-Tunnel0.0)# exit
Router(config)#
5.1.2. 解説
5.1.2.1. 本装置(A)の解説
ip route 192.168.1.0/24 Tunnel0.0
IPsec接続先をトンネルインタフェースに設定します。
ikev2 authentication psk id keyid id-a key char key-a
ikev2 authentication psk id keyid id-b key char key-b
ikev2 default-profile
local-authentication psk id keyid id-a
interface Tunnel0.0
tunnel mode ipsec-ikev2
トンネルモードをIPsec IKEv2に設定します。
interface Tunnel0.0
ikev2 connect-type auto
interface Tunnel0.0
ikev2 outgoing-interface GigaEthernet0.1
interface Tunnel0.0
ikev2 peer 198.51.100.1 authentication psk id keyid id-b
interface Tunnel0.0
ip unnumbered GigaEthernet2.0
GE2.0 のIPアドレスと共有することができます。interface Tunnel0.0
ip tcp adjust-mss auto
トンネルインタフェースを通るTCPパケットのMSS値をトンネルインタフェースのMTU長以下に自動調整します。
5.1.2.2. 本装置(B)の解説
本装置(A)と同様の考え方で設定します。
5.2. 動的IPアドレスによるインターネットVPN(IKEv2)
5.2.1. 設定
5.2.1.1. 本装置(A)の設定
Router# configure
Router(config)# ip route 192.168.1.0/24 Tunnel0.0
Router(config)# ikev2 authentication psk id keyid id-a key char key-a
Router(config)# ikev2 authentication psk id keyid id-b key char key-b
Router(config)# ppp profile ppp-profile
Router(config-ppp-ppp-profile)# authentication myname user-a@example.com
Router(config-ppp-ppp-profile)# authentication password user-a@example.com ppp-password-a
Router(config-ppp-ppp-profile)# exit
Router(config)# ikev2 default-profile
Router(config-ikev2-dprof)# local-authentication psk id keyid id-a
Router(config-ikev2-dprof)# exit
Router(config)# interface GigaEthernet2.0
Router(config-GigaEthernet2.0)# ip address 192.168.0.254/24
Router(config-GigaEthernet2.0)# no shutdown
Router(config-GigaEthernet2.0)# exit
Router(config)# interface GigaEthernet0.1
Router(config-GigaEthernet0.1)# encapsulation pppoe
Router(config-GigaEthernet0.1)# ppp binding ppp-profile
Router(config-GigaEthernet0.1)# ip address 203.0.113.1/32
Router(config-GigaEthernet0.1)# no shutdown
Router(config-GigaEthernet0.1)# exit
Router(config)# interface Tunnel0.0
Router(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Router(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Router(config-Tunnel0.0)# ip tcp adjust-mss auto
Router(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
Router(config-Tunnel0.0)# ikev2 peer any authentication psk id keyid id-b
Router(config-Tunnel0.0)# no shutdown
Router(config-Tunnel0.0)# exit
Router(config)#
5.2.1.2. 本装置(B)の設定
Router# configure
Router(config)# ip route 192.168.0.0/24 Tunnel0.0
Router(config)# ikev2 authentication psk id keyid id-a key char key-a
Router(config)# ikev2 authentication psk id keyid id-b key char key-b
Router(config)# ppp profile ppp-profile
Router(config-ppp-ppp-profile)# authentication myname user-b@example.com
Router(config-ppp-ppp-profile)# authentication password user-b@example.com ppp-password-b
Router(config-ppp-ppp-profile)# exit
Router(config)# ikev2 default-profile
Router(config-ikev2-dprof)# local-authentication psk id keyid id-b
Router(config-ikev2-dprof)# exit
Router(config)# interface GigaEthernet2.0
Router(config-GigaEthernet2.0)# ip address 192.168.1.254/24
Router(config-GigaEthernet2.0)# no shutdown
Router(config-GigaEthernet2.0)# exit
Router(config)# interface GigaEthernet0.1
Router(config-GigaEthernet0.1)# encapsulation pppoe
Router(config-GigaEthernet0.1)# ppp binding ppp-profile
Router(config-GigaEthernet0.1)# ip address ipcp
Router(config-GigaEthernet0.1)# no shutdown
Router(config-GigaEthernet0.1)# exit
Router(config)# interface Tunnel0.0
Router(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Router(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Router(config-Tunnel0.0)# ip tcp adjust-mss auto
Router(config-Tunnel0.0)# ikev2 connect-type auto
Router(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
Router(config-Tunnel0.0)# ikev2 peer 203.0.113.1 authentication psk id keyid id-a
Router(config-Tunnel0.0)# no shutdown
Router(config-Tunnel0.0)# exit
Router(config)#
5.2.2. 解説
5.2.2.1. 本装置(A)の解説
ip route 192.168.1.0/24 Tunnel0.0
IPsec接続先をトンネルインタフェースに設定します。
ikev2 authentication psk id keyid id-a key char key-a
ikev2 authentication psk id keyid id-b key char key-b
ikev2 default-profile
local-authentication psk id keyid id-a
interface Tunnel0.0
tunnel mode ipsec-ikev2
トンネルモードをIPsec IKEv2に設定します。
interface Tunnel0.0
ikev2 outgoing-interface GigaEthernet0.1
interface Tunnel0.0
ikev2 peer any authentication psk id keyid id-b
interface Tunnel0.0
ip unnumbered GigaEthernet2.0
GE2.0 のIPアドレスと共有することができます。interface Tunnel0.0
ip tcp adjust-mss auto
トンネルインタフェースを通るTCPパケットのMSS値をトンネルインタフェースのMTU長以下に自動調整します。
5.2.2.2. 本装置(B)の解説
interface Tunnel0.0
ikev2 connect-type auto
5.3. 動的IPアドレスによる複数対地インターネットVPN(IKEv2)
5.3.1. 設定
5.3.1.1. 本装置(A)の設定
Router# configure
Router(config)# hostname Center
Center(config)# syslog enable
Center(config)# syslog function all warn
Center(config)# ip route default GigaEthernet0.1
Center(config)# ip route 192.168.1.0/24 Tunnel1.0
Center(config)# ip route 192.168.2.0/24 Tunnel2.0
Center(config)# proxy-dns server 198.51.100.1 priority 110
Center(config)# proxy-dns server 198.51.100.2 priority 90
Center(config)# ikev2 authentication psk id keyid id-a key char key-a
Center(config)# ikev2 authentication psk id keyid id-b key char key-b
Center(config)# ikev2 authentication psk id keyid id-c key char key-c
Center(config)# ppp profile ppp-profile
Center(config-ppp-ppp-profile)# authentication myname user-a@example.com
Center(config-ppp-ppp-profile)# authentication password user-a@example.com ppp-password-a
Center(config-ppp-ppp-profile)# exit
Center(config)# ip dhcp profile dhcp-profile
Center(config-dhcp-dhcp-profile)# dns-server 192.168.0.254
Center(config-dhcp-dhcp-profile)# exit
Center(config)# ikev2 default-profile
Center(config-ikev2-dprof)# local-authentication psk id keyid id-a
Center(config-ikev2-dprof)# exit
Center(config)# interface GigaEthernet2.0
Center(config-GigaEthernet2.0)# ip address 192.168.0.254/24
Center(config-GigaEthernet2.0)# ip dhcp enable
Center(config-GigaEthernet2.0)# ip dhcp binding dhcp-profile
Center(config-GigaEthernet2.0)# proxy-dns ip enable
Center(config-GigaEthernet2.0)# no shutdown
Center(config-GigaEthernet2.0)# exit
Center(config)# interface GigaEthernet0.1
Center(config-GigaEthernet0.1)# encapsulation pppoe
Center(config-GigaEthernet0.1)# ppp binding ppp-profile
Center(config-GigaEthernet0.1)# ip address 203.0.113.1/32
Center(config-GigaEthernet0.1)# ip napt enable
Center(config-GigaEthernet0.1)# ip napt static GigaEthernet0.1 udp 500
Center(config-GigaEthernet0.1)# ip napt static GigaEthernet0.1 50
Center(config-GigaEthernet0.1)# no shutdown
Center(config-GigaEthernet0.1)# exit
Center(config)# interface Tunnel1.0
Center(config-Tunnel1.0)# tunnel mode ipsec-ikev2
Center(config-Tunnel1.0)# ip unnumbered GigaEthernet2.0
Center(config-Tunnel1.0)# ip tcp adjust-mss auto
Center(config-Tunnel1.0)# ikev2 outgoing-interface GigaEthernet0.1
Center(config-Tunnel1.0)# ikev2 peer any authentication psk id keyid id-b
Center(config-Tunnel1.0)# proxy-dns ip enable
Center(config-Tunnel1.0)# no shutdown
Center(config-Tunnel1.0)# exit
Center(config)# interface Tunnel2.0
Center(config-Tunnel2.0)# tunnel mode ipsec-ikev2
Center(config-Tunnel2.0)# ip unnumbered GigaEthernet2.0
Center(config-Tunnel2.0)# ip tcp adjust-mss auto
Center(config-Tunnel2.0)# ikev2 outgoing-interface GigaEthernet0.1
Center(config-Tunnel2.0)# ikev2 peer any authentication psk id keyid id-c
Center(config-Tunnel2.0)# proxy-dns ip enable
Center(config-Tunnel2.0)# no shutdown
Center(config-Tunnel2.0)# exit
Center(config)#
5.3.1.2. 本装置(B)の設定
Router# configure
Router(config)# hostname Site1
Site1(config)# syslog enable
Site1(config)# syslog function all warn
Site1(config)# ip route default Tunnel0.0
Site1(config)# ikev2 authentication psk id keyid id-a key char key-a
Site1(config)# ikev2 authentication psk id keyid id-b key char key-b
Site1(config)# ppp profile ppp-profile
Site1(config-ppp-ppp-profile)# authentication myname user-b@example.com
Site1(config-ppp-ppp-profile)# authentication password user-b@example.com ppp-password-b
Site1(config-ppp-ppp-profile)# exit
Site1(config)# ip dhcp profile dhcp-profile
Site1(config-dhcp-dhcp-profile)# dns-server 192.168.0.254
Site1(config-dhcp-dhcp-profile)# exit
Site1(config)# ikev2 default-profile
Site1(config-ikev2-dprof)# local-authentication psk id keyid id-b
Site1(config-ikev2-dprof)# exit
Site1(config)# interface GigaEthernet2.0
Site1(config-GigaEthernet2.0)# ip address 192.168.1.254/24
Site1(config-GigaEthernet2.0)# ip dhcp enable
Site1(config-GigaEthernet2.0)# ip dhcp binding dhcp-profile
Site1(config-GigaEthernet2.0)# no shutdown
Site1(config-GigaEthernet2.0)# exit
Site1(config)# interface GigaEthernet0.1
Site1(config-GigaEthernet0.1)# encapsulation pppoe
Site1(config-GigaEthernet0.1)# ppp binding ppp-profile
Site1(config-GigaEthernet0.1)# ip address ipcp
Site1(config-GigaEthernet0.1)# no shutdown
Site1(config-GigaEthernet0.1)# exit
Site1(config)# interface Tunnel0.0
Site1(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Site1(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Site1(config-Tunnel0.0)# ip tcp adjust-mss auto
Site1(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
Site1(config-Tunnel0.0)# ikev2 peer 203.0.113.1 authentication psk id keyid id-a
Site1(config-Tunnel0.0)# no shutdown
Site1(config-Tunnel0.0)# exit
5.3.1.3. 本装置(C)の設定
Router# configure
Router(config)# hostname Site2
Site2(config)# syslog enable
Site2(config)# syslog function all warn
Site2(config)# ip route default Tunnel0.0
Site2(config)# ikev2 authentication psk id keyid id-a key char key-a
Site2(config)# ikev2 authentication psk id keyid id-c key char key-c
Site2(config)# ppp profile ppp-profile
Site2(config-ppp-ppp-profile)# authentication myname user-c@example.com
Site2(config-ppp-ppp-profile)# authentication password user-c@example.com ppp-password-c
Site2(config-ppp-ppp-profile)# exit
Site2(config)# ip dhcp profile dhcp-profile
Site2(config-dhcp-dhcp-profile)# dns-server 192.168.0.254
Site2(config-dhcp-dhcp-profile)# exit
Site2(config)# ikev2 default-profile
Site2(config-ikev2-dprof)# local-authentication psk id keyid id-c
Site2(config-ikev2-dprof)# exit
Site2(config)# interface GigaEthernet2.0
Site2(config-GigaEthernet2.0)# ip address 192.168.2.254/24
Site2(config-GigaEthernet2.0)# ip dhcp enable
Site2(config-GigaEthernet2.0)# ip dhcp binding dhcp-profile
Site2(config-GigaEthernet2.0)# no shutdown
Site2(config-GigaEthernet2.0)# exit
Site2(config)# interface GigaEthernet0.1
Site2(config-GigaEthernet0.1)# encapsulation pppoe
Site2(config-GigaEthernet0.1)# ppp binding ppp-profile
Site2(config-GigaEthernet0.1)# ip address ipcp
Site2(config-GigaEthernet0.1)# no shutdown
Site2(config-GigaEthernet0.1)# exit
Site2(config)# interface Tunnel0.0
Site2(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Site2(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Site2(config-Tunnel0.0)# ip tcp adjust-mss auto
Site2(config-Tunnel0.0)# ikev2 connect-type auto
Site2(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
Site2(config-Tunnel0.0)# ikev2 peer 203.0.113.1 authentication psk id keyid id-a
Site2(config-Tunnel0.0)# no shutdown
Site2(config-Tunnel0.0)# exit
Site2(config)#
5.3.2. 解説
5.3.2.1. 本装置(A)の解説
ip route default GigaEthernet0.1
ip route 192.168.1.0/24 Tunnel1.0
ip route 192.168.2.0/24 Tunnel2.0
ikev2 authentication psk id keyid id-a key char key-a
ikev2 authentication psk id keyid id-b key char key-b
ikev2 authentication psk id keyid id-c key char key-c
ikev2 default-profile
local-authentication psk id keyid id-a
interface Tunnel1.0
tunnel mode ipsec-ikev2
トンネルモードをIPsec IKEv2に設定します。
interface Tunnel1.0
ikev2 outgoing-interface GigaEthernet0.1
interface Tunnel1.0
ikev2 peer any authentication psk id keyid id-b
interface Tunnel2.0
ikev2 peer any authentication psk id keyid id-c
interface Tunnel1.0
ip unnumbered GigaEthernet2.0
GE2.0 のIPアドレスと共有することができます。interface Tunnel1.0
ip tcp adjust-mss auto
トンネルインタフェースを通るTCPパケットのMSS値をトンネルインタフェースのMTU長以下に自動調整します。
proxy-dns server 198.51.100.1 priority 110
proxy-dns server 198.51.100.2 priority 90
interface GigaEthernet2.0
proxy-dns ip enable
interface Tunnel1.0
proxy-dns ip enable
interface Tunnel2.0
proxy-dns ip enable
syslog enable
syslog function all warn
ログ取得(取得する機能 : all 、取得レベル : warn )の設定です。
ip dhcp profile dhcp-profile
dns-server 192.168.0.254
interface GigaEthernet2.0
ip dhcp enable
ip dhcp binding dhcp-profile
192.168.0.254 を設定します。interface GigaEthernet0.1
ip napt enable
ip napt static GigaEthernet0.1 udp 500
ip napt static GigaEthernet0.1 50
5.3.2.2. 本装置(B)の解説
ip route default Tunnel0.0
interface Tunnel0.0
ikev2 connect-type auto
5.3.2.3. 本装置(C)の解説
本装置(A)、本装置(B)と同様の考え方で設定します。
5.4. ダイナミックDNSを使用したインターネットVPN(IKEv2)
5.4.1. 設定
5.4.1.1. 本装置(A)の設定
Router# configure
Router(config)# hostname IX-R2520-A
IX-R2520-A(config)# ip route 192.168.1.0/24 Tunnel0.0
IX-R2520-A(config)# ikev2 authentication psk id keyid id-a key char key-a
IX-R2520-A(config)# ikev2 authentication psk id keyid id-b key char key-b
IX-R2520-A(config)# nm ip enable
IX-R2520-A(config)# nm account sample-group password plain sample-password
IX-R2520-A(config)# nm sitename tokyo
IX-R2520-A(config)# nm outgoing-interface GigaEthernet0.1
IX-R2520-A(config)# ppp profile ppp-profile
IX-R2520-A(config-ppp-ppp-profile)# authentication myname user-a@example.com
IX-R2520-A(config-ppp-ppp-profile)# authentication password user-a@example.com ppp-password-a
IX-R2520-A(config-ppp-ppp-profile)# exit
IX-R2520-A(config)# ikev2 default-profile
IX-R2520-A(config-ikev2-dprof)# local-authentication psk id keyid id-a
IX-R2520-A(config-ikev2-dprof)# exit
IX-R2520-A(config)# interface GigaEthernet2.0
IX-R2520-A(config-GigaEthernet2.0)# ip address 192.168.0.254/24
IX-R2520-A(config-GigaEthernet2.0)# no shutdown
IX-R2520-A(config-GigaEthernet2.0)# exit
IX-R2520-A(config)# interface GigaEthernet0.1
IX-R2520-A(config-GigaEthernet0.1)# encapsulation pppoe
IX-R2520-A(config-GigaEthernet0.1)# ppp binding ppp-profile
IX-R2520-A(config-GigaEthernet0.1)# ip address ipcp
IX-R2520-A(config-GigaEthernet0.1)# no shutdown
IX-R2520-A(config-GigaEthernet0.1)# exit
IX-R2520-A(config)# interface Tunnel0.0
IX-R2520-A(config-Tunnel0.0)# tunnel mode ipsec-ikev2
IX-R2520-A(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
IX-R2520-A(config-Tunnel0.0)# ip tcp adjust-mss auto
IX-R2520-A(config-Tunnel0.0)# ikev2 connect-type auto
IX-R2520-A(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
IX-R2520-A(config-Tunnel0.0)# ikev2 peer-fqdn-ipv4 ix-r2520-b.sample-group.nmddns.jp authentication psk id keyid id-b
IX-R2520-A(config-Tunnel0.0)# no shutdown
IX-R2520-A(config-Tunnel0.0)# exit
IX-R2520-A(config)#
5.4.1.2. 本装置(B)の設定
Router# configure
Router(config)# hostname IX-R2520-B
IX-R2520-B(config)# ip route 192.168.0.0/24 Tunnel0.0
IX-R2520-B(config)# ikev2 authentication psk id keyid id-a key char key-a
IX-R2520-B(config)# ikev2 authentication psk id keyid id-b key char key-b
IX-R2520-B(config)# nm ip enable
IX-R2520-B(config)# nm account sample-group password plain sample-password
IX-R2520-B(config)# nm sitename osaka
IX-R2520-B(config)# nm outgoing-interface GigaEthernet0.1
IX-R2520-B(config)# ppp profile ppp-profile
IX-R2520-B(config-ppp-ppp-profile)# authentication myname user-b@example.com
IX-R2520-B(config-ppp-ppp-profile)# authentication password user-b@example.com ppp-password-b
IX-R2520-B(config-ppp-ppp-profile)# exit
IX-R2520-B(config)# ikev2 default-profile
IX-R2520-B(config-ikev2-dprof)# local-authentication psk id keyid id-b
IX-R2520-B(config-ikev2-dprof)# exit
IX-R2520-B(config)# interface GigaEthernet2.0
IX-R2520-B(config-GigaEthernet2.0)# ip address 192.168.1.254/24
IX-R2520-B(config-GigaEthernet2.0)# no shutdown
IX-R2520-B(config-GigaEthernet2.0)# exit
IX-R2520-B(config)# interface GigaEthernet0.1
IX-R2520-B(config-GigaEthernet0.1)# encapsulation pppoe
IX-R2520-B(config-GigaEthernet0.1)# ppp binding ppp-profile
IX-R2520-B(config-GigaEthernet0.1)# ip address ipcp
IX-R2520-B(config-GigaEthernet0.1)# no shutdown
IX-R2520-B(config-GigaEthernet0.1)# exit
IX-R2520-B(config)# interface Tunnel0.0
IX-R2520-B(config-Tunnel0.0)# tunnel mode ipsec-ikev2
IX-R2520-B(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
IX-R2520-B(config-Tunnel0.0)# ip tcp adjust-mss auto
IX-R2520-B(config-Tunnel0.0)# ikev2 connect-type auto
IX-R2520-B(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
IX-R2520-B(config-Tunnel0.0)# ikev2 peer-fqdn-ipv4 ix-r2520-a.sample-group.nmddns.jp authentication psk id keyid id-a
IX-R2520-B(config-Tunnel0.0)# no shutdown
IX-R2520-B(config-Tunnel0.0)# exit
IX-R2520-B(config)#
5.4.2. 解説
5.4.2.1. 本装置(A)の解説
hostname IX-R2520-A
IX-R2520-A を設定します。ip route 192.168.1.0/24 Tunnel0.0
nm ip enable
NetMeisterクライアント機能を有効化します。
nm account sample-group password plain sample-password
NetMeisterで登録したグループID : sample-group とパスワード : sample-password を設定します。
nm sitename tokyo
tokyo を設定します。nm outgoing-interface GigaEthernet0.1
ikev2 authentication psk id keyid id-a key char key-a
ikev2 authentication psk id keyid id-b key char key-b
ikev2 default-profile
local-authentication psk id keyid id-a
interface Tunnel0.0
tunnel mode ipsec-ikev2
トンネルモードをIPsec IKEv2に設定します。
interface Tunnel0.0
ikev2 connect-type auto
interface Tunnel0.0
ikev2 outgoing-interface GigaEthernet0.1
interface Tunnel0.0
ikev2 peer-fqdn-ipv4 ix-r2520-b.sample-group.nmddns.jp authentication psk id keyid id-b
interface Tunnel0.0
ip unnumbered GigaEthernet2.0
GE2.0 のIPアドレスと共有することができます。interface Tunnel0.0
ip tcp adjust-mss auto
トンネルインタフェースを通るTCPパケットのMSS値をトンネルインタフェースのMTU長以下に自動調整します。
5.4.2.2. 本装置(B)の解説
本装置(A)と同様の考え方で設定します。
5.5. NAT装置配下によるインターネットVPN(IKEv2)
5.5.1. 設定
5.5.1.1. 本装置(A)の設定
Router# configure
Router(config)# ip route 192.168.1.0/24 Tunnel0.0
Router(config)# ikev2 authentication psk id keyid id-a key char key-a
Router(config)# ikev2 authentication psk id keyid id-b key char key-b
Router(config)# ppp profile ppp-profile
Router(config-ppp-ppp-profile)# authentication myname user-a@example.com
Router(config-ppp-ppp-profile)# authentication password user-a@example.com ppp-password-a
Router(config-ppp-ppp-profile)# exit
Router(config)# ikev2 default-profile
Router(config-ikev2-dprof)# local-authentication psk id keyid id-a
Router(config-ikev2-dprof)# nat-traversal keepalive 20
Router(config-ikev2-dprof)# exit
Router(config)# interface GigaEthernet2.0
Router(config-GigaEthernet2.0)# ip address 192.168.0.254/24
Router(config-GigaEthernet2.0)# no shutdown
Router(config-GigaEthernet2.0)# exit
Router(config)# interface GigaEthernet0.1
Router(config-GigaEthernet0.1)# encapsulation pppoe
Router(config-GigaEthernet0.1)# ppp binding ppp-profile
Router(config-GigaEthernet0.1)# ip address 203.0.113.1/32
Router(config-GigaEthernet0.1)# no shutdown
Router(config-GigaEthernet0.1)# exit
Router(config)# interface Tunnel0.0
Router(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Router(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Router(config-Tunnel0.0)# ip tcp adjust-mss auto
Router(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
Router(config-Tunnel0.0)# ikev2 peer any authentication psk id keyid id-b
Router(config-Tunnel0.0)# no shutdown
Router(config-Tunnel0.0)# exit
Router(config)#
5.5.1.2. 本装置(B)の設定
Router# configure
Router(config)# ip route 192.168.0.0/24 Tunnel0.0
Router(config)# ikev2 authentication psk id keyid id-a key char key-a
Router(config)# ikev2 authentication psk id keyid id-b key char key-b
Router(config)# ikev2 default-profile
Router(config-ikev2-dprof)# local-authentication psk id keyid id-b
Router(config-ikev2-dprof)# nat-traversal keepalive 20
Router(config-ikev2-dprof)# exit
Router(config)# interface GigaEthernet0.0
Router(config-GigaEthernet0.0)# ip address 172.16.1.1/24
Router(config-GigaEthernet0.0)# no shutdown
Router(config-GigaEthernet0.0)# exit
Router(config)# interface GigaEthernet2.0
Router(config-GigaEthernet2.0)# ip address 192.168.1.254/24
Router(config-GigaEthernet2.0)# no shutdown
Router(config-GigaEthernet2.0)# exit
Router(config)# interface Tunnel0.0
Router(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Router(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Router(config-Tunnel0.0)# ip tcp adjust-mss auto
Router(config-Tunnel0.0)# ikev2 connect-type auto
Router(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.0 172.16.1.254
Router(config-Tunnel0.0)# ikev2 peer 203.0.113.1 authentication psk id keyid id-a
Router(config-Tunnel0.0)# no shutdown
Router(config-Tunnel0.0)# exit
Router(config)#
5.5.2. 解説
5.5.2.1. 本装置(A)の解説
ip route 192.168.1.0/24 Tunnel0.0
IPsec接続先をトンネルインタフェースに設定します。
ikev2 authentication psk id keyid id-a key char key-a
ikev2 authentication psk id keyid id-b key char key-b
ikev2 default-profile
local-authentication psk id keyid id-a
ikev2 default-profile
nat-traversal keepalive 20
interface Tunnel0.0
tunnel mode ipsec-ikev2
トンネルモードをIPsec IKEv2に設定します。
interface Tunnel0.0
ikev2 outgoing-interface GigaEthernet0.1
interface Tunnel0.0
ikev2 peer any authentication psk id keyid id-b
interface Tunnel0.0
ip unnumbered GigaEthernet2.0
GE2.0 のIPアドレスと共有することができます。interface Tunnel0.0
ip tcp adjust-mss auto
トンネルインタフェースを通るTCPパケットのMSS値をトンネルインタフェースのMTU長以下に自動調整します。
5.5.2.2. 本装置(B)の解説
interface Tunnel0.0
ikev2 connect-type auto
5.6. 動的IPアドレスによるモバイル接続を利用したインターネットVPN(IKEv2)
5.6.1. 設定
5.6.1.1. 本装置(A)の設定
Router# configure
Router(config)# ip route 192.168.1.0/24 Tunnel0.0
Router(config)# ikev2 authentication psk id keyid id-a key char key-a
Router(config)# ikev2 authentication psk id keyid id-b key char key-b
Router(config)# ppp profile ppp-profile
Router(config-ppp-ppp-profile)# authentication myname user-a@example.com
Router(config-ppp-ppp-profile)# authentication password user-a@example.com ppp-password-a
Router(config-ppp-ppp-profile)# exit
Router(config)# ikev2 default-profile
Router(config-ikev2-dprof)# local-authentication psk id keyid id-a
Router(config-ikev2-dprof)# nat-traversal keepalive 20
Router(config-ikev2-dprof)# exit
Router(config)# interface GigaEthernet2.0
Router(config-GigaEthernet2.0)# ip address 192.168.0.254/24
Router(config-GigaEthernet2.0)# no shutdown
Router(config-GigaEthernet2.0)# exit
Router(config)# interface GigaEthernet0.1
Router(config-GigaEthernet0.1)# encapsulation pppoe
Router(config-GigaEthernet0.1)# ppp binding ppp-profile
Router(config-GigaEthernet0.1)# ip address 203.0.113.1/32
Router(config-GigaEthernet0.1)# no shutdown
Router(config-GigaEthernet0.1)# exit
Router(config)# interface Tunnel0.0
Router(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Router(config-Tunnel0.0)# ip unnumbered GigaEthernet2.0
Router(config-Tunnel0.0)# ip tcp adjust-mss auto
Router(config-Tunnel0.0)# ikev2 outgoing-interface GigaEthernet0.1
Router(config-Tunnel0.0)# ikev2 peer any authentication psk id keyid id-b
Router(config-Tunnel0.0)# no shutdown
Router(config-Tunnel0.0)# exit
Router(config)#
5.6.1.2. 本装置(B)の設定
Router# configure
Router(config)# ip route 192.168.0.0/24 Tunnel0.0
Router(config)# ikev2 authentication psk id keyid id-a key char key-a
Router(config)# ikev2 authentication psk id keyid id-b key char key-b
Router(config)# ikev2 default-profile
Router(config-ikev2-dprof)# local-authentication psk id keyid id-b
Router(config-ikev2-dprof)# nat-traversal keepalive 20
Router(config-ikev2-dprof)# exit
Router(config)# device Module1
Router(config-Module1)# no shutdown
Router(config-Module1)# exit
Router(config)# interface GigaEthernet1.0
Router(config-GigaEthernet1.0)# ip address 192.168.1.254/24
Router(config-GigaEthernet1.0)# no shutdown
Router(config-GigaEthernet1.0)# exit
Router(config)# interface MobileEthernet1.0
Router(config-MobileEthernet1.0)# auto-connect
Router(config-MobileEthernet1.0)# ip address dhcp
Router(config-MobileEthernet1.0)# mobile id ip example.com
Router(config-MobileEthernet1.0)# mobile username test-user
Router(config-MobileEthernet1.0)# mobile password plain test-password
Router(config-MobileEthernet1.0)# no shutdown
Router(config-MobileEthernet1.0)# exit
Router(config)# interface Tunnel0.0
Router(config-Tunnel0.0)# tunnel mode ipsec-ikev2
Router(config-Tunnel0.0)# ip unnumbered GigaEthernet1.0
Router(config-Tunnel0.0)# ip tcp adjust-mss auto
Router(config-Tunnel0.0)# ikev2 connect-type auto
Router(config-Tunnel0.0)# ikev2 outgoing-interface MobileEthernet1.0
Router(config-Tunnel0.0)# ikev2 peer 203.0.113.1 authentication psk id keyid id-a
Router(config-Tunnel0.0)# no shutdown
Router(config-Tunnel0.0)# exit
Router(config)#
5.6.2. 解説
5.6.2.1. 本装置(A)の解説
ip route 192.168.1.0/24 Tunnel0.0
IPsec接続先をトンネルインタフェースに設定します。
ikev2 default-profile
nat-traversal keepalive 20
ikev2 authentication psk id keyid id-a key char key-a
ikev2 authentication psk id keyid id-b key char key-b
ikev2 default-profile
local-authentication psk id keyid id-a
interface Tunnel0.0
tunnel mode ipsec-ikev2
トンネルモードをIPsec IKEv2に設定します。
interface Tunnel0.0
ikev2 outgoing-interface GigaEthernet0.1
interface Tunnel0.0
ikev2 peer any authentication psk id keyid id-b
interface Tunnel0.0
ip unnumbered GigaEthernet2.0
GE2.0 のIPアドレスと共有することができます。interface Tunnel0.0
ip tcp adjust-mss auto
トンネルインタフェースを通るTCPパケットのMSS値をトンネルインタフェースのMTU長以下に自動調整します。
5.6.2.2. 本装置(B)の解説
device Module1
no shutdown
内蔵モジュールを有効化します。
interface MobileEthernet1.0
auto-connect
interface MobileEthernet1.0
ip address dhcp
mobile id ip example.com
mobile username test-user
mobile password plain test-password
interface Tunnel0.0
ikev2 connect-type auto