拓扑:
PC(10.0.0.1、网关10.0.0.254)-----------------(e0/0:10.0.0.254)ROUTER3620(lo0:172.16.0.1)
IOS版本c3620-ik9o3s7-mz.123-21.bin
主要配置步骤:
1.培植IKE策略
2.配置IKE阶段的客户段配置参数(组配置模式)
         2.1地址池
         2.2KEY值(可户端用来确定自己组身份.)
         2.3其他可选配置
3.配置IPSEC转换集合,供动态影射模板调用
4.配置动态影射模板,调用3步骤的转换集
5.配置实际加密影射
       5.1配置加密隐射中的IKE组策略查询名(调用上面IKE客户组名)
       5.2配置加密影射中的客户段地址响应
       5.3在加密影射中调用动态模板
6.配置本地地址池
7.配置相关的路由
8.关联加密影射到接口
 
vpnserver#sh run
Building configuration...
Current configuration : 1663 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname vpnserver
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
!
ip audit po max-events 100
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!配置第一阶段协商策略,IKE策略
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
!
!配置IKE客户端配置组参数,其中clientgroup是自己任意命名
crypto isakmp client configuration group clientgroup
 key cisco123 #客户端软件所用的密码
 dns 61.148.1.8 #客户段用的DNS,可选
 wins 61.148.1.7 #客户段WINS,可选
 pool ippool #注意这里还必须调用一下地址池
!
!
!配置IPSEC转换集,供下面的动态影射模板调用
crypto ipsec transform-set ipsectrans esp-3des esp-md5-hmac
!
!配置动态影射摸班,并调用IPSEC转换集
crypto dynamic-map dynamicmap 1
 set transform-set ipsectrans
!
!
!配置真实的加密影射,并关联IKE的授权列表,响应客户段地址请求
crypto map actmap isakmp authorization list clientgroup
crypto map actmap client configuration address respond
!调用动态影射模板
crypto map actmap 1 ipsec-isakmp dynamic dynamicmap
!
!
!
interface Loopback0
 ip address 172.16.0.1 255.255.0.0
!
interface Ethernet0/0
 ip address 10.0.0.254 255.0.0.0
 full-duplex
!关联到接口
 crypto map actmap
!        
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
!配置本地地址池
ip local pool ippool 192.168.10.1 192.168.10.254
no ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 Ethernet0/0
!
!
!
!
!
!        
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
 
说明:用×××-CLIENT软件4。01连接成功。但需要注意:由于路由器是用的dynamips模拟器,和本电脑网卡桥接,用本电脑上的client软件可以连上,但是数据是只发不收,改用非本电脑连接则一切正常。还需要注意就是PC上一定要设置路由器的IP为网关,否则连接不上(client软件会提示加载网关失败)
(测试split tunnel没成功,不知道是ACL问题还是模拟器问题。)

若要用身份验证,则加入下列命令:
aaa new-model 
aaa authentication login userauth local
aaa authorization network groupauth local
username cisco password 0 cisco
crypto map actmap client authentication list userauth
crypto map actmap isakmp authorization list groupauth
 
 
 
 
 
 
 
 
 
 
 
 
 
PC(10.0.0.1、网关10.0.0.254)-----------------(e0/0:10.0.0.254)ROUTER3620(lo0:172.16.0.1)
IOS版本c3620-ik9o3s7-mz.123-21.bin
Building configuration...
Current configuration : 1853 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname vpnserver
!
boot-start-marker
boot-end-marker
!
!
aaa new-model
!
!
aaa authentication login xauthen local
!利用AAA配置扩展验证,由于没有AAA服务器,只调用了本地
aaa authorization network groupauthor local
!使用AAA服务器查找组策略,这里使用本地,这个本地组策略也可以不配,在后面的加密影射中,调用本地组策略名即可
aaa session-id common
ip subnet-zero
!
!
ip cef   
!
ip audit po max-events 100
!
!
!
!
!
!
!
!
!
!
!
!
username lin password 0 cisco
!
!
!
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2 
!
!指定组策略属性,并进入组策略配置模式,这些配置会被push给客户端
crypto isakmp client configuration group clientgroup
 key cisco123
!如果客户段是靠preshared key来确定自己身份的话,那么这个KEY配置就是必须的,它可以和扩展验证里的不同
 dns 61.148.1.8
 wins 61.148.1.7
 pool ippool
!调用本地地址池,不同的组策略可以调用不同的本地地址池,它要和全局下配置的地址池名一致.
!
!
!培植IPSEC转换集
crypto ipsec transform-set ipsectrans esp-3des esp-md5-hmac
!
!配置动态影射摸班,调用转换集,因为不知道peer的IP地址,也不知道要match那些感兴趣流,所以用动态加密影射.
crypto dynamic-map dynamicmap 1
 set transform-set ipsectrans
!
!
!下面开始将组策略模式配置和扩展验证应用到具体的加密影射上.
!
crypto map actmap client authentication list xauthen
!如果这里不用扩展验证,则可省略上面语句.
!下面这个语句是启用IKE的组策略查询,它将依赖于list后面的名称来查询AAA或者本地的组策略!
crypto map actmap isakmp authorization list groupauthor
!采用扩展组策略,如果不用扩展组策略则用下面这个语句使用本地手工配置的客户组,授权语句不可以省略,否则IKE协商过不去.!crypto map actmap isakmp authorization list clientgroup
crypto map actmap client configuration address respond
!上面的语句,是让×××服务段响应客户段发起的地址请求,当然也可以使用initiate参数来主动发起请求(适合1.x版本客户段软件),两个参数可同时用.
crypto map actmap 1 ipsec-isakmp dynamic dynamicmap
!使用IKE来负责ipsec的协商,关联动态影射摸班.
!
!
!
interface Loopback0
 ip address 172.16.0.1 255.255.0.0
!
interface Ethernet0/0
 ip address 10.0.0.254 255.0.0.0
 full-duplex
 crypto map actmap
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
ip local pool ippool 192.168.10.1 192.168.10.254
!本地地址池,可以配置多条不同的地址池语句.
no ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 Ethernet0/0
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
软件配置:
建立新连接,注意的就是在新建的时候密码要填与客户组对应的密码,这里是cisco123.
然后连接,在连接过程中会额外再弹出一个要求输入用户名和密码的提示框,这时候输入AAA对应的,这里是lin,cisco.