华为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 100.100.0.2 //不指定下一跳不通

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 100.100.0.1

相关推荐
黑十5 小时前
PyTorch 报 “no CUDA GPUs are available“ 怎么办?3 步排查
服务器·网络·人工智能·pytorch·python
updayday8548 小时前
客户附件不该发往旧邮箱,如何在发送前拦截 - Ping64 邮件安全管控
大数据·网络·数据库·安全·智能路由器
其实防守也摸鱼8 小时前
Chrome 扩展安全攻防实录:从攻击面到防御实践
开发语言·前端·网络·chrome·安全·web安全·php
小茬粥8 小时前
QEMU 宿主机网卡实例发现与采集脚本(标准 Linux / Proxmox VE 适配版)COLT_CMDB_QEMU_IFACE.sh
网络
redtank20008 小时前
纯血鸿蒙本地电子书阅读器实测:九格式支持、沉浸阅读与零联网隐私设计
华为·harmonyos
见合八方9 小时前
借助半导体光放大器实现功率预算超31dB的112.5Gbit/s长距无源光网络
网络·5g·soa·光通信·激光雷达·半导体光放大器
夜雪一千9 小时前
锐捷天蝎路由器WiFi优化设置教程:解决邻居WiFi干扰、远距离卡顿
网络·智能路由器
2301_780789669 小时前
深度伪造即服务:新型网络诈骗的“完美面具”与识别之道
java·网络·ddos
lazy H10 小时前
【计算机网络】第 15 篇:Java BIO、NIO 与高并发网络通信——从 Socket 理解 I/O 模型
网络·后端·tcp/ip·计算机网络·nio·408
huainingning10 小时前
华为E1专线使用与配置案例
华为