设为首页收藏本站language 语言切换
查看: 2537|回复: 4
收起左侧

[原创] 配置GRE Over EzVPN

[复制链接]
发表于 2013-5-19 20:12:35 | 显示全部楼层 |阅读模式
实验拓扑:
截图1368964595.png


实验步骤:


1. 首先配置EzVPN:


EzVPNServer


R4(config)#cryptoisakmp policy 10

R4(config-isakmp)#authenticationpre-share

R4(config-isakmp)#encryption3des         

R4(config-isakmp)#group2

R4(config-isakmp)#hashmd5

R4(config-isakmp)#ex

R4(config)#

R4(config)#cryptoisakmp client configuration group ipsecgroup

R4(config-isakmp-group)#keycisco

R4(config-isakmp-group)#ex

R4(config)#

R4(config)#aaanew-model

R4(config)#aaaauthentication login noacs none

R4(config)#linecon 0

R4(config-line)#loginauthentication noacs

R4(config-line)#exit

R4(config)#lineaux 0

R4(config-line)#loginauthentication noacs

R4(config-line)#exit

R4(config)#

R4(config)#aaaauthentication login remote local

R4(config)#usernameipsecuser password cisco

R4(config)#aaaauthorization network remote local

R4(config)#iplocal pool pool 192.168.45.100 192.168.45.200

R4(config)#ipaccess-list extended acl

R4(config-ext-nacl)#permitip host 4.4.4.4 any

R4(config-ext-nacl)#ex

R4(config)#cryptoisakmp client configuration group ipsecgroup

R4(config-isakmp-group)#poolpool

R4(config-isakmp-group)#save-password

R4(config-isakmp-group)#aclacl

R4(config-isakmp-group)#ex

R4(config)#cryptoisakmp profile pro

% Aprofile is deemed incomplete until it has match identity statements

R4(conf-isa-prof)#matchidentity group ipsecgroup

R4(conf-isa-prof)#clientconfig address respond

R4(conf-isa-prof)#clientauthentication list remote

R4(conf-isa-prof)#isakmpauthorization list remote

R4(conf-isa-prof)#ex

R4(config)#

R4(config)#cryptoipsec transform-set cisco esp-des esp-md5-hmac

R4(cfg-crypto-trans)#ex

R4(config)#cryptodynamic dy-cisco 10

R4(config-crypto-map)#settransform-set cisco

R4(config-crypto-map)#setisakmp-profile pro

R4(config-crypto-map)#reverse-route

R4(config-crypto-map)#ex

R4(config)#cryptomap cisco 10 ipsec-isakmp dynamic dy-cisco

R4(config)#

R4(config)#interfaceserial 1/0

R4(config-if)#cryptomap cisco

R4(config-if)#ex

*Mar  1 00:10:43.719: %CRYPTO-6-ISAKMP_ON_OFF:ISAKMP is ON

R4(config-if)#ex

R4(config)#



EzVPN Client


       R2(config)#cryptoipsec client ezvpn ezvpn

R2(config-crypto-ezvpn)#peer 34.1.1.4      //EzVPN的最大特点就是不仅可以配置IP地址,还可以配置域名,中心可以使用动态域名技术,客户端动态获取IP地址,并且通过Peer指定中心的动态域名实现中心和分支节点地址的双动态;

R2(config-crypto-ezvpn)#connect auto       //EzVPN的自动连接也是一个重要的特点,不需要感兴趣流的触发,只需要设备开机或者有互联网连接即可发起VPN连接;

R2(config-crypto-ezvpn)#groupipsecgroup key cisco

R2(config-crypto-ezvpn)#usernameipsecuser password cisco

R2(config-crypto-ezvpn)#modenetwork-extension

R2(config-crypto-ezvpn)#ex

R2(config)#

R2(config)#intloopback 0

R2(config-if)#cryptoipsec client ezvpn ezvpn inside

R2(config-if)#ex

R2(config)#ints 1/1

R2(config-if)#cryptoipsec client ezvpn ezvpn outside

R2(config-if)#ex




2. 配置GRE 隧道


EzVPNServer

   

R4(config)#interfacetunnel 0

R4(config-if)#ipadd 24.1.1.4 255.255.255.0

R4(config-if)#tunnelsource 4.4.4.4

R4(config-if)#tunneldestination 2.2.2.2

R4(config-if)#ex

R4(config)#



EzVPNClient:

  

R2(config)#interfacetunnel 0

R2(config-if)#ipaddress 24.1.1.2 255.255.255.0

R2(config-if)#tunnelsource 2.2.2.2

R2(config-if)#tunneldestination 4.4.4.4

R2(config-if)#exit



3. 配置动态路由协议:


R1

R1(config)#routerospf 1

R1(config-router)#router-id1.1.1.1

R1(config-router)#network192.168.12.1 0.0.0.0 area 0

R1(config-router)#ex

R1(config)#   



R2

R2(config)#routerospf 1

R2(config-router)#router-id2.2.2.2

R2(config-router)#network192.168.12.2 0.0.0.0 area 0

R2(config-router)#network24.1.1.2 0.0.0.0 area 0

R2(config-router)#ex

R2(config)#



R4

R4(config)#routerospf 1

R4(config-router)#router-id4.4.4.4

R4(config-router)#network192.168.45.4 0.0.0.0 area 0

R4(config-router)#network24.1.1.4 0.0.0.0 area 0

R4(config-router)#exit



R5

R5(config)#routerospf 1

R5(config-router)#router-id5.5.5.5

R5(config-router)#network192.168.45.5 0.0.0.0 area 0

R5(config-router)#ex  





4. 测试


R5(config)#doping 192.168.12.1


Typeescape sequence to abort.

Sending5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:

!!!!!

Successrate is 100 percent (5/5), round-trip min/avg/max = 44/76/120 ms

截图1368964595.png
发表于 2013-5-20 00:35:22 | 显示全部楼层
楼主把 GRE和EZVPN配置在一起,想告诉我们什么呢?
沙发 2013-5-20 00:35:22 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-5-20 01:00:47 | 显示全部楼层
能想到这个解决办法说明对VPN理解不错了,利用环回口来作为加密点的流量,可以建立GRE Over IPSec效果,不过你那环回口的配置没给出来,别人可能会郁闷的

楼主可以试试isakmp profile下面关联虚拟模板,这样只需要一个Tunnel隧道就行了,无论你多少个CLient
板凳 2013-5-20 01:00:47 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-11-6 21:35:38 | 显示全部楼层
{:soso_e100:}
地板 2013-11-6 21:35:38 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-2-22 22:15:51 | 显示全部楼层
快快快看看
5# 2014-2-22 22:15:51 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-29 23:45 , Processed in 0.182874 second(s), 28 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表