实验拓扑:
easy vpn_休闲
IP地址规划如下:
总部服务器:192.168.1.1、24
总部路由器:fa 0/0 192.168.1.254/24
fa 0/1 100.1.1.2/24

Internet网路由器:fa 0/1 100.1.1.2/24
fa 0/0 200.1.1.1/24

远端路由器:fa 0/0
200.1.1.2/24

fa 0/1 172.16.1.254/24

办公笔记本:172.16.1.1、24

实验的基本配置如下:
总部路由器:

interface FastEthernet0/0

ip address 192.168.1.254 255.255.255.0


no shutdown

interface FastEthernet0/1

ip address 100.1.1.2 255.255.255.0


no shutdown

ip route 0.0.0.0 0.0.0.0 100.1.1.1

Internet路由器:
interface FastEthernet0/0

ip address 200.1.1.1 255.255.255.0

no shutdown
interface FastEthernet0/1

ip address 100.1.1.1 255.255.255.0

no shutdown

远端路由器的配置:
interface FastEthernet0/0

ip address 200.1.1.2 255.255.255.0


ip nat outside


no shutdown

interface FastEthernet0/1

ip address 172.16.1.254 255.255.255.0


ip nat inside

shutdown
ip nat inside source list 1 interface FastEthernet0/0 overload
ip route 0.0.0.0 0.0.0.0 200.1.1.1
access-list 1 permit 172.16.1.0 0.0.0.255

此时,远端的笔记本能上网,但不能访问总部内的Web服务器。现在在总部做Easy ×××的配置。其配置如下:
aaa new-model(开启AAA认证)
aaa authentication login eza local (命名eza,对eza认证)
aaa authorization network ezo local(命名ezo,对ezo的事件授权)
username tang password 123(创建用户名密码)
crypto isakmp policy 10(Ipsec 阶段一的安全参数配置)

hash md5


authentication pre-share


group 2


ip local pool ez 192.168.2.1 192.168.2.10(Easy ××× 接入后所分配的地址)
crypto isakmp client configuration group myez(Easy ×××的组和密码配置)

key 123


pool ez

crypto ipsec transform-set tim esp-3des esp-md5-hmac(IPSec阶段二的配置)
crypto dynamic-map ezmap 10(动态加密图)

set transform-set tim


reverse-route
(反向路由注入)
(以下是对Easy ×××的认证,授权配置,list是调用上面的AAA的配置名)
crypto map tom client authentication list eza
crypto map tom isakmp authorization list ezo
crypto map tom client configuration address respond
crypto map tom 10 ipsec-isakmp dynamic ezmap(最后,动态加密图必须有静态绑定)

interface FastEthernet0/1
crypto map tom(绑定到接口)


Easy ×××的测试:
测试如下:
首先,双击笔记本,打开图,选择Desktop,再下面选择command Pormpt,ping一下总部的公网地址100.1.1.2,通了后再ping内部服务器192.168.1.1,此时是ping不通的,因为我们来没Easy ××× 接入。
其次,我们依然选择Desktop下的×××,依次输入如下信息:

GroupName
:myez

Group key
:123

Host IP(server IP)
:100.1.1.2

Username
:tang

Password
:123

点击connect,就会提示连接上去,此时会显示下发的IP地址。(若没马上连上去,在配置没错的前提下,Ipsec ×××协商时,前面几个包是不通的,解决方法,在ping一下100.1.1.2,再连接Easy ×××)。
最后,我们访问web服务器,选择Desktop下的Web Browser,输入IP:192.168.1.1即可访问到web服务器.