锐捷gre over ipsec结合ospf配置案例

网络规划设计

1、先建用tunnel口建立GRE vpn隧道

2、再用ospf打通两边

3、对公网地址进行esp加密ipese vpn

4、最后保证两边1.1.1.1和3.3.3.3互通

R1配置

ip access-list extended 100 //配置感兴趣流为公网地址,因为tunnel里面用的源目地址为公网地址

10 permit gre host 9.0.12.1 host 9.0.23.3

!

crypto isakmp policy 1 //isa安全提仪

authentication pre-share

!

crypto isakmp key 0 ruijie address 9.0.23.3 //预共享密钥ruijie

crypto ipsec transform-set admin esp-des //加密方式

mode transport

!

crypto map admin 1 ipsec-isakmp

set peer 9.0.23.3

set transform-set admin

match address 100 //调用acl

!

interface GigabitEthernet 0/0

ip address 9.0.12.1 255.255.255.0

crypto map admin //接口调用

!

interface Loopback 0

ip address 1.1.1.1 255.255.255.255

!

interface Tunnel 0

ip address 10.0.0.1 255.255.255.0

tunnel source 9.0.12.1 //使用公网建立GRE

tunnel destination 9.0.23.3

!

router ospf 1

graceful-restart

network 1.1.1.1 0.0.0.0 area 0 //发布私网IP

network 10.0.0.0 0.0.0.255 area 0 //建立ospf

!

ip route 0.0.0.0 0.0.0.0 9.0.12.2 //默认路由

R2配置

interface GigabitEthernet 0/0

ip address 9.0.12.2 255.255.255.0

!

interface GigabitEthernet 0/1

ip address 9.0.23.2 255.255.255.0

R3配置

ip access-list extended 100

10 permit gre host 9.0.23.3 host 9.0.12.1

!

crypto isakmp policy 1

authentication pre-share

!

crypto isakmp key 7 1235101b400424 address 9.0.12.1

crypto ipsec transform-set admin esp-des

mode transport

!

crypto map admin 1 ipsec-isakmp

set peer 9.0.12.1

set transform-set admin

match address 100

!

interface GigabitEthernet 0/1

ip address 9.0.23.3 255.255.255.0

crypto map admin

!

interface Loopback 0

ip address 3.3.3.3 255.255.255.255

!

interface Tunnel 0

ip address 10.0.0.3 255.255.255.0

tunnel source 9.0.23.3

tunnel destination 9.0.12.1

!

router ospf 1

graceful-restart

network 3.3.3.3 0.0.0.0 area 0

network 10.0.0.0 0.0.0.255 area 0

!

ip route 0.0.0.0 0.0.0.0 9.0.23.2

隧道建立情况

捉包查看加密情况

联通性测试

相关推荐
2501_946786206 小时前
如何高效查找同时持有CCRC和CMA双认证的信息安全服务商?
服务器·网络·安全
W.A委员会6 小时前
地址栏输入url到显示画面
前端·网络
bukeyiwanshui6 小时前
20260417 NFS服务器
linux·运维·服务器
wzl202612136 小时前
企微关键词拉群之批量自动化与风控规避方案
运维·自动化·企业微信
pengyi8710156 小时前
共享IP使用基础注意事项,从源头降低关联风险
网络·网络协议·tcp/ip·安全·http
Gofarlic_oms16 小时前
制定企业Citrix虚拟化软件资产管理政策框架
运维·服务器·开发语言·matlab·负载均衡
lcreek6 小时前
epoll 指南:Linux 高并发服务器开发的核心技术
网络·epoll
运维有小邓@7 小时前
MFA轰炸攻击是什么?如何有效防范?
运维·mfa
坚持就完事了7 小时前
“.sh”文件
linux·运维·服务器
驭渊的小故事7 小时前
Java的类和对象的笔记
笔记