实验内容及拓扑图如下:

先进行子网划分如下:

192.168.1.0/24总地址

192.168.1.0 0000000/25——192.68.1.0/25 左区域

192.168.1.0 00 00000/27——192.168.1.0/27   骨干区域网段
192.168.1.0 01 00000/27——192.168.1.32/27 AR1环回
192.168.1.0 10 00000/27——192.168.1.64/27 AR2环回
192.168.1.0  11 00000/27——192.168.1.96/27 AR3环回

192.168.1.1 0000000/25——192.168.1.128/25 右区域

192.168.1.1 0 000000/26——192.168.1.128/26骨干区域网段
192.168.1.1 1 000000/26——备用

配置网关及环回地址

配置AR1 接口IP,环回地址

[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 27  //0/0/0IP地址
[r1-GigabitEthernet0/0/0]q[r1]interface loopback 0
[r1-LoopBack0]ip address 192.168.1.33 27  //环回地址
[r1-LoopBack0]q[r1]display ip interface briefInterface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              192.168.1.1/27       up         up
GigabitEthernet0/0/1              unassigned           down       down
GigabitEthernet0/0/2              unassigned           down       down
LoopBack0                         192.168.1.33/27      up         up(s)
NULL0                             unassigned           up         up(s) 

配置AR2 接口IP地址,环回地址

[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 27
[r2-GigabitEthernet0/0/0]q[r2]interface loopback 0
[r2-LoopBack0]ip address 192.168.1.65 27
[r2-LoopBack0]q[r2]display ip interface briefInterface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              192.168.1.2/27       up         up
GigabitEthernet0/0/1              unassigned           down       down
GigabitEthernet0/0/2              unassigned           down       down
LoopBack0                         192.168.1.65/27      up         up(s)
NULL0                             unassigned           up         up(s)  

配置AR3 接口IP地址,环回地址

[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.3 27
[r3-GigabitEthernet0/0/0]q[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.129 26
[r3-GigabitEthernet0/0/1]q[r3]interface loopback 0
[r3-LoopBack0]ip address 192.168.1.97 27
[r3-LoopBack0]q[r3]display ip interface briefInterface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              192.168.1.3/27       up         up
GigabitEthernet0/0/1              192.168.1.129/26     up         up
GigabitEthernet0/0/2              unassigned           down       down
LoopBack0                         192.168.1.97/27      up         up(s)
NULL0                             unassigned           up         up(s)  

配置AR4 接口IP地址,环回地址

[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.130 26
[r4-GigabitEthernet0/0/0]q[r4]interface loopback 0
[r4-LoopBack0]ip address 4.4.4.4 24
[r4-LoopBack0]q[r4]display ip interface briefInterface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              192.168.1.130/26     up         up
GigabitEthernet0/0/1              unassigned           down       down
GigabitEthernet0/0/2              unassigned           down       down
LoopBack0                         4.4.4.4/24           up         up(s)
NULL0                             unassigned           up         up(s) 

配置AR4的缺省路由

实现AR4环回不宣告也能ping通

[r4]ospf
[r4-ospf-1]default-r
[r4-ospf-1]default-route-advertise always

将AR1和AR2的优先级设置为0

目的:不参加选举,让AR3作为DR

AR1

[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ospf dr-priority 0

AR2

[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ospf dr-priority 0

启动OSPF——配置RID启动ospf、创建区域、宣告

AR1

[r1]ospf 1 router-id 192.168.1.33
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.33 0.0.0.0

AR2

[r2]ospf 1 router-id 192.168.1.65
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.65 0.0.0.0

AR3

[r3]ospf 1 router-id 192.168.1.97
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.97 0.0.0.0[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 192.168.1.129 0.0.0.0

AR4

[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]network 192.168.1.130 0.0.0.0

设置手工认证

两边的keyid必须一样

AR1

[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 9999

AR2

[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 9999

AR3

[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 9999[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 9999

AR4

[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 9999

手工汇总

实现减少路由条目

将area0的环回192.168.1.32/27,192.168.1.64/27,192.168.1.95/27

汇总为192.168.1.0/24

[r3]ospf
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.0

配置空接口

[r3]ip route-static 192.168.1.128 25 NULL 0
[r3]ip route-static 192.168.1.0 25 NULL 0

测试

[r1]ping 192.168.1.130PING 192.168.1.130: 56  data bytes, press CTRL_C to breakReply from 192.168.1.130: bytes=56 Sequence=1 ttl=254 time=40 msReply from 192.168.1.130: bytes=56 Sequence=2 ttl=254 time=40 msReply from 192.168.1.130: bytes=56 Sequence=3 ttl=254 time=60 ms--- 192.168.1.130 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 40/46/60 ms[r1]ping 4.4.4.4PING 4.4.4.4: 56  data bytes, press CTRL_C to breakReply from 4.4.4.4: bytes=56 Sequence=1 ttl=254 time=50 msReply from 4.4.4.4: bytes=56 Sequence=2 ttl=254 time=60 msReply from 4.4.4.4: bytes=56 Sequence=3 ttl=254 time=60 msReply from 4.4.4.4: bytes=56 Sequence=4 ttl=254 time=40 ms--- 4.4.4.4 ping statistics ---4 packet(s) transmitted4 packet(s) received0.00% packet lossround-trip min/avg/max = 40/52/60 ms[r1]ping 192.168.1.65PING 192.168.1.65: 56  data bytes, press CTRL_C to breakReply from 192.168.1.65: bytes=56 Sequence=1 ttl=255 time=60 msReply from 192.168.1.65: bytes=56 Sequence=2 ttl=255 time=50 msReply from 192.168.1.65: bytes=56 Sequence=3 ttl=255 time=60 ms--- 192.168.1.65 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 50/56/60 ms
[r2]ping 192.168.1.130PING 192.168.1.130: 56  data bytes, press CTRL_C to breakReply from 192.168.1.130: bytes=56 Sequence=1 ttl=254 time=50 msReply from 192.168.1.130: bytes=56 Sequence=2 ttl=254 time=50 msReply from 192.168.1.130: bytes=56 Sequence=3 ttl=254 time=50 ms--- 192.168.1.130 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 50/50/50 ms[r2]ping 192.168.1.97PING 192.168.1.97: 56  data bytes, press CTRL_C to breakReply from 192.168.1.97: bytes=56 Sequence=1 ttl=255 time=50 msReply from 192.168.1.97: bytes=56 Sequence=2 ttl=255 time=50 msReply from 192.168.1.97: bytes=56 Sequence=3 ttl=255 time=80 msReply from 192.168.1.97: bytes=56 Sequence=4 ttl=255 time=50 msReply from 192.168.1.97: bytes=56 Sequence=5 ttl=255 time=50 ms--- 192.168.1.97 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 50/56/80 ms[r2]ping 4.4.4.4PING 4.4.4.4: 56  data bytes, press CTRL_C to breakReply from 4.4.4.4: bytes=56 Sequence=1 ttl=254 time=40 msReply from 4.4.4.4: bytes=56 Sequence=2 ttl=254 time=30 msReply from 4.4.4.4: bytes=56 Sequence=3 ttl=254 time=50 ms--- 4.4.4.4 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 30/40/50 ms[r2]ping 192.168.1.33PING 192.168.1.33: 56  data bytes, press CTRL_C to breakReply from 192.168.1.33: bytes=56 Sequence=1 ttl=255 time=50 msReply from 192.168.1.33: bytes=56 Sequence=2 ttl=255 time=70 msReply from 192.168.1.33: bytes=56 Sequence=3 ttl=255 time=40 msReply from 192.168.1.33: bytes=56 Sequence=4 ttl=255 time=50 ms--- 192.168.1.33 ping statistics ---4 packet(s) transmitted4 packet(s) received0.00% packet lossround-trip min/avg/max = 40/52/70 m
[r3]ping 192.168.1.1PING 192.168.1.1: 56  data bytes, press CTRL_C to breakReply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=50 msReply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=40 msReply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=50 ms--- 192.168.1.1 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 40/46/50 ms[r3]ping 4.4.4.4PING 4.4.4.4: 56  data bytes, press CTRL_C to breakReply from 4.4.4.4: bytes=56 Sequence=1 ttl=255 time=30 msReply from 4.4.4.4: bytes=56 Sequence=2 ttl=255 time=20 msReply from 4.4.4.4: bytes=56 Sequence=3 ttl=255 time=20 ms--- 4.4.4.4 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 20/23/30 ms[r3]ping 192.168.1.130PING 192.168.1.130: 56  data bytes, press CTRL_C to breakReply from 192.168.1.130: bytes=56 Sequence=1 ttl=255 time=20 msReply from 192.168.1.130: bytes=56 Sequence=2 ttl=255 time=20 msReply from 192.168.1.130: bytes=56 Sequence=3 ttl=255 time=20 ms--- 192.168.1.130 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 20/20/20 ms[r3]ping 192.168.1.65PING 192.168.1.65: 56  data bytes, press CTRL_C to breakReply from 192.168.1.65: bytes=56 Sequence=1 ttl=255 time=40 msReply from 192.168.1.65: bytes=56 Sequence=2 ttl=255 time=70 msReply from 192.168.1.65: bytes=56 Sequence=3 ttl=255 time=50 ms--- 192.168.1.65 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 40/53/70 ms
[r4]ping 192.168.1.1PING 192.168.1.1: 56  data bytes, press CTRL_C to breakReply from 192.168.1.1: bytes=56 Sequence=1 ttl=254 time=40 msReply from 192.168.1.1: bytes=56 Sequence=2 ttl=254 time=50 msReply from 192.168.1.1: bytes=56 Sequence=3 ttl=254 time=60 ms--- 192.168.1.1 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 40/50/60 ms[r4]ping 192.168.1.65PING 192.168.1.65: 56  data bytes, press CTRL_C to breakReply from 192.168.1.65: bytes=56 Sequence=1 ttl=254 time=50 msReply from 192.168.1.65: bytes=56 Sequence=2 ttl=254 time=50 msReply from 192.168.1.65: bytes=56 Sequence=3 ttl=254 time=60 msReply from 192.168.1.65: bytes=56 Sequence=4 ttl=254 time=60 ms--- 192.168.1.65 ping statistics ---4 packet(s) transmitted4 packet(s) received0.00% packet lossround-trip min/avg/max = 50/55/60 ms[r4]ping 192.168.1.3PING 192.168.1.3: 56  data bytes, press CTRL_C to breakReply from 192.168.1.3: bytes=56 Sequence=1 ttl=255 time=30 msReply from 192.168.1.3: bytes=56 Sequence=2 ttl=255 time=20 msReply from 192.168.1.3: bytes=56 Sequence=3 ttl=255 time=20 ms--- 192.168.1.3 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 20/23/30 ms[r4]ping 192.168.1.33PING 192.168.1.33: 56  data bytes, press CTRL_C to breakReply from 192.168.1.33: bytes=56 Sequence=1 ttl=254 time=60 msReply from 192.168.1.33: bytes=56 Sequence=2 ttl=254 time=60 msReply from 192.168.1.33: bytes=56 Sequence=3 ttl=254 time=50 ms--- 192.168.1.33 ping statistics ---3 packet(s) transmitted3 packet(s) received0.00% packet lossround-trip min/avg/max = 50/56/60 ms

动态路由之OSPF协议综合实验相关推荐

  1. 路由引入ppp协议综合实验

    路由引入ppp协议综合实验 第一步,子网之间的互通 配置路由协议 在交换机配置rip协议的时候不要忘了net一下下面两台pc的网段 重要的是!!!要设置一条默认路由. 路由引入: 在交换机的里面选择一 ...

  2. cisco动态路由(OSPF协议)设计计算机网络课设/实验 (含.pkt文件)

    链接:https://pan.baidu.com/s/1YOpSsfM4vBYpsZqCOyDwOg 提取码:2222 ospf代码 show 路由配置 实验结果:可以互相通信

  3. 华为 eNSP 模拟器配置动态路由(ospf)

    华为 eNSP 模拟器配置动态路由 (ospf) 文章目录 一.实验步骤 1.配置主机 2.配置路由信息 3.相关命令 4.实验资料 一.实验步骤 配置两台主机的ip地址信息 配置路由的ip信息 启动 ...

  4. 7添加静态路由 hat red_不同VPC路由器通过静态路由、动态路由(OSPF)实现网络互通实战...

    作者: 李朗 前言 VPC网络基本上是每个云厂商都具备的功能,不同厂家构建VPC网络的实现方式和操作步骤不尽相同,但是基本目的都是想实现一套虚拟的专有网络.VPC网络是ZStack支持的网络类型之一, ...

  5. 华三ospf联动bfd_HCIE2020__路由交换专家__BFD综合实验

    1.1.1 关于本实验 本实验通过配置BFD与BGP协议联动及与VRRP协议联动,掌握BFD的功能和配置方法. 1.1.2 实验目的 理解BFD的工作原理. 掌握BFD与BGP联动的应用场景及配置方法 ...

  6. 动态路由RID ospf

    文章目录 动态路由 自治系统 RIP----路由信息协议 RIP工作原理 RIP算法 RIP计时器 RIPv1与RIPv2的区别 配置命令: 汇总网段 RIP版本不兼容问题 OSPF:开放式最短路径优 ...

  7. HCIP-IERS 部署企业级路由交换网络 - OSPF 协议基础

    目录 OSPF 协议基础OSPF ( Open Shortest Path First )开放式最短路径优先 前言 大型网络所发生的变化 RIP 在大型网络中部署所面临的问题 如何解决 RIP 的问题 ...

  8. 动态路由-距离矢量协议(DV之BGP、EIGRP、RIP)20210821

    BGP(边界网关协议)是很重要的路由协议,由于其路径属性我将其与RIP(路由信息协议)一起归类在DV协议大类. ps.由于是XMIND转DOC复制到CSDN...图片全部上传失败..服了(ˉ▽ˉ:). ...

  9. 一看就会的OSPF路由协议综合实验

    需求: 1)按拓扑中区域Area要求,在每台路由器启用OSPF,使得整个网络可以互连互通. n进程号Process ID配置为每台设备的主机编号,如R1配置为router ospf 1. n路由器ID ...

  10. eigrp与ospf的综合实验(还是要想想办法才做得出来哦)

    OSPF综合实验 1.要求EIGRP和OSPF相互通信. 2.要求区域2不能看到外部LSA. 3.要求区域1不能看到外部和区域间的LSA. 4.全网互通. EIGRP综合实验: 实验拓扑如上,在R0和 ...

最新文章

  1. SQLite3简单C++包装类源码示例
  2. OA办公系统使用之:Tomcat与mysql的几个常见问题
  3. javascript 操作日期 测试(注意浏览器兼容问题)
  4. 转:org.apache.maven.archiver.MavenArchiver.getManifest错误
  5. SpringMVC @Transactional的陷井大坑引发No Session found for current thread
  6. python逻辑表达式3+45and_python入门到精通(一)| python基础语法与各种运算符的使用...
  7. 解决IE8不支持数组的indexOf方法
  8. 【248天】跃迁之路——程序员高效学习方法论探索系列(实验阶段06-2017.10.11)...
  9. DRF基类APIView的子类GenericAPIView
  10. SQL数据库的创建及其详细操作(作业)
  11. 罗马音平假名中文可复制_怎么记也记不住? 轻松打好日文50音基础的4个方法...
  12. java进制转换工具(图形界面版)
  13. CSP2019普及组题解:公交换乘(C++)
  14. 为什么要学习多种编程语言
  15. 查看显卡型号命令_ubuntu查看显卡型号方法有哪些
  16. Python数据分析U3-matplotlib可视化高级
  17. 95%置信区间的含义_怎样理解置信区间,解释95%的置信区间
  18. 后端面试(一)计算机网络相关
  19. 图片预览(原生js实现)
  20. 开户功能遭入侵攻击,银行 App 数据安全如何保护?

热门文章

  1. 深度学习2.0-20.Keras高层API-metrics
  2. bert处理英文的词根处理
  3. pytorch GPU分布式训练 数据并行
  4. 几个知识蒸馏相关的BERT变体
  5. PostgreSQL逻辑优化——整体架构
  6. Oracle注入点信息基本检测
  7. 面向对象之需求分析要略
  8. oracle10g lsnrctl,Oracle10g 服务丢失处理办法
  9. 软件开发模型_为什么越来越多软件开发团队都放弃了瀑布模型?
  10. iphone降级_回顾降级系统恢复备份