锐捷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

隧道建立情况

捉包查看加密情况

联通性测试

相关推荐
MuMuMu122340 分钟前
工业园区 VOCs 绿岛集中治理:越华环保集团项目技术方案与工程实践
大数据·运维
疯狂打码的少年2 小时前
【数据结构】串(字符串):基本概念与存储
数据结构·笔记
漫路在线2 小时前
无境红日靶场五 wp
网络·安全·web安全
sxstj2 小时前
Ubuntu 完整安装并启用 Flatpak 教程
linux·运维·ubuntu
国际云,接待2 小时前
Nginx 后面接负载均衡,502/504 到底该先查哪里?
运维·nginx·负载均衡
Sylvia33.2 小时前
从轮询到推送:足球数据API架构演进与火星数据技术拆解
java·服务器·网络·python·websocket·架构
刘某的Cloud3 小时前
Galera Cluster部署 mariadb 节点down机,log sequence number恢复
linux·运维·数据库·负载均衡·mariadb·集群·高可用
小此方3 小时前
Re:Linux系统篇(五十四)线程篇 · 七:互斥锁的底层实现原理:从硬件上下文、原子交换指令(Swap)到并发封装实战
linux·运维·驱动开发
2401_834636993 小时前
从零吃透 K8s 网络:ServiceIngressMetalLB 实操手册
网络·容器·kubernetes
Hotchip_MEMS4 小时前
TWS耳机微米级较量:超薄LGA封装如何助力MEMS麦克风小型化?
人工智能·笔记·物联网·电脑