当前位置: 首页 > news >正文

华为gre隧道全部跑静态路由

在这里插入图片描述

最终实现:

1、pc1能用nat上网ping能pc3
2、pc1能通过gre访问pc2
3、全部用静态路由做,没有用ospf,如果要用ospf,那么两边除了路由器上跑ospf,核心交换机也得用ospf

r2配置:

acl number 3000
rule 5 deny gre //把要gre的数据先拿掉不做nat
rule 10 permit ip

interface GigabitEthernet0/0/0
ip address 100.0.0.2 255.255.255.0
nat outbound 3000 //上外网nat

interface GigabitEthernet0/0/1
ip address 10.0.0.1 255.255.255.0

interface GigabitEthernet0/0/2

interface Tunnel0/0/0
ip address 100.100.0.1 255.255.255.0
tunnel-protocol gre
keepalive
source 100.0.0.2
destination 200.0.0.2
gre key 6666
gre checksum

ip route-static 0.0.0.0 0.0.0.0 100.0.0.1 //外网默认路由
ip route-static 172.16.0.0 255.255.255.0 Tunnel0/0/0
ip route-static 192.168.0.0 255.255.255.0 10.0.0.2 //内网回程路由

R3配置:

interface GigabitEthernet0/0/0
ip address 200.0.0.2 255.255.255.0

interface GigabitEthernet0/0/1
ip address 3.3.3.1 255.255.255.0

interface GigabitEthernet0/0/2

interface NULL0

interface Tunnel0/0/0
ip address 100.100.0.2 255.255.255.0
tunnel-protocol gre
keepalive
source 200.0.0.2
destination 100.0.0.2
gre key 6666
gre checksum

ip route-static 0.0.0.0 0.0.0.0 200.0.0.1
ip route-static 172.16.0.0 255.255.255.0 3.3.3.3
ip route-static 192.168.0.0 255.255.255.0 Tunnel0/0/0

http://www.lryc.cn/news/266480.html

相关文章:

  • 【c++】入门1
  • Python之Django项目的功能配置
  • P4 音频知识点——PCM音频原始数据
  • 解决Electron中WebView加载部分HTTPS页面白屏的方法
  • 【Java中创建对象的方式有哪些?】
  • npm使用详解(好吧好吧是粗解)
  • uniapp自定义头部导航怎么实现?
  • 什么是 Dubbo?它有哪些核心功能?
  • (2021|CoRR,AugCLIP,优化)FuseDream:通过改进的 CLIP+GAN 空间优化实现免训练文本到图像生成
  • python pip安装依赖的常用软件源
  • 避免大M取值过大引起的数值问题
  • 史密斯圆图的使用
  • 可重复读解决了哪些问题? 对 SQL 慢查询会考虑哪些优化 ?
  • 从0开始python学习-35.allure报告企业定制
  • 蓝桥杯2020年10月青少组Python程序设计省赛真题
  • 【数据结构】布隆过滤器原理详解及其代码实现
  • Qt中实现短信验证码功能
  • Redis-运维
  • Qt制作定时关机小程序
  • LeetCode day30
  • 数据分析基础之《numpy(5)—合并与分割》
  • centos 安装 Miniconda
  • 第二百二十六回
  • ubuntu常用指令
  • Quartz.NET 事件监听器
  • 2024-AI人工智能学习-安装了pip install pydot但是还是报错
  • 在使用mapstruct,想忽略掉List<DTO>字段里面的,`data` 字段的映射, 如何写ignore: 使用@IterableMapping
  • ansible-playbook的Temlates模块 tags模块 Roles模块
  • Canal使用详解
  • 【经典LeetCode算法题目专栏分类】【第8期】滑动窗口:最小覆盖子串、字符串排列、找所有字母异位词、 最长无重复子串