思科VPN在工作中,经常会碰到,所以,先当个例子发给大家。如果有朋友模拟做的话,最好选用7200做。我前一段时间用3640模拟过,好像有的命令不支持,不确定。下面开始思科VPN详解。
1.1.1.1(l0口)R1(s1/0)12.1.1.1----12.1.1.2(s1/0) R2(s1/1)23.1.1.2------23.1.1.1(s1/1)R3(l0口)3.3.3.3
拓扑简单了点,大家仔细看,就会看懂。就是费劲点.
R1和R2,s1/0口连。。R2和R3,s1/1口相连。R1,R3,都起一个环回口。
我把R2模拟成Internet,R1为一个公司的VPN,R3为另一个公司的VPN,环回口模拟内网。
R2只需要把两个接口设置IP地址即可,不需要做其他配置。
思科VPN详解中的配置如下,如有不懂的地方,直接回复即可。我尽量帮大家解决。
R1
r1#show run
crypto isakmp policy 10
hash md5
authentication pre-share
group 2
crypto isakmp key cisco address 23.1.1.1
!
!
crypto ipsec transform-set cisco esp-des esp-md5-hmac
!
crypto map cisco 10 ipsec-isakmp
set peer 23.1.1.1
set transform-set cisco
match address vpn
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0
crypto map cisco
!
ip classless
ip route 3.3.3.3 255.255.255.255 12.1.1.2
ip route 23.1.1.1 255.255.255.255 12.1.1.2
!
ip access-list extended vpn
permit ip host 1.1.1.1 host 3.3.3.3
!
end
R3:
r3#show run
r3#show running-config
!
crypto isakmp policy 10
hash md5
authentication pre-share
group 2
crypto isakmp key cisco address 12.1.1.1
!
!
crypto ipsec transform-set cisco esp-des esp-md5-hmac
!
crypto map cisco 10 ipsec-isakmp
set peer 12.1.1.1
set transform-set cisco
match address vpn
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial1/1
ip address 23.1.1.1 255.255.255.0
serial restart-delay 0
crypto map cisco
ip classless
ip route 1.1.1.1 255.255.255.255 23.1.1.2
ip route 12.1.1.1 255.255.255.255 23.1.1.2
!
ip access-list extended vpn
permit ip host 3.3.3.3 host 1.1.1.1
!
end
r3#
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
- 66.
- 67.
- 68.
- 69.
|
思科VPN详解:步骤
1、静态路由
2、isakmp策略
3、ipsec策略
4、兴趣流
5、crypto map
6、将crypto map应用到接口
思科VPN详解:测试
1、ping 3.3.3.3 so 1.1.1.1 re 100
2、show crypto isakmp sa
3、show crypto ipsec sa
4、show crypto engine connections active
进行验证。
【编辑推荐】
- SSL VPN详解之SSL基础
- VPN:打造电力电网公司业务新模式
- 路由器VPN和IPv6技术分析