IPsec(VPN)

IPsec(Internet Protocol Security)

包含于VPN(Virtual Private Network)

IP:无连接、不可靠性、不安全性

IPsec:提供IKE、AH、ESP保护数据

通过Internet上建立专用隧道,

使数据通过IPsec Tunnel逻辑链路直连

避开不安全的Internet物理链路

R1

[R1]interface GigabitEthernet0/0/1	
[R1-GigabitEthernet0/0/1]ip address 1.1.1.1 24	
[R1]interface Ethernet0/0/1
[R1-Ethernet0/0/1]ip address 10.1.1.1 24
[R1]ip route-static 2.1.1.0 255.255.255.0 1.1.1.2
[R1]ip route-static 10.1.2.0 255.255.255.0 1.1.1.2
[R1]acl number 3101	
[R1-acl-adv-3101]rule permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255
[R1]ipsec proposal tran1	
[R1-ipsec-proposal-tran1]esp authentication-algorithm sha2-256
[R1-ipsec-proposal-tran1]esp encryption-algorithm aes-128
[R1]ike proposal 5	
[R1-ike-proposal-5]encryption-algorithm aes-cbc-128	
[R1-ike-proposal-5]authentication-algorithm sha1 		
[R1-ike-proposal-5]dh group14
[R1]ike peer spub v2	
[R1-ike-peer-spub]ike-proposal 5	
[R1-ike-peer-spub]pre-shared-key cipher 00000000
[R1-ike-peer-spub]remote-address 2.1.1.1
[R1]ipsec policy map1 10 isakmp 	
[R1-ipsec-policy-isakmp-map1-10]ike-peer spub 	
[R1-ipsec-policy-isakmp-map1-10]proposal tran1	
[R1-ipsec-policy-isakmp-map1-10]security acl 3101
[R1]interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1]ipsec policy map1 

R2

[R2]interface GigabitEthernet0/0/2
[R2-GigabitEthernet0/0/2]ip address 2.1.1.1 24
[R2]interface Ethernet0/0/1	
[R2-Ethernet0/0/1]ip address 10.1.2.1 24
[R2]ip route-static 1.1.1.0 255.255.255.0 2.1.1.2
[R2]ip route-static 10.1.1.0 255.255.255.0 2.1.1.2	
[R2]acl number 3101	
[R2-acl-adv-3101]rule permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255
[R2]ipsec proposal tran1	
[R2-ipsec-proposal-tran1]esp authentication-algorithm sha2-256
[R2-ipsec-proposal-tran1]esp encryption-algorithm aes-128	
[R2]ike proposal 5	
[R2-ike-proposal-5]encryption-algorithm aes-cbc-128 	
[R2-ike-proposal-5]authentication-algorithm sha1 	
[R2-ike-proposal-5]dh group14
[R2]ike peer spua v2	
[R2-ike-peer-spua]ike-proposal 5	
[R2-ike-peer-spua]pre-shared-key cipher 00000000
[R2-ike-peer-spua]remote-address 1.1.1.1
[R2]ipsec policy use1 10 isakmp 	
[R2-ipsec-policy-isakmp-use1-10]ike-peer spua 	
[R2-ipsec-policy-isakmp-use1-10]proposal tran1 
[R2-ipsec-policy-isakmp-use1-10]security acl 3101	
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ipsec policy use1

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值