思科Ipsec配置
R1和R3通过ISP构建×××隧道,R1和R3的LAN之间的流量使用预共享**方式进行×××加密。
第一步:确保R1与R3的网络联通(互相可以Ping通对方的广域网接口)
R1:ip route 0.0.0.0 0.0.0.0 12.1.1.2
R3:ip route 0.0.0.0 0.0.0.0 32.1.1.2
第二步:×××阶段一策略配置
R1:crypto isakmp policy 10
Encryptionaes 256
Authenticationpre-share
Crypto isakmp key 0 cisco address 32.1.1.2255.255.255.255
R3: crypto isakmp policy 10
Encryptionaes 256
Authenticationpre-share
Crypto isakmp key 0 cisco address 12.1.1.2255.255.255.255
第三步:×××阶段二策略配置
R1:Crypto ipsec transform-set testlan2lan***ah-sha-hmac esp-aes 256
Mode tunnel
Exit
R3:Crypto ipsec transform-set testlan2lan*** ah-sha-hmacesp-aes 256
Mode tunnel
Exit
第四步:加密图配置
R1:Crypto map test 10 ipsec-isakmp
Set peer 32.1.1.1
Set transform-set testlan2lan***
Match address 101
R3:Crypto map test 10 ipsec-isakmp
Set peer 12.1.1.1
Set transform-set testlan2lan***
Match address 101
第五步:定义感兴趣的流量
R1:access-list 101 permit ip 1.1.1.00.0.0.255 3.1.1.0 0.0.0.255
R3:access-list 101 permit ip 3.1.1.00.0.0.255 1.1.1.0 0.0.0.255
第六步:在接口下绑定加密图
R1:Int s0/2
Crypto map test
R2:Int s0/3
Crypto map test
第七步:验证连接(从R1的LAN发起Ping到R3的LAN)
常用调试命令:
show cry ip sa
show cry isa sa
deb cry isa
deb cry ip
clear cry isa
clear cry sa
转载于:https://blog.51cto.com/baigp/1259356