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

静态路由协议实验综合实验

需求:

1、除R5的换回地址已固定外,整个其他所有的网段基于192.168.1.0/24进行合理的IP地址划分。

2、R1-R4每台路由器存在两个环回接口,用于模拟连接PC的网段;地址也在192.168.1.0/24这个网络范围内。

3、R1-R4上不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问。

4、全网可达,尽量减少每台路由器路由条目的数量;避免环路出现。

5、R4与R5之间,正常1000M链路通信,故障时自动改为100M。

第一步、划分IP地址并配置。

由题意得,共划分五个网段即可,干路一个网段,其他四台路由器各占一个网段,则需要借3位:

1、192.168.1.0/27(干路)

每段链路仅需要两个IP地址就够了,所以继续借位借到30位。

①192.168.1.0/30

②192.168.1.4/30

③192.168.1.8/30

④192.168.1.12/30

⑤192.168.1.16/30

⑥192.168.1.20/30

又因为每个路由器需要用到两个网段,则继续借一位。(每个路由的两个环回地址分别用其网段的第一个可用IP地址)

2、192.168.1.32/27(R1)

①192.168.1.32/28

②192.168.1.48/28

3、192.168.1.64/27(R2)

①192.168.1.64/28

②192.168.1.80/28

4、192.168.1.96/27(R3)

①192.168.1.96/28

②192.168.1.112/28

5、192.168.1.128/27(R4)

①192.168.1.128/28

②192.168.1.144/28

第二步、写静态路由

[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.10
[r1]ip route-static 192.168.1.4 30 192.168.1.2  
[r1]ip route-static 192.168.1.12 30 192.168.1.10
[r1]ip route-static 192.168.1.128 27 192.168.1.10
[r1]ip route-static 192.168.1.128 27 192.168.1.2 
[r1]ip route-static 192.168.1.20 30 192.168.1.2 
[r1]ip route-static 192.168.1.16 30 192.168.1.10[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.8 30 192.168.1.1 
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.6
[r2]ip route-static 192.168.1.12 30 192.168.1.6
[r2]ip route-static 192.168.1.128 27 192.168.1.6
[r2]ip route-static 192.168.1.20 30 192.168.1.6 
[r2]ip route-static 192.168.1.16 30 192.168.1.6[r3]ip route-static 192.168.1.32 28 192.168.1.9
[r3]ip route-static 192.168.1.0 30 192.168.1.9 
[r3]ip route-static 192.168.1.64 27 192.168.1.9
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[r3]ip route-static 192.168.1.4 30 192.168.1.14  
[r3]ip route-static 192.168.1.16 30 192.168.1.14
[r3]ip route-static 192.168.1.20 30 192.168.1.14[r4]ip route-static 192.168.1.64 27 192.168.1.5
[r4]ip route-static 192.168.1.32 27 192.168.1.5
[r4]ip route-static 192.168.1.0 30 192.168.1.5 
[r4]ip route-static 192.168.1.8 30 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip route-static 192.168.1.96 27 192.168.1.13[r5]ip route-static 192.168.1.32 27 192.168.1.21
[r5]ip route-static 192.168.1.64 27 192.168.1.21
[r5]ip route-static 192.168.1.96 27 192.168.1.21
[r5]ip route-static 192.168.1.128 27 192.168.1.21
[r5]ip route-static 192.168.1.32 27 192.168.1.17 
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.21  
[r5]ip route-static 192.168.1.4 30 192.168.1.21
[r5]ip route-static 192.168.1.8 30 192.168.1.21
[r5]ip route-static 192.168.1.12 30 192.168.1.21
[r5]ip route-static 192.168.1.0 30 192.168.1.17 
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17

第三步、写缺省路由

[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.10[r2]ip route-static 0.0.0.0 0 192.168.1.6[r3]ip route-static 0.0.0.0 0 192.168.1.14[r4]ip route-static 0.0.0.0 0 192.168.1.22
[r4]ip route-static 0.0.0.0 0 192.168.1.18

实现全网可达,且为写指向5.5.5.0/24网段的静态路由。

第四步、在手工汇总的路由器上写空接口环回地址

[r1]ip route-static 192.168.1.32 27 NULL 0[r2]ip route-static 192.168.1.64 27 NULL 0[r3]ip route-static 192.168.1.96 27 NULL 0[r4]ip route-static 192.168.1.128 27 NULL 0

第五步、改变线路的优先级。

[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61

实验完成。

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

相关文章:

  • qt MVC软件设计模式
  • 代码随想录刷题随记15-二叉树回溯
  • 基于SpringBoot Vue养老院管理
  • 盘点编程方法论中的一些思想
  • 通过电机转速计算主轴旋转单圈所需时间(CODESYS ST代码)
  • 多线程的入门(二)线程实现与初步使用
  • 数据结构(初阶)第二节:顺序表
  • 鸿蒙OS元服务开发:【(Stage模型)设置应用主窗口】
  • lua学习笔记6(经典问题输出99乘法表)
  • 物联网行业中,我们如何选择数据库?
  • openstack云计算(一)————openstack安装教程,创建空白虚拟机,虚拟机的环境准备
  • Linux存储的基本管理
  • Python yield解析:深入理解生成器的魔力
  • 【Linux】GCCGDB
  • InternLM2-Chat-1.8B 模型测试
  • Flutter 关键字
  • Java常用API之Collections类解读
  • KV260 BOOT.BIN更新 ubuntu22.04 netplan修改IP
  • Android 代码自定义drawble文件实现View圆角背景
  • C#实现Word文档转Markdown格式(Doc、Docx、RTF、XML、WPS等)
  • 信息系统架构设计-以服务为中心的企业整合实践
  • mysql知识点梳理
  • 版本排序,(如果 版本 是 1,1a,1.1a, 2, 2c , 1c , 1.2a, 3 , 5b , 5)进行排序
  • Google视觉机器人超级汇总:从RT、RT-2到AutoRT、SARA-RT、RT-Trajectory
  • python笔记(9)Dictionary(字典)
  • 蓝桥杯嵌入式总结
  • 渗透测试:数据库UDF提权(linux)
  • java算法day45 | 动态规划part07 ● 70. 爬楼梯 (进阶) ● 322. 零钱兑换 ● 279.完全平方数
  • HuggingFace踩坑记录-连不上,根本连不上
  • 面试题:Spring Boot Starter的功能与使用场景