GRE over IPsec 实验
1、根据拓扑搭建实验环境
2、配置IP地址
R1(config)#interface f0/0
R1(config-if)#ip add 200.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#interface loopback 0 R1(config-if)#ip add 1.1.1.1 255.255.255.0
R2(config)#interface f0/0
R2(config-if)#ip add 200.1.2.2 255.255.255.0
R2(config-if)#no shutdown
配置loopback 接口
R2(config)#interface loopback 0 配置loopback 接口
R2(config-if)#ip add 2.2.2.2 255.255.255.0
3、配置路由
R1(config)#ip route 0.0.0.0 0.0.0.0 200.1.1.2 R2(config)#ip route 0.0.0.0 0.0.0.0 200.1.2.1
4、配置GRE隧道
R1(config)#interface tunnel 0
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#tunnel source 200.1.1.1
R1(config-if)#tunnel destination 200.1.2.2
R2(config)#interface tunnel 0
R2(config-if)#ip add 172.16.1.2 255.255.255.0
R2(config-if)#tunnel source 200.1.2.2
Internet的路由
R2(config-if)#tunnel destination 200.1.1.1
5、配置隧道路由
R1(config)#router ospf 1
R1(config-router)#network 172.16.1.0 0.0.0.255 area 0 宣告GRE隧道网络
R1(config-router)#network 1.1.1.0 0.0.0.255 area 0 宣告内网网络
R1(config)#router ospf 1
R1(config-router)#network 172.16.1.0 0.0.0.255 area 0 宣告GRE隧道网络
R1(config-router)#network 2.2.2.0 0.0.0.255 area 0 宣告内网网络
6、配置 IPSec
广州路由器配置
1)定义隧道的加密认证策略:
R1(config)#crypto isakmp policy 10
R1(config-isakmp)#authentication pre-share 设置认证方式为预共享密钥方式
R1(config-isakmp)#exit
R1(config)#crypto isakmp key 0 cisco address 200.1.2.2 设置预共享密钥Cisco
2)定义感兴趣流
R1(config)#ip access-list extended gtslist
R1(config-ext-nacl)#permit ip 1.1.1.0 0.0.0.255 2.2.2.0 0.0.0.255
3)定义转换集 --怎么对用户的数据进行加密和认证
R1(config)#crypto ipsec transform-set 666 esp-des esp-md5-hmac
R1(cfg-crypto-trans)#mode transport 设置传输模式
4)定义加密图 ---
R1(config)#crypto map gtsmap 10 ipsec-isakmp
R1(config-crypto-map)#match address gtslist
R1(config-crypto-map)#set transform-set 666
R1(config-crypto-map)#set peer 200.1.2.2
5)在接口上应用map
R1(config)#interface f0/0
R1(config-if)#crypto map gtsmap
*Mar 1 00:44:27.151: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
R1(config-if)#
深圳路由器配置
1)设置加密认证策略
crypto isakmp policy 10
authentication pre-share
crypto isakmp key cisco address 200.1.1.1
2)定义感兴趣流
ip access-list extended gtslist
permit ip 2.2.2.0 0.0.0.255 1.1.1.0 0.0.0.255
3)定义转换集 --数据保护
crypto ipsec transform-set 666 esp-des esp-md5-hmac
mode transport
4)汇总策略map
crypto map stgmap 10 ipsec-isakmp
set peer 200.1.1.1
set transform-set 666
match address gtslist
5)应用策略到接口
Interface f0/0
Crypto map stgmap
查看安全关联
R3#show crypto ipsec sa IPsec
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- 69lv.com 版权所有 湘ICP备2023021910号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务