Hotline: 094.320.0088

Hướng Dẫn Cấu Hình Cisco FlexVPN Site To Site

Sơ đồ bài thực hành

FlexVPN Site To Site

– Thiết lập IP và định tuyến tại Router 1

R1>enable
R1#conf t
R1(config)# hostname R1
R1(config)# interface ethernet 0/0
R1(config-if)# ip add 192.1.12.1 255.255.255.252
R1(config-if)# no sh
R1(config-if)# exit
R1(config-if)# int ethernet 0/1
R1(config-if)# ip add 172.16.1.254 255.255.255.0
R1(config-if)# no sh
R1(config-if)# exit
R1(config)# ip route 0.0.0.0 0.0.0.0 192.1.12.2

R1(config)# ip domain-name vmware.lab
R1(config)# ip host R2.vmware.lab 192.1.23.1

– Thiết lập IKEv2 Proposal

R1(config)#crypto ikev2 proposal IKEPROPOSAL
R1(config-ikev2-proposal)#encryption aes-cbc-256
R1(config-ikev2-proposal)#integrity sha512
R1(config-ikev2-proposal)#group 14

– Thiết lập IKEv2 Polilcy

R1(config)#crypto ikev2 policy IKEPOLICY
R1(config-ikev2-policy)#match address local 192.1.12.1
R1(config-ikev2-policy)#proposal IKEPROPOSAL

– Thiết lập IKEv2 Key để xác thực các site

R1(config)#crypto ikev2 keyring KEYRING
R1(config-ikev2-keyring)#peer R2
R1(config-ikev2-keyring-peer)#address 100.10.0.1
R1(config-ikev2-keyring-peer)#identity fqdn R2.vmware.lab
R1(config-ikev2-keyring-peer)#pre-shared-key local R1keyvpn
R1(config-ikev2-keyring-peer)#pre-shared-key remote R2keyvpn
R1(config-ikev2-keyring-peer)#exit
R1(config-ikev2-keyring)#exit

– Thiết lập IKEv2 Profile

R1(config)#crypto ikev2 profile IKEPROFILE
R1(config-ikev2-profile)# match identity remote fqdn R2.vmware.lab
R1(config-ikev2-profile)# identity local email R1@vmware.lab
R1(config-ikev2-profile)# authentication remote pre-share
R1(config-ikev2-profile)#authentication local pre-share
R1(config-ikev2-profile)#keyring local KEYRING
R1(config-ikev2-profile)#exit

– Thiết lập Transform-set

R1(config)#crypto ipsec transform-set TSET esp-aes 256 esp-sha512-hmac
R1(cfg-crypto-trans)#mode tunnel
R1(cfg-crypto-trans)#exit

– Thiết lập IPSEC profile

R1(config)#crypto ipsec profile IPSECPROFILE
R1(ipsec-profile)#set transform-set TSET
R1(ipsec-profile)#set ikev2-profile IKEPROFILE

– Tạo interface tunnel và truyền ipsec profile vào
R1(config)#int tunnel 0
R1(config-if)#tunnel source eth 0/0
R1(config-if)#ip unnumbered loopback0
R1(config-if)#tunnel mode ipsec ipv4
R1(config-if)#tunnel destination 192.1.23.1
R1(config-if)#tunnel path-mtu-discovery
R1(config-if)#tunnel protection ipsec profile IPSECPROFILE
R1(config-if)#exit