VPN实验小结-vpn access server的配置


(一)vpn access server的配置
  
  实验网络拓扑:
  
  pc(vpn client 4.01)---switch---router1720 (vpn 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
  
  步骤:
  1、配置isakmp policy:
  crypto isakmp policy 1
  encr 3des
  authen pre-share
  group 2
  2、配置vpn client地址池
  cry isa client conf address-pool local pool192
  ip local pool pool192 192.168.1.1 192.168.1.254
  3、配置vpn client有关参数
  cry isa client conf 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
  cry ipsec trans vclient-tfs esp-3des esp-sha-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模板
  cry map vpnmap isakmp author list vclient-group ####使用第三步配置的参数authorization
  cry map vpnmap client conf address respond ####响应client分配地址的请求
  7、配置静态路由
  ip route 192.168.1.0 255.255.255.0 fastethernet0
  
  说明几点:
  (1)因为1720只有一个fastethernet口,所以用router1720上的lo0地址来模拟router内部网络。
  (2)vpn client使用的ip pool地址不能与router内部网络ip地址重叠。
  (3)10.130.23.0网段模拟公网地址,172.16.1.0网段用于1720内部地址,192.168.1.0网段用于vpn通道。
  (4)没有找到设置vpn client获取的子网掩码的办法。看来是ios还不支持这个功能。
  (5)关于split tunnel。配置方法:首先,设置access 133 permit ip 172.16.1.0 0.0.0.255 any,允许1720本地网络数据通过tunnel,然后在第三步骤中添加一个参数:acl 133。
  
  1720的完整配置:
  
  VPN1720#sh run
  Building configuration...
  
  Current configuration : 1321 bytes
  !
  version 12.2
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname VPN1720
  !
  enable secret 5 {GetProperty(Content)}$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 vpnmap isakmp authorization list vclient-group
  crypto map vpnmap client configuration address respond
  crypto map vpnmap 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 vpnmap
  !
  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
  
  VPN Client 4.01的配置:
  新建一个connection entry,参数中name任意起一个,host填入vpn access server的f0地址
  
  10.130.23.246,
  group auahentication中name填vclient-group,password填vclient-key.
  
  测试:
  (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 router的lo0配置的地址172.16.1.1,通过。
  (6)查看vpn client软件的status--statistics,可以看到加密与解密的数据量。
  (7)1720上show cry ip sa, 也可以查看加密与解密的数据量。
  
  常用调试命令:
  show cry isakmp sa
  show cry ipsec sa
  clear cry sa
  clear cry isakmp
  debug cry isakmp #####这是最常用的debug命令,vpn连接的基本错误都可以用它来找到
  debug cry ipsec 本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3