锐捷nat+gre over ipsec组网
一 网络拓扑1.总部和分支都是单链路连接互联网通过nat和gre over ipsec vpn实现内网互通二 设备配置2.1 R11设备配置hostname R11!interface GigabitEthernet 0/0ip address 1.1.1.1 255.255.255.0!interface Loopback 0ip address 192.168.1.1 255.255.255.255!ip route 0.0.0.0 0.0.0.0 1.1.1.2!2.2 R12设备配置-NAT和GREIPSEC配置hostname R12!ip access-list extended 100//IPSEC感兴趣流5 permit ip host 202.1.1.1 host 203.1.1.2!ip access-list extended 110//NAT配置10 deny ip host 192.168.1.1 host 192.168.10.115 permit ip host 192.168.1.1 any!ip nat inside source list 110 interface GigabitEthernet 0/1 overload!crypto isakmp policy 1encryption 3desauthentication pre-sharehash md5group 2!crypto isakmp keepalive 5 periodic!crypto isakmp key 7 151b5f72 address 203.1.1.2crypto ipsec transform-set 1 esp-3des esp-md5-hmac!crypto map 1 1 ipsec-isakmpset peer 203.1.1.2set transform-set 1match address 100!interface GigabitEthernet 0/0ip address 1.1.1.2 255.255.255.0ip nat inside!interface GigabitEthernet 0/1ip address 202.1.1.1 255.255.255.0crypto map 1ip nat outside!interface Tunnel 1ip address 10.1.1.1 255.255.255.0tunnel source 202.1.1.1tunnel destination 203.1.1.2!ip route 0.0.0.0 0.0.0.0 202.1.1.2ip route 192.168.1.1 255.255.255.255 1.1.1.1!2.3 ISP设备配置hostname ISP!interface GigabitEthernet 0/0ip address 203.1.1.1 255.255.255.0!interface GigabitEthernet 0/1ip address 202.1.1.2 255.255.255.0!interface Loopback 0ip address 8.8.8.8 255.255.255.255!2.4 R14设备配置-NAT和GREIPSEC配置hostname R14!ip access-list extended 100//IPSEC感兴趣流10 permit ip host 192.168.10.1 host 192.168.1.1!ip access-list extended 110//NAT10 deny ip host 192.168.10.1 host 192.168.1.115 permit ip host 192.168.10.1 any!ip nat inside source list 110 interface GigabitEthernet 0/0 overload!crypto isakmp policy 1encryption 3desauthentication pre-sharegroup 2!crypto isakmp keepalive 5 periodic!crypto isakmp key 7 06576c50 address 202.1.1.1crypto ipsec transform-set 1 esp-3des esp-md5-hmac!crypto map 1 1 ipsec-isakmpset peer 202.1.1.1set transform-set 1match address 100!interface GigabitEthernet 0/0ip address 203.1.1.2 255.255.255.0crypto map 1ip nat outside!interface GigabitEthernet 0/1ip address 2.2.2.2 255.255.255.0ip nat inside!interface Tunnel 1ip address 10.1.1.2 255.255.255.0tunnel source 203.1.1.2tunnel destination 202.1.1.1!ip route 0.0.0.0 0.0.0.0 203.1.1.1ip route 192.168.10.1 255.255.255.255 2.2.2.1!2.5 R15设备配置hostname R15!interface GigabitEthernet 0/0!interface GigabitEthernet 0/1ip address 2.2.2.1 255.255.255.0!interface Loopback 0ip address 192.168.10.1 255.255.255.255!ip route 0.0.0.0 0.0.0.0 2.2.2.2!三 业务测试3.1 R11业务测试R11#R11#ping 192.168.10.1 source 192.168.1.1Sending 5, 100-byte ICMP Echoes to 192.168.10.1, timeout is 2 seconds: press CtrlC to break !!!!!Success rate is 100 percent (5/5), round-trip min/avg/max 4/5/8 ms.R11#3.2 R15业务测试R15#ping 192.168.1.1 source 192.168.10.1Sending 5, 100-byte ICMP Echoes to 192.168.1.1, timeout is 2 seconds: press CtrlC to break !!!!!Success rate is 100 percent (5/5), round-trip min/avg/max 4/7/11 ms.R15#四 设备状态4.1 R12-NAT和IPSEC状态查看R12#show crypto isakmp sadestination source state conn-id lifetime(second)203.1.1.2 202.1.1.1 IKE_IDLE 1 86101R12#show crypto ipsec saCrypto map tag:1local ipv4 addr 202.1.1.1media mtu 1500sub_map type:static, seqno:1, id1local ident (addr/mask/prot/port): (202.1.1.1/0.0.0.0/0/0))remote ident (addr/mask/prot/port): (203.1.1.2/0.0.0.0/0/0))PERMIT#pkts encaps: 2490, #pkts encrypt: 2490, #pkts digest 2490#pkts decaps: 2490, #pkts decrypt: 2490, #pkts verify 2490#send errors 0, #recv errors 0pkts encaps errors:#negoitate pkt drop: 0, #sab useless: 0, encap data fail: 0, compute hash fail: 0pkts decypto errors:#check reply wind fail: 0, #compute hash fail: 0, verify hash fail: 0#pkts detect send req: 0, recv reply: 0, recv req: 0, send reply: 0Inbound esp sas:spi:0x7046a103 (1883676931)transform: esp-3des esp-md5-hmacin use settings{Tunnel Encaps,}crypto map 1 1sa timing: remaining key lifetime (k/sec): (4605988/3301)IV size: 0 bytesReplay detection support:YOutbound esp sas:spi:0xed941edf (3985907423)transform: esp-3des esp-md5-hmacin use settings{Tunnel Encaps,}crypto map 1 1sa timing: remaining key lifetime (k/sec): (4605988/3301)IV size: 0 bytesReplay detection support:YR12#show crypto isakmp policyProtection suite of priority 1encryption algorithm: Three key triple DES.hash algorithm: Message Digest 5authentication method: Pre-Shared KeyDiffie-Hellman group: #2 (1024 bit)lifetime: 86400 secondsDefault protection suiteencryption algorithm: DES - Data Encryption Standard (56 bit keys).hash algorithm: Secure Hash Standardauthentication method: Pre-Shared KeyDiffie-Hellman group: #1 (768 bit)lifetime: 86400 secondsR12#4.2 R14-NAT和IPSEC状态查看R14#show crypto isakmp sadestination source state conn-id lifetime(second)202.1.1.1 203.1.1.2 IKE_IDLE 1 86019R14#show crypto ipsec saCrypto map tag:1local ipv4 addr 203.1.1.2media mtu 1500sub_map type:static, seqno:1, id1local ident (addr/mask/prot/port): (203.1.1.2/0.0.0.0/0/0))remote ident (addr/mask/prot/port): (202.1.1.1/0.0.0.0/0/0))PERMIT#pkts encaps: 3239, #pkts encrypt: 3239, #pkts digest 3239#pkts decaps: 3239, #pkts decrypt: 3239, #pkts verify 3239#send errors 0, #recv errors 0pkts encaps errors:#negoitate pkt drop: 0, #sab useless: 0, encap data fail: 0, compute hash fail: 0pkts decypto errors:#check reply wind fail: 0, #compute hash fail: 0, verify hash fail: 0#pkts detect send req: 0, recv reply: 0, recv req: 0, send reply: 0Inbound esp sas:spi:0xed941edf (3985907423)transform: esp-3des esp-md5-hmacin use settings{Tunnel Encaps,}crypto map 1 1sa timing: remaining key lifetime (k/sec): (4606684/3220)IV size: 0 bytesReplay detection support:YOutbound esp sas:spi:0x7046a103 (1883676931)transform: esp-3des esp-md5-hmacin use settings{Tunnel Encaps,}crypto map 1 1sa timing: remaining key lifetime (k/sec): (4606684/3220)IV size: 0 bytesReplay detection support:YR14#show crypto isakmp policyProtection suite of priority 1encryption algorithm: Three key triple DES.hash algorithm: Secure Hash Standardauthentication method: Pre-Shared KeyDiffie-Hellman group: #2 (1024 bit)lifetime: 86400 secondsDefault protection suiteencryption algorithm: DES - Data Encryption Standard (56 bit keys).hash algorithm: Secure Hash Standardauthentication method: Pre-Shared KeyDiffie-Hellman group: #1 (768 bit)lifetime: 86400 secondsR14#

