Cisco 路由器上手工方式VPN的实现( 二 )


8、用VPN的好处
(1)节约成本,因为不要在做大量投资,购买专业设备,只需用现有的路由器即可 。
(2)实现了加密,保证重要数据在传输过程中的安全性 。
(3)灵活性强 。假如用户通过路由器接入Internet,则可以自己配置保证安全性 。不过对于ISP来说用处不大 。
9、VPN应用举例:
在路由器R1上配置如下:
no crypto isakmp enable
crypto ipsec transform-set encry-des esp-des
crypto map vpntest 8 ipsec-manual
set peer 202.106.185.2
set security-association inbound esp 1000 cipher 21 authenticator 01
set security-association outbound esp 1001 cipher 12 authenticator 01
set transform-set encry-des match address 101
interface Ethernet0/0
ip address 192.168.0.1 255.255.255.0
interface Ethernet0/1
ip address 202.106.185.1 255.255.255.0
crypto map vpntest
ip route 0.0.0.0 0.0.0.0 202.106.185.2
access-list 101 permit ip host 192.168.0.1 host 192.168.1.1
在路由器R2上配置如下:
no crypto isakmp enable
crypto ipsec transform-set encry-des esp-des
crypto map vpntest 8 ipsec-manual set peer 202.106.185.1
set security-association inbound esp 1001 cipher 12 authenticator 01
set security-association outbound esp 1000 cipher 21 authenticator 01
set transform-set encry-des match address 101
interface Ethernet0/0
ip address 192.168.1.1 255.255.255.0
interface Ethernet0/1
ip address 202.106.185.2 255.255.255.0
crypto map vpntest
ip route 0.0.0.0 0.0.0.0 202.106.185.1
access-list 101 permit ip host 192.168.1.1 host 192.168.0.1
IKE方式的实现
1、IKE使用UPD 500
2、支持CA
3、支持移动用户
IKE包括的组件:
1、DES
2、Diffie-Hellman-preshare key
3、RSA signatures(CA)and RSA encrypted nonces
IKE配置内容:
1、enable IKE—default enable
2、accesslist
3、transformset
4、crypto map
5、binding interface
IKE Policy—两边的号码可以不一样,匹配:
authentication、hash、diff-herman、encrytpion,lifetime(取最小值)
1、authentication
(1)RSA signature
(2)RSA non
(3)Preshare Key
2、encryption
IKE配置
(1)配置accesslist
(2)crypto isakmp enable(默认打开,但为了避免,还是写上)
(3)crypto isakmp policy 10
a)encryption algorithm:DES
b)hash algorithm:SHA1
c)authentication method:RSA sig
d)Diffie-Hellman group:1
e)Lifetime:86400
(4)crypto isakmp key test address 202.106.100.2
(5)crypto ipsec transform-set set2 ah-sha-hmac
esp-des esp-sha-hmac
(6)crypto map IKE ipsec-isakmp
a)set peer remote IP
b)set transform-set
c)set pfs group2
d)match address
(7)dir
使用RSA的-encr方式
ip domain-name
crypto key generate rsa
sh crypto key mypubkey rsa
crypto key pubkey-chain rsa
key-string
什么时候使用手工方式,什么时候使用IKE方式

推荐阅读