概念:
IKE:因特網密鑰交換
實驗目標:pc1與pc2互通
步驟1:R1與R3配置默認路由
R1:
ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
R2:
ip route-static 0.0.0.0 0.0.0.0 23.1.1.2
步驟2:配ACL,定義需要IPSec保護的數據流
R1:
acl number 3000 ?
?rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.3.0 0.0.0.255?
R3:
acl number 3000 ?
?rule 5 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.1.0 0.0.0.255?
步驟3:配置IPSec安全提議,定義保護方法
R1/R3:
ipsec proposal p1 ? ?\\創建安全提議,名稱P1
?encapsulation-mode tunnel ? ?\\選擇隧道模式(封裝新Ip頭實現VPN功能)
?esp authentication-algorithm sha2-512 ? ?\\認證算法
?esp encryption-algorithm aes-256 ? ?\\加密算法
步驟4:配置IKE協商和對等體
R1:
ike proposal 1? ? \\創建IKE協商提議
?encryption-algorithm aes-cbc-256? ??\\加密算法
?dh group14? ? \\密鑰交換算法? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
?authentication-algorithm aes-xcbc-mac-96? ? \\認證算法
#
ike peer R3 v2? ? \\創建IKE對等體,名稱R3,版本V2
?pre-shared-key cipher huawei? ? \\配置預共享密鑰
?ike-proposal 1? ? \\調用IKE協商
?local-address 12.1.1.1? ? \\本端地址
?remote-address 23.1.1.3? ? \\對端地址
R3:
ike proposal 1
?encryption-algorithm aes-cbc-256
?dh group14 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
?authentication-algorithm aes-xcbc-mac-96
#
ike peer R1 v2
?pre-shared-key cipher huawei
?ike-proposal 1
?local-address 23.1.1.3
?remote-address 12.1.1.1
步驟5:配置安全策略,調用ACL和IPSec安全提議和IKE對等體
R1:
ipsec policy s1 10 isakmp? ? \\創建IPSec安全策略,名稱s1,序號10,自動協商
?security acl 3000? ? \\調用ACL? ??
?ike-peer R3? ? \\調用對等體,完成密鑰材料交換和對稱密鑰計算
?proposal p1? ? \\調用IKE安全提議
R3:
ipsec policy s1 10 isakmp
?security acl 3000
?ike-peer R1
?proposal p1
步驟6:接口調用安全策略
R1:
interface GigabitEthernet0/0/1
?ip address 12.1.1.1 255.255.255.0?
?ipsec policy s1
R3:
interface GigabitEthernet0/0/0
?ip address 23.1.1.3 255.255.255.0?
?ipsec policy s1
?
測試:
補充:
dis ike sa v2? \\查看isk sa
RD:代表成功建立
ST:主動發起一方