一、 host到router


1、实验网络拓扑:

pc(*** client 4.01)---switch---router1720 (*** access server)

pc配置:
ip:10.130.23.242/28
gw:10.130.23.246
1720接口ip:
f0:10.130.23.246/28
lo0:172.16.1.1/24
1720的ios为c1700-k93sy7-mz.122-8.T5.bin

2、步骤:


1、配置isakmp policy:
crypto isakmp policy 1
encr 3des
authen pre-share
group 2
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 ####client的ip地址从这里选取
####以上两个参数必须配置,其他参数还包括domain、dns、wins等,根据情况进行配置。
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
#### 使用第?*脚渲玫?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 fastethernet0

3、说明几点:
(1)因为1720只有一个fastethernet口,所以用router1720上的lo0地址来模拟router内部网络。
(2)*** client使用的ip pool地址不能与router内部网络ip地址重叠。
(3)10.130.23.0网段模拟公网地址,172.16.1.0网段用于1720内部地址,192.168.1.0网段用于***通道。
(4)没有找到设置*** client获取的子网掩码的办法。看来是ios还不支持这个功能。
(5)关于split tunnel。配置方法:首先,设置access 133 permit ip 172.16.1.0 0.0.0.255 any,允许1720本地网络数据通过tunnel,然后在第三步骤中添加一个参数:acl 133。

4、附1720的完整配置:

×××1720#sh run
Building configuration...

Current configuration : 1321 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname ×××1720
!
enable secret 5 $1$aNmA$b0AqzlCr3MfM5XU0IAmED.
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
ip subnet-zero
!
!
no ip domain-lookup
!
ip audit notify log
ip audit po max-events 100
!
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
crypto isakmp client configuration address-pool local pool192
!
crypto isakmp client configuration group vclient-group
key vclient-key
domain test.com
pool pool192
!
!
crypto ipsec transform-set vclient-tfs esp-3des esp-sha-hmac
!
crypto dynamic-map template-map 1
set transform-set vclient-tfs
!
!
crypto map ***map isakmp authorization list vclient-group
crypto map ***map client configuration address respond
crypto map ***map 1 ipsec-isakmp dynamic template-map
!
!
!
!
interface Loopback0
ip address 172.16.1.1 255.255.255.240
!
interface FastEthernet0
ip address 10.130.23.246 255.255.255.240
speed auto
crypto map ***map
!
interface Serial0
no ip address
shutdown
!
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
no ip http server
ip pim bidir-enable
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
no scheduler allocate
end

××× Client 4.01的配置:
新建一个connection entry,参数中name任意起一个,host填入*** access server的f0地址10.130.23.246,
group auahentication中name填vclient-group,password填vclient-key.

5、测试:
(1)在pc上运行××× client,连接*** access server。
(2)ipconfig/all,查看获取到的ip地址与其他参数。
(3)在router,show cry isa sa,看连接是否成功。
(4)从router,ping client已经获取到的ip地址,通过。
(5)从client,ping router的lo0配置的地址172.16.1.1,通过。
(6)查看*** client软件的status--statistics,可以看到加密与解密的数据量。
(7)1720上show cry ip sa, 也可以查看加密与解密的数据量。


6、常用调试?
show cry isakmp sa
show cry ipsec sa
clear cry sa
clear cry isakmp
debug cry isakmp #####这是最常用的debug命令,***连接的基本错误都可以用它来找到
debug cry ipsec

二、easy *** client的配置(network-extension mode)

实验网络拓扑:

router3662(*** client)---switch---router1720 (*** access server)
pc (*** client 4.01)------|

3662接口ip:
f0/0:10.130.23.244/28
f0/1:172.16.2.1/24
1720接口ip:
f0:10.130.23.246/28
lo0:172.16.1.1/24
pc配置:
ip:10.130.23.242/28
gw:10.130.23.246
1720的ios为c1700-k93sy7-mz.122-8.T5.bin
3662的ios为c3660-jk9o3s-mz.123-1a.bin

步骤:
1、配置1720路由器,参照实验一,设置为*** server。
2、配置3662路由器,设置*** client参数
cry ip client ez*** vclient ####定义