OSPF中配置缺省路由实验简述

OSPF中配置缺省路由 实验简述
缺省路由(Default Route)是指在路由表中没有匹配到目标网络 的情况下,将数据包发送到默认网关的路由

通常在边界路由器或者默认网关上配置。当一个路由器收到一个数据包时,它会首先查找路由表以确定数据包的目标网络。

需求 :R2 R3均需要访问销售部和财务部,但不知道销售部和财务部网段,

配置缺省路由,使数据报文走链路1和2,链路3做为备份链路。

实验拓扑图

实验基础配置:

销售部电脑:192.168.1.100/24/192.168.1.254

财务部电脑:192.168.2.100/24 /192.168.2.254

r1:

sys

sysname r1

undo info enable

int g0/0/1

ip add 12.1.1.1 16

quit

int g0/0/2

ip add 12.2.2.1 16

quit

int g0/0/3

ip add 12.3.3.1 16

quit

int e0/0/0

ip add 192.168.1.254 24

quit

int e0/0/1

ip add 192.168.2.254 24

quit

ospf router-id 1.1.1.1

area 0

network 12.1.1.0 0.0.255.255

network 1.1.1.1 0.0.0.0

network 12.2.2.0 0.0.255.255

network 12.3.3.0 0.0.255.255

quit

quit

r2:

sys

sysname r2

undo info enable

int g0/0/1

ip add 12.1.1.2 16

quit

int g0/0/2

ip add 12.2.2.2 16

quit

int g0/0/3

ip add 12.3.3.2 16

quit

int g0/0/0

ip add 23.1.1.2 16

quit

ospf router-id 2.2.2.2

area 0

network 12.1.1.0 0.0.255.255

network 23.1.1.0 0.0.255.255

network 2.2.2.2 0.0.0.0

network 12.2.2.0 0.0.255.255

network 12.3.3.0 0.0.255.255

quit

quit
ip route-static 0.0.0.0 0 12.1.1.1 配置缺省路由
ip route-static 0.0.0.0 0 12.2.2.1 配置缺省路由
ip route-static 0.0.0.0 0 12.3.3.1 pre 100 tag 100333 配置缺省路由

r3:

sys

sysname r3

undo info enable

int g0/0/1

ip add 23.1.1.3 16

quit

ospf router-id 3.3.3.3

area 0

network 23.1.1.0 0.0.255.255

network 3.3.3.3 0.0.0.0

quit

ip route-static 0.0.0.0 0 23.1.1.2 配置缺省路由

配置r1 -r3完成,在r2上查看全局路由表,测试与销售部和财务部连通性


配置r1 -r3完成,在r3上查看全局路由表,测试与销售部和财务部连通性

实验完成。

相关推荐
Sheffield33 分钟前
Alpine是什么,为什么是Docker首选?
linux·docker·容器
Johny_Zhao19 小时前
centos7安装部署openclaw
linux·人工智能·信息安全·云计算·yum源·系统运维·openclaw
haibindev19 小时前
在 Windows+WSL2 上部署 OpenClaw AI员工的实践与踩坑
linux·wsl2·openclaw
0xDevNull2 天前
Linux切换JDK版本详细教程
linux
进击的丸子2 天前
虹软人脸服务器版SDK(Linux/ARM Pro)多线程调用及性能优化
linux·数据库·后端
茶杯梦轩2 天前
从零起步学习RabbitMQ || 第二章:RabbitMQ 深入理解概念 Producer、Consumer、Exchange、Queue 与企业实战案例
服务器·后端·消息队列
Johny_Zhao3 天前
OpenClaw安装部署教程
linux·人工智能·ai·云计算·系统运维·openclaw
YuMiao4 天前
gstatic连接问题导致Google Gemini / Studio页面乱码或图标缺失问题
服务器·网络协议
chlk1235 天前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统