相关新闻

终极指南:让老旧Mac免费升级最新macOS的OpenCore Legacy Patcher完整教程

终极指南:让老旧Mac免费升级最新macOS的OpenCore Legacy Patcher完整教程

终极指南:让老旧Mac免费升级最新macOS的OpenCore Legacy Patcher完整教程 【免费下载链接】OpenCore-Legacy-Patcher Experience macOS just like before 项目地址: https://gitcode.com/GitHub_Trending/op/OpenCore-Legacy-Patcher 你是否还在为老旧的Mac设…

2026/6/19 16:06:28阅读更多 →
自建策略每日运行日志自动存档程序,留存每一日策略运行参数与操作记录。

自建策略每日运行日志自动存档程序,留存每一日策略运行参数与操作记录。

策略每日运行日志自动存档程序(留存策略参数与操作记录)|教学级量化交易原型内容包含免责声明和风险提示,不荐股、不自动化交易、不引导开户、无任何引流。一、实际应用场景描述在智能证券投资课程中,策略运行日志&…

2026/6/19 16:06:28阅读更多 →
嵌入式GUI字体系统深度解析:从位图到TrueType的实战应用

嵌入式GUI字体系统深度解析:从位图到TrueType的实战应用

1. 嵌入式GUI字体系统:从位图到TrueType的深度解析与实战在嵌入式GUI开发里,字体渲染是个既基础又关键的环节。它直接决定了你的产品界面是“能用”还是“好用”。我经历过不少项目,从早期资源捉襟见肘的8位MCU,到如今功能复杂的3…

