配置 Cisco *** ,( *** access server <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

环境:cisco1814一台作***使得外网一台adsl上网的pc机能够通过cisco client拨上来,连接到cisco1814的内网一端。
拓扑图:

<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />
步骤:

1. 配置isakmp policy
crypto isakmp policy 1  ###创建isakmp策略 优先级为1
encr 3des               ###指定isakmp策略使用des进行加密
authen pre-share        ###指定ISAKMP策略使用预共享密钥的方式
group 2                 ###除非购买高端路由器,或是×××通信比较少,否则最好使用group 1长度的密钥,group命令有两个参数值:12。参数值1表示密钥使用768位密钥,参数值2表示密钥使用1024位密钥,显然后一种密钥安全性高,但消耗更多的CPU时间。
2. 配置*** client地址池
cry isa client conf address-pool local pool192
ip local pool pool192 192.168.1.1 192.168.1.254
3.配置*** client有关参数
cry isa client conf group vclient-group
####vclient-group就是在*** client的连接配置中需要输入的group authentication name
key vclient-key
####vclient-key就是在*** client的连接配置中需要输入的group authentication password
pool pool192 ####clientip地址从这里选取
####以上两个参数必须配置,其他参数还包括domaindnswins等,根据情况进行配置。
4.配置ipsec transform-set
cry ipsec trans vclient-tfs esp-3des esp-sha-hmac
5. 配置map模板
cry dynamic-map template-map 1
set transform-set vclient-tfs ####和第四步对应
6. 配置***map
cry map ***map 1 ipsec-isakmp dynamic template-map
#### 使用第5部的map模板
cry map ***map isakmp author list vclient-group ####使用第三步配置的参数authorization
cry map ***map client conf address respond ####响应client分配地址的请求
7.配置静态路由
ip route 192.168.1.0 255.255.255.0 外网口

8. ***map应用于端口
crypto map ***map

9.pc机端安装cisco client 设置对段地址,用户,密码,连接上去就好了
配置信息:

show run

Building configuration...

 

Current configuration : 1455 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname ljw

!

boot-start-marker

boot-end-marker

!

enable password kingstar

!

no aaa new-model

!

resource policy

!

mmi polling-interval 60

no mmi auto-configure

no mmi pvc

mmi snmp-timeout 180

 --More--         ip subnet-zero

ip cef

!

!

no ip dhcp use vrf connected

!

!

no ip ips deny-action ips-interface

no ip domain lookup

!

!

password encryption aes

!

!

!

!

!

crypto isakmp policy 1

 encr 3des

 authentication pre-share

 group 2

crypto isakmp client configuration address-pool local pool192

!

 --More--         crypto isakmp client configuration group ljw

 key ljw

 pool pool192

!

!

crypto ipsec transform-set ljw-tfs esp-3des esp-sha-hmac

!

crypto dynamic-map ljw-map 1

 set transform-set ljw-tfs

!

!

crypto map ***ljw isakmp authorization list ljw

crypto map ***ljw client configuration address respond

crypto map ***ljw 1 ipsec-isakmp dynamic ljw-map

!

!

!

interface FastEthernet0/0

 ip address 192.192.192.55 255.255.0.0

 duplex auto

 speed auto

!

interface FastEthernet0/1

 --More--         ip address 116.228.170.62 255.255.255.252

 duplex auto

 speed auto

 crypto map ***ljw

!

ip local pool pool192 192.168.1.1 192.168.1.254

ip classless

ip route 192.168.1.0 255.255.255.0 FastEthernet0/1

!

 

注:内网服务器的网关必须指向***路由器的其中一个地址,否则服务器没有回包过去。

 

6、常用调试

show cry isakmp sa

show cry ipsec sa

clear cry sa

clear cry isakmp

debug cry isakmp #####这是最常用的debug命令,***连接的基本错误都可以用它来找到

debug cry ipsec