ensp-virtual private network 配置

GRE virtual private network 配置

实验拓扑:
在这里插入图片描述AR5:

[AR5]int g0/0/0
[AR5-GigabitEthernet0/0/0]ip address 15.1.1.1 29
[AR5-GigabitEthernet0/0/0]int g0/0/1
[AR5-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[AR5]ip route-static 0.0.0.0 0 15.1.1.6
[AR5]interface Tunnel 0/0/0
[AR5-Tunnel0/0/0]description TO_fenbu
[AR5-Tunnel0/0/0]tunnel-protocol gre
[AR5-Tunnel0/0/0]source 15.1.1.1
[AR5-Tunnel0/0/0]destination 46.1.1.1
[AR5-Tunnel0/0/0]ip address 192.168.254.1 24    #  给隧道配置ip地址
[AR5-Tunnel0/0/0]qu
[AR5]ip route-static 192.168.100.0 24 192.168.254.2

AR6:

[AR6]int g0/0/0
[AR6-GigabitEthernet0/0/0]ip address 46.1.1.1 29
[AR6-GigabitEthernet0/0/0]int g0/0/1
[AR6-GigabitEthernet0/0/1]ip address 192.168.100.1 24
[AR6-GigabitEthernet0/0/1]qu
[AR6]ip route-static 0.0.0.0 0 46.1.1.6
[AR6]interface Tunnel 0/0/0
[AR6-Tunnel0/0/0]description TO_zongbu
[AR6-Tunnel0/0/0]tunnel-protocol gre 
[AR6-Tunnel0/0/0]source 46.1.1.1
[AR6-Tunnel0/0/0]destination 15.1.1.1
[AR6-Tunnel0/0/0]ip address 192.168.254.2 24
[AR6-Tunnel0/0/0]qu
[AR6]ip route-static 192.168.1.0 24 192.168.254.1

PC1与PC2通讯:
在这里插入图片描述缺点:数据在经过运营商时没有加密。

ipsec virtual private network

实验拓扑:
在这里插入图片描述AR5:

acl number 3000  
 rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.100.0 0.0.0.255 

ipsec proposal aa
#
ipsec policy bb 10 manual
 security acl 3000
 proposal aa
 tunnel local 15.1.1.1
 tunnel remote 46.1.1.1
 sa spi inbound esp 123456
 sa string-key inbound esp simple 234567
 sa spi outbound esp 123456
 sa string-key outbound esp simple 234567
#
interface GigabitEthernet0/0/0
 ip address 15.1.1.1 255.255.255.248 
 ipsec policy bb
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.1 255.255.255.0 
#
interface Tunnel0/0/0
#
ip route-static 0.0.0.0 0.0.0.0 15.1.1.6
ip route-static 192.168.100.0 255.255.255.0 192.168.254.2

AR6:

acl number 3000  
 rule 5 permit ip source 192.168.100.0 0.0.0.255 destination 192.168.1.0 0.0.0.255 
#
ipsec proposal aa
#
ipsec policy bb 10 manual
 security acl 3000
 proposal aa
 tunnel local 46.1.1.1
 tunnel remote 15.1.1.1
 sa spi inbound esp 123456
 sa string-key inbound esp simple 234567
 sa spi outbound esp 123456
 sa string-key outbound esp simple 234567
#
interface GigabitEthernet0/0/0
 ip address 46.1.1.1 255.255.255.248 
 ipsec policy bb
#
interface GigabitEthernet0/0/1
 ip address 192.168.100.1 255.255.255.0 
#
ip route-static 0.0.0.0 0.0.0.0 46.1.1.6
ip route-static 192.168.1.0 255.255.255.0 192.168.254.1
#

验证:
在这里插入图片描述抓包观察:
在这里插入图片描述
命令解释:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值