2026/6/19 16:06:28阅读更多 →
毫米波信道建模:视觉-射频跨模态创新技术解析

毫米波信道建模:视觉-射频跨模态创新技术解析

1. 毫米波信道建模的技术挑战与创新机遇毫米波通信作为5G及未来无线网络的核心技术,凭借其丰富的频谱资源(30-300GHz频段)能够提供高达10Gbps的传输速率和亚毫秒级延迟。这种特性使其成为增强现实(AR)、虚拟现实&#…

2026/6/19 17:31:38阅读更多 →
MC9S12KG128 ATD10B16CV3模块详解:从寄存器配置到实战应用

MC9S12KG128 ATD10B16CV3模块详解:从寄存器配置到实战应用

1. 项目概述与ATD模块核心价值在嵌入式系统开发,尤其是汽车电子和工业控制领域,我们经常需要将现实世界中的连续模拟信号,比如温度传感器的电压、油门踏板的位置信号或者电池组的电压,转换成微控制器能够理解和处理的数字量。这个…

2026/6/19 17:31:38阅读更多 →
MLOps生产化实战:让机器学习模型稳定运行18个月

MLOps生产化实战:让机器学习模型稳定运行18个月

1. 项目概述:当模型走出笔记本,真正开始“呼吸”现实世界我带过六支不同行业的ML落地团队,从支付风控到工业设备预测性维护,最常被问的问题不是“怎么调参”,而是:“模型上线第三天,为什么突然不…

2026/6/19 17:31:38阅读更多 →
如何通过 Claude Code 来写入 CSV 数据到 Elasticsearch

如何通过 Claude Code 来写入 CSV 数据到 Elasticsearch

在我之前的文章 “Elastic 的 AI agent skills”,我们谈到了如何安装所需要的 skills 到 Claude Code 里去。在今天的 demo 里,我们来展示如何把 CSV 数据写入到 Elasticsearch 中去。 https://www.bilibili.com/video/BV1Uejq6aEpw/准备数据 我们准备了…

2026/6/19 17:31:38阅读更多 →
从报错到成功:手把手教你用BiocManager搞定clusterProfiler安装全流程

从报错到成功:手把手教你用BiocManager搞定clusterProfiler安装全流程

1. 为什么install.packages()会失败? 第一次在RStudio里敲下install.packages("clusterProfiler")时,那个刺眼的红色报错信息让我愣了半天。明明其他普通R包都能正常安装,为什么这个包就提示"not available for this version …

2026/6/19 17:31:38阅读更多 →
AI落地难?用历史数据校准非消费场景的三步法

AI落地难?用历史数据校准非消费场景的三步法

1. 项目概述:当历史思维撞上AI浪潮,我们真正要解决的不是技术问题“History, AI, and Non-Consumption: Part I, Winter is Coming!”——这个标题乍看像一篇科技哲学随笔,又像某场行业闭门会的暗号,甚至有点《权力的游戏》式隐喻…

2026/6/19 17:26:38阅读更多 →
Photobucket付费墙背后:5美元买童年回忆却落得一场空!

Photobucket付费墙背后:5美元买童年回忆却落得一场空!

1. 付费墙初现如今身处万亿市值公司林立的时代,我们也不能轻易放弃5美元。就像Photobucket,它曾相当于过去的Imgur,我们小时候常把图片上传到这个网站,然后在各种论坛上分享链接,它简单好用,尽职尽责。但最…

2026/6/19 0:04:37阅读更多 →
如何在5分钟内掌握Mermaid Live Editor:实时图表编辑终极指南

如何在5分钟内掌握Mermaid Live Editor:实时图表编辑终极指南

如何在5分钟内掌握Mermaid Live Editor:实时图表编辑终极指南 【免费下载链接】mermaid-live-editor Edit, preview and share mermaid charts/diagrams. New implementation of the live editor. 项目地址: https://gitcode.com/GitHub_Trending/me/mermaid-live…

2026/6/19 0:04:37阅读更多 →
yuzu模拟器内存修改技术深度解析:金手指功能实现原理与实践指南

yuzu模拟器内存修改技术深度解析:金手指功能实现原理与实践指南

yuzu模拟器内存修改技术深度解析:金手指功能实现原理与实践指南 【免费下载链接】yuzu 项目地址: https://gitcode.com/GitHub_Trending/yuz/yuzu yuzu作为目前最流行的开源Nintendo Switch模拟器,不仅提供了完整的游戏运行环境,还内…

2026/6/19 0:04:37阅读更多 →