センター側(F2000×2台,各1回線)、拠点側(F140×1台,2回線)の例です。
センター側の回線は、メイン・バックアップ共にブロードバンド回線を使用し、拠点側はメインをブロードバンド回線、バックアップにワイヤレス回線を使用しています。
拠点間の通信はセンターを経由して行い、拠点のインターネットアクセスはセンターのファイアウォール(FW)を経由して行います。
拠点側では、イベントアクション機能を使用して、対向の装置(メイン側装置のLOOPBACKインタフェース)をICMP監視をしています。ICMP監視に失敗すると、バックアップ経路を追加してバックアップ回線に切り替えます。メイン側が復旧してICMP監視に成功すると、追加したバックアップ経路を削除してメイン経路に切り戻されます。
センター側では、VRRPを使用して2台のF2000のLAN側をグループ化することで、LAN側からは1台の装置のように見えます。拠点との通信経路はSA-UPルート機能により登録され、登録された経路は、RIPによりメイン側の装置とバックアップ側の装置の間で交換します。この動作により、メインとバックアップの経路を切り替えます。
補足・注意点
ここでは、イー・モバイルのデータ通信カードを使用しておりますが、他のキャリアのものを使用することも可能です。
F140がサポートしているデータ通信カードについては、こちらをご参照ください。
※ | データ通信カードの契約内容によっては、通信料のほかにプロバイダ接続料など別途料金が発生する場合があります |
項目 | 設定値 | |||
---|---|---|---|---|
センター | F2000(Main) LAN インタフェース IP アドレス | 192.168.1.251/24 | ||
F2000(Backup) LAN インタフェース IP アドレス | 192.168.1.252/24 | |||
VRRP 代表 IP アドレス | 192.168.1.254 | |||
F2000(Main) EWAN2 インタフェース IP アドレス | 192.168.150.251/24 | |||
F2000(Backup) EWAN2 インタフェース IP アドレス | 192.168.150.252/24 | |||
F2000(Main) LOOPBACK インタフェース IP アドレス | 192.168.127.251/32 | |||
F2000(Backup) LOOPBACK インタフェース IP アドレス | 192.168.127.252/32 | |||
F2000(Main) PPPoE1 インタフェース IP アドレス | 200.200.200.200 | |||
F2000(Backup) PPPoE1 インタフェース IP アドレス | 100.100.100.100 | |||
拠点1 | F140 LAN インタフェース IP アドレス | 192.168.2.254/24 | ||
F140 PPPoE1 インタフェース IP アドレス | 不定 | |||
F140 Dialer1 インタフェース IP アドレス | 不定 | |||
拠点2 | F140 LAN インタフェース IP アドレス | 192.168.3.254/24 | ||
F140 PPPoE1 インタフェース IP アドレス | 不定 | |||
F140 Dialer1 インタフェース IP アドレス | 不定 |
! ! ! 特権ユーザモードに移行します。 ! Router> enable Enter password: super ←パスワードを入力します(実際は何も表示されません)。 Router# ! ! ! 基本設定モードに移行します。 ! Router# configure terminal Router(config)# ! ! ! ホスト名を " Kyoten_1 " とします。 ! Router(config)# hostname Kyoten_1 Kyoten_1(config)# ! ! ! LAN インタフェースの IP アドレスを設定します。 ! Kyoten_1(config)# interface lan 1 Kyoten_1(config-if lan 1)# ip address 192.168.2.254 255.255.255.0 Kyoten_1(config-if lan 1)# exit ! ! ! PPPoE1 インタフェースの各種設定を行います。 ! Kyoten_1(config)# interface pppoe 1 Kyoten_1(config-if pppoe 1)# pppoe server C-Provider Kyoten_1(config-if pppoe 1)# pppoe account user3@xxxx.ne.jp secret3 Kyoten_1(config-if pppoe 1)# pppoe type host Kyoten_1(config-if pppoe 1)# exit ! ! ! Dialer1 インタフェースの各種設定を行います。 ! Kyoten_1(config)# interface dialer 1 Kyoten_1(config-if dialer 1)# max-call off Kyoten_1(config-if dialer 1)# caller *99***1# Kyoten_1(config-if dialer 1)# ppp account em em Kyoten_1(config-if dialer 1)# exit ! ! ! Mobile1 インタフェースの各種設定を行います。 ! Kyoten_1(config)# interface mobile 1 Kyoten_1(config-if mobile 1)# idle-timer send off Kyoten_1(config-if mobile 1)# idle-timer receive off Kyoten_1(config-if mobile 1)# forced disconnect packet off Kyoten_1(config-if mobile 1)# forced disconnect cumulative-time off Kyoten_1(config-if mobile 1)# auto connect on continuous *1 Kyoten_1(config-if mobile 1)# exit ! ! ! デフォルトルートをスタティックで設定します。 ! Kyoten_1(config)# ip route 0.0.0.0 0.0.0.0 connected ipsecif 1 150 ! イベントアクション機能により、追加されるデフォルトルート(distance値:1)を優先したいので、 ! Main側のデフォルトルートの優先度(distance値:150)を下げておきます。 ! ! ! VPN ピア宛の経路(ホストルート)をスタティックで設定します。 ! Kyoten_1(config)# ip route 100.100.100.100 255.255.255.255 dialer 1 Kyoten_1(config)# ip route 200.200.200.200 255.255.255.255 pppoe 1 ! ! ! F2000のLOOPBACKインタフェース宛経路(ホストルート)をスタティックで設定します。 ! Kyoten_1(config)# ip route 192.168.127.251 255.255.255.255 connected ipsecif 1 ! IPsecのkeepalive-icmp、およびイベントアクション機能のICMP監視で使用します。(Main側用) Kyoten_1(config)# ip route 192.168.127.252 255.255.255.255 connected ipsecif 2 ! IPsecのkeepalive-icmpで使用します。(Backup側用) ! ! ! イベントアクション機能の各種設定を行います。 ! Kyoten_1(config)# icmp-class 1 Kyoten_1(config-icmp-class 1)# interval 30 restoration 30 ! true時30秒毎、false時30秒毎にping確認を行います。 Kyoten_1(config-icmp-class 1)# address 192.168.127.251 nexthop connected ipsecif 1 source-interface lan 1 ! pingの宛先、nexthop、送信元アドレスを指定します。 ! IPsec越し(Main側)に、F2000(MAIN)のLOOPBACKインタフェース宛にpingを送信します。 Kyoten_1(config-icmp-class 1)# exit ! Kyoten_1(config)# event-class 1 Kyoten_1(config-event-class 1)# check ip-icmp 1 invert Kyoten_1(config-event-class 1)# exit ! Kyoten_1(config)# event-action 1 Kyoten_1(config-event-action 1)# add ip route 0.0.0.0 0.0.0.0 connected ipsecif 2 ! 追加する経路(Backup側用のデフォルトルート)を登録します。 Kyoten_1(config-event-action 1)# exit ! Kyoten_1(config)# event-map Kyoten_1(config-event-map)# event-class 1 event-action 1 Kyoten_1(config-event-map)# exit ! ! ! VPN 機能を有効にします。 ! Kyoten_1(config)# vpn enable ! ! ! VPN 通信動作中の詳細なログを残す設定にします。 ! Kyoten_1(config)# vpnlog enable ! ! ! Main 用の Phase1 ポリシーの各種設定を行います。 ! Kyoten_1(config)# crypto isakmp policy 1 Kyoten_1(config-isakmp)# authentication prekey Kyoten_1(config-isakmp)# encryption aes 128 Kyoten_1(config-isakmp)# group 2 Kyoten_1(config-isakmp)# hash sha Kyoten_1(config-isakmp)# idtype-pre userfqdn Kyoten_1(config-isakmp)# keepalive icmp traffic-based Kyoten_1(config-isakmp)# keepalive-icmp peer-address 192.168.127.251 Kyoten_1(config-isakmp)# keepalive-icmp source-interface lan 1 Kyoten_1(config-isakmp)# key ascii Secret-VPN Kyoten_1(config-isakmp)# my-identity ID-Kyoten_1-Main Kyoten_1(config-isakmp)# lifetime 86400 Kyoten_1(config-isakmp)# negotiation-mode aggressive Kyoten_1(config-isakmp)# peer-identity address 200.200.200.200 Kyoten_1(config-isakmp)# release security-association Kyoten_1(config-isakmp)# exit ! ! ! Backup 用の Phase1 ポリシーの各種設定を行います。 ! Kyoten_1(config)# crypto isakmp policy 2 Kyoten_1(config-isakmp)# authentication prekey Kyoten_1(config-isakmp)# encryption aes 128 Kyoten_1(config-isakmp)# group 2 Kyoten_1(config-isakmp)# hash sha Kyoten_1(config-isakmp)# idtype-pre userfqdn Kyoten_1(config-isakmp)# keepalive icmp traffic-based Kyoten_1(config-isakmp)# keepalive-icmp peer-address 192.168.127.252 Kyoten_1(config-isakmp)# keepalive-icmp source-interface lan 1 Kyoten_1(config-isakmp)# key ascii Secret-VPN Kyoten_1(config-isakmp)# my-identity ID-Kyoten_1-Backup Kyoten_1(config-isakmp)# lifetime 86400 Kyoten_1(config-isakmp)# negotiation-mode aggressive Kyoten_1(config-isakmp)# peer-identity address 100.100.100.100 Kyoten_1(config-isakmp)# release security-association Kyoten_1(config-isakmp)# exit ! ! ! KeepAlive(ICMP) に関する設定を行います。 ! Kyoten_1(config)# crypto security-association Kyoten_1(config-crypto-sa)# alive count 1 1 fail 3 Kyoten_1(config-crypto-sa)# alive freq 60 degraded-freq 10 Kyoten_1(config-crypto-sa)# exit ! ! ! Phase2 ポリシーの設定を行います。 ! Kyoten_1(config)# ipsec transform-set P2-POLICY esp-aes-128 esp-sha-hmac ! ! ! Main 用の VPN セレクタの設定を行います。 ! Kyoten_1(config)# ipsec access-list 10 ipsec ip 192.168.2.0 0.0.0.255 any ! Kyoten_1(config)# crypto map Center-Main 1 Kyoten_1(config-crypto-map)# match address 10 Kyoten_1(config-crypto-map)# set peer address 200.200.200.200 Kyoten_1(config-crypto-map)# set security-association always-up Kyoten_1(config-crypto-map)# set transform-set P2-POLICY Kyoten_1(config-crypto-map)# set security-association lifetime seconds 28800 Kyoten_1(config-crypto-map)# exit ! ! ! IPsec インタフェース1 に Main 用の crypto map を関連付けます。 ! Kyoten_1(config)# interface ipsecif 1 Kyoten_1(config-if ipsecif 1)# crypto map Center-Main Kyoten_1(config-if ipsecif 1)# exit ! ! ! Backup 用の VPN セレクタの設定を行います。 ! Kyoten_1(config)# ipsec access-list 20 ipsec ip 192.168.2.0 0.0.0.255 any ! Kyoten_1(config)# crypto map Center_Backup 2 Kyoten_1(config-crypto-map)# match address 20 Kyoten_1(config-crypto-map)# set peer address 100.100.100.100 Kyoten_1(config-crypto-map)# set security-association always-up Kyoten_1(config-crypto-map)# set transform-set P2-POLICY Kyoten_1(config-crypto-map)# set security-association lifetime seconds 28800 Kyoten_1(config-crypto-map)# exit ! ! ! IPsec インタフェース2 に Backup 用の crypto map を関連付けます。 ! Kyoten_1(config)# interface ipsecif 2 Kyoten_1(config-if ipsecif 2)# crypto map Center_Backup Kyoten_1(config-if ipsecif 2)# exit ! ! ! 特権ユーザモードに戻ります。 ! Kyoten_1(config)# end Kyoten_1# ! ! ! 設定を保存します。 ! Kyoten_1# save SIDE-A.cfg % saving working-config % finished saving Kyoten_1# ! ! ! 設定を有効にするために再起動します。 ! Kyoten_1# reset Are you OK to cold start?(y/n) y
*1 : |
"continuous"オプションは、V01.02(00)以降のファームウェアで対応しております 【注意】 データ通信カードの契約内容によっては、通信料のほかにプロバイダ接続料など別途料金が発生する場合があります |
!
!
! 特権ユーザモードに移行します。
!
Router> enable
Enter password: super ←パスワードを入力します(実際は何も表示されません)。
Router#
!
!
! 基本設定モードに移行します。
!
Router# configure terminal
Router(config)#
!
!
! ホスト名を " Kyoten_2 " とします。
!
Router(config)# hostname Kyoten_2
Kyoten_2(config)#
!
!
! LAN インタフェースの IP アドレスを設定します。
!
Kyoten_2(config)# interface lan 1
Kyoten_2(config-if lan 1)# ip address 192.168.3.254 255.255.255.0
Kyoten_2(config-if lan 1)# exit
!
!
! PPPoE1 インタフェースの各種設定を行います。
!
Kyoten_2(config)# interface pppoe 1
Kyoten_2(config-if pppoe 1)# pppoe server D-Provider
Kyoten_2(config-if pppoe 1)# pppoe account user4@xxxx.ne.jp secret4
Kyoten_2(config-if pppoe 1)# pppoe type host
Kyoten_2(config-if pppoe 1)# exit
!
!
! Dialer1 インタフェースの各種設定を行います。
!
Kyoten_2(config)# interface dialer 1
Kyoten_2(config-if dialer 1)# max-call off
Kyoten_2(config-if dialer 1)# caller *99***1#
Kyoten_2(config-if dialer 1)# ppp account em em
Kyoten_2(config-if dialer 1)# exit
!
!
! Mobile1 インタフェースの各種設定を行います。
!
Kyoten_2(config)# interface mobile 1
Kyoten_2(config-if mobile 1)# idle-timer send off
Kyoten_2(config-if mobile 1)# idle-timer receive off
Kyoten_2(config-if mobile 1)# forced disconnect packet off
Kyoten_2(config-if mobile 1)# forced disconnect cumulative-time off
Kyoten_2(config-if mobile 1)# auto connect on continuous *1
Kyoten_2(config-if mobile 1)# exit
!
!
! デフォルトルートをスタティックで設定します。
!
Kyoten_2(config)# ip route 0.0.0.0 0.0.0.0 connected ipsecif 1 150
!
!
! VPN ピア宛の経路(ホストルート)をスタティックで設定します。
!
Kyoten_2(config)# ip route 100.100.100.100 255.255.255.255 dialer 1
Kyoten_2(config)# ip route 200.200.200.200 255.255.255.255 pppoe 1
!
!
! F2000のLOOPBACKインタフェース宛経路(ホストルート)をスタティックで設定します。
!
Kyoten_2(config)# ip route 192.168.127.251 255.255.255.255 connected ipsecif 1
Kyoten_2(config)# ip route 192.168.127.252 255.255.255.255 connected ipsecif 2
!
!
! イベントアクション機能の各種設定を行います。
!
Kyoten_2(config)# icmp-class 1
Kyoten_2(config-icmp-class 1)# interval 30 restoration 30
Kyoten_2(config-icmp-class 1)# address 192.168.127.251 nexthop connected ipsecif 1 source-interface lan 1
Kyoten_2(config-icmp-class 1)# exit
!
Kyoten_2(config)# event-class 1
Kyoten_2(config-event-class 1)# check ip-icmp 1 invert
Kyoten_2(config-event-class 1)# exit
!
Kyoten_2(config)# event-action 1
Kyoten_2(config-event-action 1)# add ip route 0.0.0.0 0.0.0.0 connected ipsecif 2
Kyoten_2(config-event-action 1)# exit
!
Kyoten_2(config)# event-map
Kyoten_2(config-event-map)# event-class 1 event-action 1
Kyoten_2(config-event-map)# exit
!
!
! VPN 機能を有効にします。
!
Kyoten_2(config)# vpn enable
!
!
! VPN 通信動作中の詳細なログを残す設定にします。
!
Kyoten_2(config)# vpnlog enable
!
!
! Main 用の Phase1 ポリシーの各種設定を行います。
!
Kyoten_2(config)# crypto isakmp policy 1
Kyoten_2(config-isakmp)# authentication prekey
Kyoten_2(config-isakmp)# encryption aes 128
Kyoten_2(config-isakmp)# group 2
Kyoten_2(config-isakmp)# hash sha
Kyoten_2(config-isakmp)# idtype-pre userfqdn
Kyoten_2(config-isakmp)# keepalive icmp traffic-based
Kyoten_2(config-isakmp)# keepalive-icmp peer-address 192.168.127.251
Kyoten_2(config-isakmp)# keepalive-icmp source-interface lan 1
Kyoten_2(config-isakmp)# key ascii Secret-VPN
Kyoten_2(config-isakmp)# my-identity ID-Kyoten_2-Main
Kyoten_2(config-isakmp)# lifetime 86400
Kyoten_2(config-isakmp)# negotiation-mode aggressive
Kyoten_2(config-isakmp)# peer-identity address 200.200.200.200
Kyoten_2(config-isakmp)# release security-association
Kyoten_2(config-isakmp)# exit
!
!
! Backup 用の Phase1 ポリシーの各種設定を行います。
!
Kyoten_2(config)# crypto isakmp policy 2
Kyoten_2(config-isakmp)# authentication prekey
Kyoten_2(config-isakmp)# encryption aes 128
Kyoten_2(config-isakmp)# group 2
Kyoten_2(config-isakmp)# hash sha
Kyoten_2(config-isakmp)# idtype-pre userfqdn
Kyoten_2(config-isakmp)# keepalive icmp traffic-based
Kyoten_2(config-isakmp)# keepalive-icmp peer-address 192.168.127.252
Kyoten_2(config-isakmp)# keepalive-icmp source-interface lan 1
Kyoten_2(config-isakmp)# key ascii Secret-VPN
Kyoten_2(config-isakmp)# my-identity ID-Kyoten_2-Backup
Kyoten_2(config-isakmp)# lifetime 86400
Kyoten_2(config-isakmp)# negotiation-mode aggressive
Kyoten_2(config-isakmp)# peer-identity address 100.100.100.100
Kyoten_2(config-isakmp)# release security-association
Kyoten_2(config-isakmp)# exit
!
!
! KeepAlive(ICMP) に関する設定を行います。
!
Kyoten_2(config)# crypto security-association
Kyoten_2(config-crypto-sa)# alive count 1 1 fail 3
Kyoten_2(config-crypto-sa)# alive freq 60 degraded-freq 10
Kyoten_2(config-crypto-sa)# exit
!
!
! Phase2 ポリシーの設定を行います。
!
Kyoten_2(config)# ipsec transform-set P2-POLICY esp-aes-128 esp-sha-hmac
!
!
! Main 用の VPN セレクタの設定を行います。
!
Kyoten_2(config)# ipsec access-list 10 ipsec ip 192.168.3.0 0.0.0.255 any
!
Kyoten_2(config)# crypto map Center-Main 1
Kyoten_2(config-crypto-map)# match address 10
Kyoten_2(config-crypto-map)# set peer address 200.200.200.200
Kyoten_2(config-crypto-map)# set security-association always-up
Kyoten_2(config-crypto-map)# set transform-set P2-POLICY
Kyoten_2(config-crypto-map)# set security-association lifetime seconds 28800
Kyoten_2(config-crypto-map)# exit
!
!
! IPsec インタフェース1 に Main 用の crypto map を関連付けます。
!
Kyoten_2(config)# interface ipsecif 1
Kyoten_2(config-if ipsecif 1)# crypto map Center-Main
Kyoten_2(config-if ipsecif 1)# exit
!
!
! Backup 用の VPN セレクタの設定を行います。
!
Kyoten_2(config)# ipsec access-list 20 ipsec ip 192.168.3.0 0.0.0.255 any
!
Kyoten_2(config)# crypto map Center_Backup 2
Kyoten_2(config-crypto-map)# match address 20
Kyoten_2(config-crypto-map)# set peer address 100.100.100.100
Kyoten_2(config-crypto-map)# set security-association always-up
Kyoten_2(config-crypto-map)# set transform-set P2-POLICY
Kyoten_2(config-crypto-map)# set security-association lifetime seconds 28800
Kyoten_2(config-crypto-map)# exit
!
!
! IPsec インタフェース2 に Backup 用の crypto map を関連付けます。
!
Kyoten_2(config)# interface ipsecif 2
Kyoten_2(config-if ipsecif 2)# crypto map Center_Backup
Kyoten_2(config-if ipsecif 2)# exit
!
!
! 特権ユーザモードに戻ります。
!
Kyoten_2(config)# end
Kyoten_2#
!
!
! 設定を保存します。
!
Kyoten_2# save SIDE-A.cfg
% saving working-config
% finished saving
Kyoten_2#
!
!
! 設定を有効にするために再起動します。
!
Kyoten_2# reset
Are you OK to cold start?(y/n) y
*1 : |
"continuous"オプションは、V01.02(00)以降のファームウェアで対応しております 【注意】 データ通信カードの契約内容によっては、通信料のほかにプロバイダ接続料など別途料金が発生する場合があります |
! ! ! 特権ユーザモードに移行します。 ! Router> enable Enter password: super ←パスワードを入力します(実際は何も表示されません)。 Router# ! ! ! 基本設定モードに移行します。 ! Router# configure terminal Router(config)# ! ! ! ホスト名を " Center_Main " とします。 ! Router(config)# hostname Center_Main Center_Main(config)# ! ! ! VRRP 機能を有効にします。 ! Center_Main(config)# ip vrrp enable ! ! ! LAN インタフェースの各種設定を行います。 ! Center_Main(config)# interface lan 1 Center_Main(config-if lan 1)# linkdown-detect on Center_Main(config-if lan 1)# ip address 192.168.1.251 255.255.255.0 Center_Main(config-if lan 1)# vrrp 1 address 192.168.1.254 Center_Main(config-if lan 1)# vrrp 1 priority 254 Center_Main(config-if lan 1)# vrrp 1 preempt Center_Main(config-if lan 1)# exit ! ! ! 使用しない物理 LAN ポートをシャットダウンします。 ! (今回は、物理 LAN ポート1番のみを使用します。) ! Center_Main(config)# line lan Center_Main(config-line lan)# shutdown 2 Center_Main(config-line lan)# shutdown 3 Center_Main(config-line lan)# shutdown 4 Center_Main(config-line lan)# shutdown 5 Center_Main(config-line lan)# shutdown 6 Center_Main(config-line lan)# shutdown 7 Center_Main(config-line lan)# shutdown 8 Center_Main(config-line lan)# shutdown 9 Center_Main(config-line lan)# shutdown 10 Center_Main(config-line lan)# exit ! ! ! EWAN2 インタフェースの各種設定を行います。 ! Center_Main(config)# interface ewan 2 Center_Main(config-if ewan 2)# ip rip receive version 2 Center_Main(config-if ewan 2)# ip rip send version 2 Center_Main(config-if ewan 2)# ip mtu 1500 Center_Main(config-if ewan 2)# ip address 192.168.150.251 255.255.255.0 Center_Main(config-if ewan 2)# exit ! ! ! 物理 EWAN ポートの各種設定を行います。 ! Center_Main(config)# line ewan Center_Main(config-line ewan)# speed-duplex 2 1000-full Center_Main(config-line ewan)# sw 2 mdi Center_Main(config-line ewan)# exit ! ! ! LOOPBACK インタフェースに IP アドレスを設定します。 ! Center_Main(config)# interface loopback 1 Center_Main(config-if loopback 1)# ip address 192.168.127.251 Center_Main(config-if loopback 1)# exit ! ! ! PPPoE1 インタフェースの各種設定を行います。 ! Center_Main(config)# interface pppoe 1 Center_Main(config-if pppoe 1)# pppoe server A-Provider Center_Main(config-if pppoe 1)# pppoe account user@xxxx.ne.jp secret Center_Main(config-if pppoe 1)# ip address 200.200.200.200 Center_Main(config-if pppoe 1)# pppoe type host Center_Main(config-if pppoe 1)# exit ! ! ! デフォルトルートをスタティックで設定します。 ! Center_Main(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.200 Center_Main(config)# ip route 0.0.0.0 0.0.0.0 192.168.150.252 200 ! ! ! 廃棄用の経路をスタティックで設定します。 ! Center_Main(config)# ip route 192.168.2.0 255.255.255.0 connected null 0 254 Center_Main(config)# ip route 192.168.3.0 255.255.255.0 connected null 0 254 ! ! ! RIPの各種設定を行います。 ! Center_Main(config)# router rip Center_Main(config-rip)# network ewan 2 Center_Main(config-rip)# redistribute local-prot1 Center_Main(config-rip)# timers basic 15 30 30 Center_Main(config-rip)# exit ! ! ! VPN 機能を物理 EWAN1 ポートのみで有効にします。 ! Center_Main(config)# vpn enable ewan 1 ! ! ! VPN 通信動作中の詳細なログを残す設定にします。 ! Center_Main(config)# vpnlog enable ! ! ! 拠点1 用の Phase1 ポリシーの各種設定を行います。 ! Center_Main(config)# crypto isakmp policy 1 Center_Main(config-isakmp)# authentication prekey Center_Main(config-isakmp)# encryption aes 128 Center_Main(config-isakmp)# group 2 Center_Main(config-isakmp)# hash sha Center_Main(config-isakmp)# idtype-pre userfqdn Center_Main(config-isakmp)# keepalive icmp traffic-based Center_Main(config-isakmp)# keepalive-icmp peer-address 192.168.2.254 Center_Main(config-isakmp)# keepalive-icmp source-interface loopback 1 Center_Main(config-isakmp)# key ascii Secret-VPN Center_Main(config-isakmp)# lifetime 86400 Center_Main(config-isakmp)# negotiation-mode aggressive Center_Main(config-isakmp)# peer-identity host ID-Kyoten_1-Main Center_Main(config-isakmp)# release security-association Center_Main(config-isakmp)# tunnel-route interface pppoe 1 Center_Main(config-isakmp)# exit ! ! ! 拠点2 用の Phase1 ポリシーの各種設定を行います。 ! Center_Main(config)# crypto isakmp policy 2 Center_Main(config-isakmp)# authentication prekey Center_Main(config-isakmp)# encryption aes 128 Center_Main(config-isakmp)# group 2 Center_Main(config-isakmp)# hash sha Center_Main(config-isakmp)# idtype-pre userfqdn Center_Main(config-isakmp)# keepalive icmp traffic-based Center_Main(config-isakmp)# keepalive-icmp peer-address 192.168.3.254 Center_Main(config-isakmp)# keepalive-icmp source-interface loopback 1 Center_Main(config-isakmp)# key ascii Secret-VPN Center_Main(config-isakmp)# lifetime 86400 Center_Main(config-isakmp)# negotiation-mode aggressive Center_Main(config-isakmp)# peer-identity host ID-Kyoten_2-Main Center_Main(config-isakmp)# release security-association Center_Main(config-isakmp)# tunnel-route interface pppoe 1 Center_Main(config-isakmp)# exit ! ! ! KeepAlive(ICMP) に関する設定を行います。 ! Center_Main(config)# crypto security-association Center_Main(config-crypto-sa)# alive count 1 1 fail 3 Center_Main(config-crypto-sa)# alive freq 60 degraded-freq 10 Center_Main(config-crypto-sa)# exit ! ! ! Phase2 ポリシーの設定を行います。 ! Center_Main(config)# ipsec transform-set P2-POLICY esp-aes-128 esp-sha-hmac ! ! ! 拠点1 用の VPN セレクタの設定を行います。 ! Center_Main(config)# ipsec access-list 10 ipsec ip any 192.168.2.0 0.0.0.255 ! Center_Main(config)# crypto map Kyoten_1-Main 1 Center_Main(config-crypto-map)# match address 10 Center_Main(config-crypto-map)# set peer host ID-Kyoten_1-Main Center_Main(config-crypto-map)# set transform-set P2-POLICY Center_Main(config-crypto-map)# set security-association lifetime seconds 28800 Center_Main(config-crypto-map)# sa-up route interface ipsecif 1 local-prot1 Center_Main(config-crypto-map)# exit ! ! ! IPsec インタフェース1 に拠点1 用の crypto map を関連付けます。 ! Center_Main(config)# interface ipsecif 1 Center_Main(config-if ipsecif 1)# crypto map Kyoten_1-Main Center_Main(config-if ipsecif 1)# exit ! ! ! 拠点2 用の VPN セレクタの設定を行います。 ! Center_Main(config)# ipsec access-list 20 ipsec ip any 192.168.3.0 0.0.0.255 ! Center_Main(config)# crypto map Kyoten_2-Main 2 Center_Main(config-crypto-map)# match address 20 Center_Main(config-crypto-map)# set peer host ID-Kyoten_2-Main Center_Main(config-crypto-map)# set transform-set P2-POLICY Center_Main(config-crypto-map)# set security-association lifetime seconds 28800 Center_Main(config-crypto-map)# sa-up route interface ipsecif 2 local-prot1 Center_Main(config-crypto-map)# exit ! ! ! IPsec インタフェース2 に拠点2 用の crypto map を関連付けます。 ! Center_Main(config)# interface ipsecif 2 Center_Main(config-if ipsecif 2)# crypto map Kyoten_2-Main Center_Main(config-if ipsecif 2)# exit ! ! ! 特権ユーザモードに戻ります。 ! Center_Main(config)# end Center_Main# ! ! ! 設定を保存します。 ! Center_Main# save SIDE-A.cfg % saving working-config % finished saving Center_Main# ! ! ! 設定を有効にするために再起動します。 ! Center_Main# reset Are you OK to cold start?(y/n) y
! ! ! 特権ユーザモードに移行します。 ! Router> enable Enter password: super ←パスワードを入力します(実際は何も表示されません)。 Router# ! ! ! 基本設定モードに移行します。 ! Router# configure terminal Router(config)# ! ! ! ホスト名を " Center_Backup " とします。 ! Router(config)# hostname Center_Backup Center_Backup(config)# ! ! ! VRRP 機能を有効にします。 ! Center_Backup(config)# ip vrrp enable ! ! ! LAN インタフェースの各種設定を行います。 ! Center_Backup(config)# interface lan 1 Center_Backup(config-if lan 1)# linkdown-detect on Center_Backup(config-if lan 1)# ip address 192.168.1.252 255.255.255.0 Center_Backup(config-if lan 1)# vrrp 1 address 192.168.1.254 Center_Backup(config-if lan 1)# vrrp 1 priority 200 Center_Backup(config-if lan 1)# vrrp 1 preempt Center_Backup(config-if lan 1)# exit ! ! ! 使用しない物理 LAN ポートをシャットダウンします。 ! (今回は、物理 LAN ポート1番のみを使用します。) ! Center_Backup(config)# line lan Center_Backup(config-line lan)# shutdown 2 Center_Backup(config-line lan)# shutdown 3 Center_Backup(config-line lan)# shutdown 4 Center_Backup(config-line lan)# shutdown 5 Center_Backup(config-line lan)# shutdown 6 Center_Backup(config-line lan)# shutdown 7 Center_Backup(config-line lan)# shutdown 8 Center_Backup(config-line lan)# shutdown 9 Center_Backup(config-line lan)# shutdown 10 Center_Backup(config-line lan)# exit ! ! ! EWAN2 インタフェースの各種設定を行います。 ! Center_Backup(config)# interface ewan 2 Center_Backup(config-if ewan 2)# ip rip receive version 2 Center_Backup(config-if ewan 2)# ip rip send version 2 Center_Backup(config-if ewan 2)# ip mtu 1500 Center_Backup(config-if ewan 2)# ip address 192.168.150.252 255.255.255.0 Center_Backup(config-if ewan 2)# exit ! ! ! 物理 EWAN ポートの各種設定を行います。 ! Center_Backup(config)# line ewan Center_Backup(config-line ewan)# speed-duplex 2 1000-full Center_Backup(config-line ewan)# sw 2 mdi-x Center_Backup(config-line ewan)# exit ! ! ! LOOPBACK インタフェースに IP アドレスを設定します。 ! Center_Backup(config)# interface loopback 1 Center_Backup(config-if loopback 1)# ip address 192.168.127.252 Center_Backup(config-if loopback 1)# exit ! ! ! PPPoE1 インタフェースの各種設定を行います。 ! Center_Backup(config)# interface pppoe 1 Center_Backup(config-if pppoe 1)# pppoe server B-Provider Center_Backup(config-if pppoe 1)# pppoe account user2@xxxx.ne.jp secret2 Center_Backup(config-if pppoe 1)# ip address 100.100.100.100 Center_Backup(config-if pppoe 1)# pppoe type host Center_Backup(config-if pppoe 1)# exit ! ! ! デフォルトルートをスタティックで設定します。 ! Center_Backup(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.200 Center_Backup(config)# ip route 0.0.0.0 0.0.0.0 192.168.150.251 200 ! ! ! 廃棄用の経路をスタティックで設定します。 ! Center_Backup(config)# ip route 192.168.2.0 255.255.255.0 connected null 0 254 Center_Backup(config)# ip route 192.168.3.0 255.255.255.0 connected null 0 254 ! ! ! RIPの各種設定を行います。 ! Center_Backup(config)# router rip Center_Backup(config-rip)# network ewan 2 Center_Backup(config-rip)# redistribute local-prot1 metric 5 Center_Backup(config-rip)# timers basic 15 30 30 Center_Backup(config-rip)# exit ! ! ! VPN 機能を物理 EWAN1 ポートのみで有効にします。 ! Center_Backup(config)# vpn enable ewan 1 ! ! ! VPN 通信動作中の詳細なログを残す設定にします。 ! Center_Backup(config)# vpnlog enable ! ! ! 拠点1 用の Phase1 ポリシーの各種設定を行います。 ! Center_Backup(config)# crypto isakmp policy 1 Center_Backup(config-isakmp)# authentication prekey Center_Backup(config-isakmp)# encryption aes 128 Center_Backup(config-isakmp)# group 2 Center_Backup(config-isakmp)# hash sha Center_Backup(config-isakmp)# idtype-pre userfqdn Center_Backup(config-isakmp)# keepalive icmp traffic-based Center_Backup(config-isakmp)# keepalive-icmp peer-address 192.168.2.254 Center_Backup(config-isakmp)# keepalive-icmp source-interface loopback 1 Center_Backup(config-isakmp)# key ascii Secret-VPN Center_Backup(config-isakmp)# lifetime 86400 Center_Backup(config-isakmp)# negotiation-mode aggressive Center_Backup(config-isakmp)# peer-identity host ID-Kyoten_1-Backup Center_Backup(config-isakmp)# release security-association Center_Backup(config-isakmp)# tunnel-route interface pppoe 1 Center_Backup(config-isakmp)# exit ! ! ! 拠点2 用の Phase1 ポリシーの各種設定を行います。 ! Center_Backup(config)# crypto isakmp policy 2 Center_Backup(config-isakmp)# authentication prekey Center_Backup(config-isakmp)# encryption aes 128 Center_Backup(config-isakmp)# group 2 Center_Backup(config-isakmp)# hash sha Center_Backup(config-isakmp)# idtype-pre userfqdn Center_Backup(config-isakmp)# keepalive icmp traffic-based Center_Backup(config-isakmp)# keepalive-icmp peer-address 192.168.3.254 Center_Backup(config-isakmp)# keepalive-icmp source-interface loopback 1 Center_Backup(config-isakmp)# key ascii Secret-VPN Center_Backup(config-isakmp)# lifetime 86400 Center_Backup(config-isakmp)# negotiation-mode aggressive Center_Backup(config-isakmp)# peer-identity host ID-Kyoten_2-Backup Center_Backup(config-isakmp)# release security-association Center_Backup(config-isakmp)# tunnel-route interface pppoe 1 Center_Backup(config-isakmp)# exit ! ! ! KeepAlive(ICMP) に関する設定を行います。 ! Center_Backup(config)# crypto security-association Center_Backup(config-crypto-sa)# alive count 1 1 fail 3 Center_Backup(config-crypto-sa)# alive freq 60 degraded-freq 10 Center_Backup(config-crypto-sa)# exit ! ! ! Phase2 ポリシーの設定を行います。 ! Center_Backup(config)# ipsec transform-set P2-POLICY esp-aes-128 esp-sha-hmac ! ! ! 拠点1 用の VPN セレクタの設定を行います。 ! Center_Backup(config)# ipsec access-list 10 ipsec ip any 192.168.2.0 0.0.0.255 ! Center_Backup(config)# crypto map Kyoten_1-Backup 1 Center_Backup(config-crypto-map)# match address 10 Center_Backup(config-crypto-map)# set peer host ID-Kyoten_1-Backup Center_Backup(config-crypto-map)# set transform-set P2-POLICY Center_Backup(config-crypto-map)# set security-association lifetime seconds 28800 Center_Backup(config-crypto-map)# sa-up route interface ipsecif 1 local-prot1 200 Center_Backup(config-crypto-map)# exit ! ! ! IPsec インタフェース1 に拠点1 用の crypto map を関連付けます。 ! Center_Backup(config)# interface ipsecif 1 Center_Backup(config-if ipsecif 1)# crypto map Kyoten_1-Backup Center_Backup(config-if ipsecif 1)# exit ! ! ! 拠点2 用の VPN セレクタの設定を行います。 ! Center_Backup(config)# ipsec access-list 20 ipsec ip any 192.168.3.0 0.0.0.255 ! Center_Backup(config)# crypto map Kyoten_2-Backup 2 Center_Backup(config-crypto-map)# match address 20 Center_Backup(config-crypto-map)# set peer host ID-Kyoten_2-Backup Center_Backup(config-crypto-map)# set transform-set P2-POLICY Center_Backup(config-crypto-map)# set security-association lifetime seconds 28800 Center_Backup(config-crypto-map)# sa-up route interface ipsecif 2 local-prot1 200 Center_Backup(config-crypto-map)# exit ! ! ! IPsec インタフェース2 に拠点2 用の crypto map を関連付けます。 ! Center_Backup(config)# interface ipsecif 2 Center_Backup(config-if ipsecif 2)# crypto map Kyoten_2-Backup Center_Backup(config-if ipsecif 2)# exit ! ! ! 特権ユーザモードに戻ります。 ! Center_Backup(config)# end Center_Backup# ! ! ! 設定を保存します。 ! Center_Backup# save SIDE-A.cfg % saving working-config % finished saving Center_Backup# ! ! ! 設定を有効にするために再起動します。 ! Center_Backup# reset Are you OK to cold start?(y/n) y