|
Cisco vpn 之 lan to lan ipsec
网络拓朴:
![]() 实验任务:
l 建立vpn隧道,加密1.1.1.0/24 到 2.2.2.0/24的流量
环境描述:
l 3台Cisco3640 + NE-4E模块,该配置拥有4个Ethernet、2台PC
l ISP模拟ISP环境,不添加任何额外路由
l SH-R1 loopback1:1.1.1.1/24、BJ-R1 loopback1:2.2.2.2/24用来测试
地址分配:
详细配置:
1、IP地址设置
SH-R1 (config) #int e0/0
SH-R1 (config-if) #ip add 192.168.1.1 255.255.255.0
SH-R1 (config) #no shutdown
SH-R1 (config) #int lo1
SH-R1 (config-if) #ip add 1.1.1.1 255.255.255.0
………………………………………………………………………….
BJ-R1 (config) #int e0/1
BJ-R1 (config-if) #ip add 192.168.2.1 255.255.255.0
BJ-R1 (config) #no shutdown
BJ-R1 (config) #int lo1
BJ-R1 (config-if) #ip add 2.2.2.2 255.255.255.0
……………………………………………………………………………
ISP (config) #int e0/0
ISP (config-if) #ip add 192.168.1.2 255.255.255.0
ISP (config) #no shutdown
ISP (config) #int e0/1
ISP (config-if) #ip add 192.168.2.2 255.255.255.0
ISP (config) #no shutdown
2、定义相关ACL
SH-R1 (config)#ip access-list extended vpn ……………………匹配vpn加密
SH-R1 (config-ext-nacl)#permit ip 1.1.1.0 0.0.0.255 2.2.2.2 0.0.0.255
BJ-R1 (config)#ip access-list extended vpn ……………………匹配vpn加密
BJ-R1 (config-ext-nacl)#permit ip 2.2.2..0 0.0.0.255 1.1.1 0.0.0.255
3、配置IKE协商(第一阶段)
SH-R1(config)#crypto isakmp policy 1 定义第一阶段策略
SH-R1(config-isakmp)#hash md5 哈希使用md5
SH-R1(config-isakmp)#encryption 3des 加密方式使用3DES(对称)
SH-R1(config-isakmp)#authentication pre-share 验证用预共享密钥
SH-R1(config-isakmp)#group 2 使用第二组策略(1024bit)
SH-R1(config)#crypto isakmp key 0 cisco address 192.168.2.1 BJ-R1(config)#crypto isakmp policy 1 定义第一阶段策略
BJ-R1(config-isakmp)#hash md5 哈希算法使用md5
BJ-R1(config-isakmp)#encryption 3des 加密方式使用3DES(对称)
BJ-R1(config-isakmp)#authentication pre-share 验证用预共享密钥
BJ-R1(config-isakmp)#group 2 使用第二组策略(1024bit)
BJ-R1(config)#crypto isakmp key 0 cisco address 192.168.1.2
4、配置IPsec参数(第二阶段)
SH-R1(config)#crypto ipsec transform-set SH-BJ esp-des esp-md5-hmac
BJ-R1 (config)#crypto ipsec transform-set BJ-SH esp-des esp-md5-hmac
5、配置加密图(关联第一、二阶段)
SH-R1(config)#crypto map SH 1 ipsec-isakmp 建立map关联1、2阶段
SH-R1(config-crypto-map)#set transform-set SH-BJ 指定转换集
SH-R1(config-crypto-map)#match address vpn 匹配需加密的流量
SH-R1(config-crypto-map)#set peer 192.168.2.1 指明对方加(解)密点
BJ-R1(config)#crypto map BJ 1 ipsec-isakmp 建立map关联1、2阶段
BJ-R1(config-crypto-map)#set transform-set BJ-SH 指定转换集
BJ-R1(config-crypto-map)#match address vpn 匹配需加密的流量
BJ-R1(config-crypto-map)#set peer 192.168.1.1 指明对方加(解)密点
5、端口应用
BJ-R1(config)#int e0/0
BJ-R1(config-if)#crypto map BJ 端口调用加密图
SH-R1(config)#int e0/0
SH-R1(config-if)#crypto map SH 端口调用加密图
实验测试:
1、在SH-R1 extend ping 2.2.2.2 sourse 1.1.1.
12、验证ISAKMP SA
3、3、验证两边IPSEC SA![]() 由以上可以看出SH-R1的outbound spi 与 BJ-R1 的inbound spi相同,说明第二阶段成功建立。
本文出自 “鬼爆蚂蚁” 博客,请务必保留此出处[url]http://zg888.blog.51cto.com/247606/95251[/url] 本文出自 51CTO.COM技术博客 |
Cisco vpn 之 lan to lan ipsec
转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
IPSEC vpn详解
IPSEC VPN
ci Standard Time -
锐捷GRE VPN+L2TP VPN Over 动态IPSec VPN
嵌套隧道
网络 ChinaSkills -
IPsec LAN-to-LAN ×××(LAN-to-LAN ×××)
IPsec LAN-to-LAN VPN(LAN-to-LAN VPN)
职场 VPN IPsec 休闲 IPsec VPN -
配置 LAN−to−LAN IPSec Tunnel With PAT
配置详细配置见附件
职场 security 休闲 -
LAN TO LAN ×××
CISCO LAN TO LAN VPN IPsec VPN
职场 VPN ipsec 休闲 -
配置 Cisco ASA LAN−to−LAN and Easy ×××
配置
职场 security 休闲 -
基于cisco设备LAN设置
&n
Cisco 职场 休闲 LAN


3、3
















