VPN配置手册---Vpn Access Server
VPN 配置之一:vpn access server
网络拓扑:
PC---------Router---------Router
<pc> <R2> <R1>
PC配置:
IP Address:10.1.1.1/24
Default Gateway:10.1.1.254
R1接口ip: (VPN Access Server)
FastEthernet 0/0:20.1.1.254/24
Serial 1/0:172.16.1.1/24
R2接口ip: (Private Network)
Serial 1/0::172.16.1.2/24
FastEthernet 0/0:10.1.1.254/24
2610的IOS为c2600-jk8o3s-mz.122-8.T5.bin
R1步骤:
1.配置isakmp policy:
crypto isakmp policy 1
hash md5
authentication pre-share
group 2
2.配置vpn client地址池
crypto isakmp client configuration address-pool local pool192
ip local pool pool192 192.168.1.1 192.168.1.254
3.配置vpn client有关参数
crypto isakmp client configuration group vclient-group
(vclient-group就是在vpn client的连接配置中需要输入的group authentication name。)
key vclient-key
(vclient-key就是在vpn client的连接配置中需要输入的group authentication password。)
pool pool192 (client的ip地址从这里选取 )
(以上两个参数必须配置,其他参数还包括domain、dns、wins等,根据情况进行配置。)
4.配置ipsec transform-set
crypto ipsec transform-set vclient-tfs esp-des esp-md5-hmac
5.配置map模板
cry dynamic-map template-map 1
set transform-set vclient-tfs (和第四步对应)
6.配置vpnmap
cry map vpnmap 1 ipsec-isakmp dynamic template-map
(使用第五步配置的map模板 )
crypto map vpnmap isakmp authorization list vclient-group
(使用第三步配置的参数authorization)
crypto map vpnmap client configuration address respond
(响应client分配地址的请求)
说明几点:
(1)vpn client使用的ip pool地址不能与Router内部网络ip地址重叠。
(2)172.16.1.0 网段模拟公网地址,10.1.1.0、20.1.1.0 网段用于内部地址,192.168.1.0 网段用于vpn通道。
R1的配置:
r1#
r1#sh run
Building configuration...
Current configuration : 1521 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname r1
!
Enable Password cisco
!
ip subnet-zero
!
ip audit notify log
ip audit po max-events 100
!
crypto isakmp policy 1
hash md5
authentication pre-share
group 2
crypto isakmp client configuration address-pool local pool192
!
crypto isakmp client configuration group vclient-group
key vclient-key-cisco
pool vclient-pool
!
crypto ipsec transform-set vclient-tfs esp-des esp-md5-hmac
!
crypto dynamic-map template-map 1
set transform-set vclient-tfs
!
crypto map vpnmap isakmp authorization list vclient-group
crypto map vpnmap client configuration address respond
crypto map vpnmap 1 ipsec-isakmp dynamic template-map
!
fax interface-type fax-mail
mta receive maximum-recipients 0
!
interface FastEthernet0/0
ip address 20.1.1.254 255.255.255.0
!
interface Serial1/0
ip address 172.16.1.1 255.255.255.0
crypto map vpnmap
no fair-queue
!
ip local pool vclient-pool 192.168.1.1 192.168.1.254
ip classless
ip route 0.0.0.0 0.0.0.0 Serial1/0
no ip http server
ip pim bidir-enable
!
call rsvp-sync
!
mgcp profile default
!
dial-peer cor custom
!
line con 0
login
pass cisco
line aux 0
line vty 0 4
login
pass cisco
!
end
r1#
R2的配置:
r2#
r2#sh run
Building configuration...
Current configuration : 714 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname r2
!
Enable Password cisco
!
ip subnet-zero
!
call rsvp-sync
!
interface FastEthernet0/0
ip address 10.1.1.254 255.255.255.0
!
interface Serial1/0
ip address 172.16.1.2 255.255.255.0
clockrate 64000
!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial1/0
ip http server
!
dial-peer cor custom
!
line con 0
login
pass cisco
line aux 0
line vty 0 4
login
pass cisco
!
end
r2#
VPN Client 4.01的配置:
建一个connection entry,参数配置:
name:任意起一个
host:填入vpn access server的s0/0地址 172.16.1.1
group auahentication:
name:vclient-group
password:vclient-key-cisco
测试:
(1) 在pc上运行VPN client,连接vpn access server。
(2) ipconfig/all,查看获取到的ip地址与其他参数。
(3) 在router,show cry isa sa,看连接是否成功。
(4) 从router,ping client已经获取到的ip地址,通过。
(5) 从client,ping r2的e0/0配置的地址172.16.2.1,通过。
(6) 查看vpn client软件的status--statistics,可以看到加密与解密的数据量。
(7) R1上show cry ip sa, 也可以查看加密与解密的数据量。
常用调试命令:
show crypto isakmp sa
show crypto ipsec sa
clear crypto sa
clear crypto isakmp
debug crypto isakmp
debug crypto ipsec
site to site vpn的配置(采用pre-share)
实验网络拓扑:
Router------------------Router
<R1> <R2>
R1接口ip:
s1/0:192.168.1.1/24 f0/0:172.16.1.2/24
R2接口ip:
s1/0:192.168.1.2/24 f0/0:172.16.2.1/24
2610的IOS为c2600-jk9s-mz.122-17.bin