实验名称: 第三章 IP Sec VPN(一) VPN基本配置 | |
实验要求的环境: | 实验环境: |
要求描述: | |
需要的软件工具、软件安装包:小凡 | |
实验目的: 1)掌握IKE阶段1和阶段2的协商过程 2)在cisco路由器上配置IPSec VPN | |
实验步骤: 实验拓扑图: 1)R1配置 en conf t hos r1 int fa0/0 ip ad 100.0.0.1 255.255.255.252 no sh int fa1/0 ip ad 10.0.0.1 255.255.255.0 no sh exit ip route 0.0.0.0 0.0.0.0 100.0.0.2 //阶段1配置 //交换ISAKMP/IKE传输集 crypto isakmp policy 1 //建立ISAKMP/IKE的管理连接策略 encryption 3des //指定管理连接的最后两个报文(用于身份验证)采用3des加密算法 hash md5 //指定验证过程采用HMAC(散列消息验证码)功能 group 2 //指定DH密钥组,生成对称的密钥DH算法 authentication pre-share //指定设备验证的类型为:预共享密钥 lifetime secondes 800 //配置管理连接的生存周期 exit //通过DH算法实现密钥交换 crypto isakmp key 6 benet address 200.0.0.1 //阶段2配置 //配置 crypto ACL(定义触发VPN流量的ACL) access-list 100 permit ip 10.0.0.0 0.0.0.255 11.0.0.0 0.0.0.255 //定义阶段2的传输集 crypto ipsec transform-set r1r2 ah-sha-hmac esp-aes exit //配置crypto map crypto map r1r2map 1 ipsec-isakmp match addess 100 set peer 200.0.0.1 set transform-set r1r2 int fa0/0 //将crypto mpa 应用到接口 crypto map r1r2map 2)R2配置 en conf t hos r2 int fa0/0 ip ad 100.0.0.2 255.255.255.252 no sh int fa1/0 ip ad 200.0.0.2 255.255.255.252 no sh exit 3)R3配置 en conf t hos r3 int fa0/0 ip ad 11.0.0.1 255.255.255.0 no sh int fa1/0 ip ad 200.0.0.1 255.255.255.252 no sh exit ip route 0.0.0.0 0.0.0.0 200.0.0.2 //阶段1配置 //交换ISAKMP/IKE传输集 crypto isakmp policy 1 encryption 3des hash md5 //设备身份验证 authentication pre-share group 2 exit //通过DH算法实现密钥交换 crypto isakmp key 6 benet address 100.0.0.1 //阶段2配置 //配置 crypto ACL(定义触发VPN流量的ACL) access-list 100 permit ip 11.0.0.0 0.0.0.255 10.0.0.0 0.0.0.255 //定义阶段2的传输集 crypto ipsec transfrom-set r2r1 ah-sha-hmac esp-aes exit //配置crypto map crypto map r2r1map 1 ipsec-isakmp set peer 100.0.0.1 set transform-set r2r1 match address 100 int fa1/0 //将crypto mpa 应用到接口 crypto map r2r1map end 1)验证 1.在R1上采用扩展ping 11.0.0.1 source 10.0.0.1 来触发VPN流量,使用show crypto isakmp policy 查看策略是否匹配! 2.使用show crypto is key 查看密钥是否一至 3.使用show crypto isakmp sa 查看是否建立管理连接,如图所示:已建立管理连接, 4.使用show crypto ipsec sa 查看第二阶段的数据连接是否已建立,如图所示:已建立数据连接,且数据已被加密。 | |
出现的问题及解决方法: | 问题1: |
解决: | |
验证总结: |