路由器配置ipsec

第一阶段
crypto isakmp key ccie123 23.1.1.3 255.255.255.255 \\配置预共享密钥
    
crypto isakmp policy 10 \\配置管理连接安全策略
 encryption 3des \\加密算法
hash sha  \\完整性算法
authentication pre-share  \\采用认证方式

第二阶段
crypto ipsec transform-set ipsec1  \\定义数据的转换集
 mode transport \\模式
 transform-type esp-3des esp-sha-hmac \\保护数据的安全协议

ip access-list extended ipsecacl \\定义触发VPN的流量
 permit ip 12.1.1.1 0.0.0.255 23.1.1.3 0.0.0.255

crypto map ipsec1 10 ipsec-isakmp  \\创建map关联阶段2的数据连接的安全协议
 set peer 23.1.1.3 \\定义VPN对等体
 set transform-set ipsec1 \\关联
 match address ipsecacl  \\调用定义的VPN流量	


配置路由器和防火墙的ipsec
路由器
interface Tunnel1  \\创建隧道接口
 ip address 10.10.10.1 255.255.255.0
 tunnel source 12.0.0.1
 tunnel destination 12.0.0.2


crypto isakmp key ccie123 12.0.0.2 255.255.255.255 \\配置预共享密钥

 
crypto isakmp policy 10 \\配置管理连接安全策略
 加密默认为des
算法默认为sha
组默认为1 
!
crypto ipsec transform-set bian  \\定义数据的转换集
加密方式为预共享
加密协议为esp
加密算法默认为des  和 sha 



ip access-list extended ipsecacl \\定义触发VPN的流量
 permit gre 12.0.0.1 255.255.255.0 12.0.0.2 255.255.255.0

!
crypto map map 10 ipsec-isakmp  \\创建map关联阶段2的数据连接的安全协议
 set peer 12.0.0.2
 set transform-set bian
 match address ipsecacl 
 !
interface GigaEthernet0/6
 crypto map map \\调用map

ip route 10.10.10.0 255.255.255.0 Tunnel1 \\写去往隧道的路由

同一设备多条隧道配置(多个目的,多个转换集,多个策略)
crypto isakmp key 123456 address 12.1.1.1       
crypto isakmp key 123456 address 23.1.1.3       
!
crypto isakmp policy 10
 encr 3des
 hash md5
 authentication pre-share
!
crypto ipsec transform-set 10 esp-3des esp-md5-hmac 
 mode tunnel
crypto ipsec transform-set 20 esp-3des esp-md5-hmac 
 mode tunnel
!
!
crypto map ipsec 10 ipsec-isakmp 
 set peer 12.1.1.1
 set transform-set 10 
 match address acl
!
crypto map ipsec1 10 ipsec-isakmp 
 set peer 23.1.1.3
 set transform-set 20 
 match address acl
  • 9
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值