HCIA--OSPF实验(复习)

实验拓扑:

实验思路:

1.规划IP,配置环回,接口IP

2.把R1,R2优先级改为0,让R1、R2放弃选举,

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

<r1>reset ospf process

Warning: The OSPF process will be reset. Continue? [Y/N]:y

注:若参选接口的优先级为0,表示退出选举,无需重启进程;

[r2]interface Eth0/0/0

[r2-Ethernet0/0/0]ospf dr-priority 2

3.在R4边界路由器上的OSPF协议中设置缺省路由,完成全网可达

        [r4]ospf 1

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

4.在ABR路由器上设置区域汇总,空接口防环

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

        在ABR路由器上做一个空行接口------目的:防止环路
        [r3]ip route-static 192.168.1.0 25 NULL 0

        ABR -- 区域边界路由器

5.保障更新安全,在R1R2R3骨干接口上设置认证

        [r1]interface GigabitEthernet0/0/1

        [r1-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456

  1. 认证  --直连邻居的接口加密即可,两端需要一致

        [r1]interface GigabitEthernet0/0/1

        [r1-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456

        邻居间的秘钥编号与密码均需一致

R1:

[Huawei]sysname r1
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 27
[r1-LoopBack0]q	
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 27
Jun  3 2024 15:12:02-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]

[r1]ospf 1 router-id 1.1.1.1	
[r1-ospf-1]area 0	
[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
Jun  3 2024 15:55:22-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.168.192, Neighb
orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r1-ospf-1-area-0.0.0.0]
Jun  3 2024 15:55:26-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.168.192, Neighb
orEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart) 

[r1-ospf-1-area-0.0.0.0]
Jun  3 2024 15:55:26-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.168.192, Neighb
orEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exc
hange) 
[r1-ospf-1-area-0.0.0.0]
Jun  3 2024 15:55:26-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.168.192, Neighb
orEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadi
ng) 
[r1-ospf-1-area-0.0.0.0]
Jun  3 2024 15:55:26-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.168.192, Neighb
orEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 
[r1-ospf-1-area-0.0.0.0]


放弃选举DR
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ospf dr-priority 0


在接口上进行加密
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456

R2:

[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r2-GigabitEthernet0/0/0]

 

 R3:


[r3]display ospf peer 

	 OSPF Process 1 with Router ID 3.3.3.3
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.3(GigabitEthernet0/0/0)'s neighbors
 Router ID: 1.1.1.1          Address: 192.168.1.1     
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 35  sec 
   Retrans timer interval: 0 
   Neighbor is up for 00:03:19     
   Authentication Sequence: [ 0 ] 

 Router ID: 2.2.2.2          Address: 192.168.1.2     
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 30  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:03:19     
   Authentication Sequence: [ 0 ] 

		 Neighbors 

 Area 0.0.0.1 interface 192.168.1.129(GigabitEthernet0/0/1)'s neighbors
 Router ID: 4.4.4.4          Address: 192.168.1.130   
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.129  BDR: 192.168.1.130  MTU: 0    
   Dead timer due in 35  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:01:40     
   Authentication Sequence: [ 0 ] 


[r3]display ospf peer brief 

	 OSPF Process 1 with Router ID 3.3.3.3
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 0.0.0.1          GigabitEthernet0/0/1             4.4.4.4          Full        
 ----------------------------------------------------------------------------



手工汇总
[r3]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.128

[r3-ospf-1-area-0.0.0.0]display ospf peer 

	 OSPF Process 1 with Router ID 3.3.3.3
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.3(GigabitEthernet0/0/0)'s neighbors
 Router ID: 1.1.1.1          Address: 192.168.1.1     
   State: Full  Mode:Nbr is  Slave  Priority: 0
   DR: 192.168.1.3  BDR: None   MTU: 0    
   Dead timer due in 37  sec 
   Retrans timer interval: 4 
   Neighbor is up for 00:14:45     
   Authentication Sequence: [ 0 ] 

 Router ID: 2.2.2.2          Address: 192.168.1.2     
   State: Full  Mode:Nbr is  Slave  Priority: 0
   DR: 192.168.1.3  BDR: None   MTU: 0    
   Dead timer due in 29  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:14:17     
   Authentication Sequence: [ 0 ] 

		 Neighbors 

 Area 0.0.0.1 interface 192.168.1.129(GigabitEthernet0/0/1)'s neighbors
 Router ID: 4.4.4.4          Address: 192.168.1.130   
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.129  BDR: 192.168.1.130  MTU: 0    
   Dead timer due in 36  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:23:29     
   Authentication Sequence: [ 0 ] 

[r3-ospf-1-area-0.0.0.0]display ospf peer brief 

	 OSPF Process 1 with Router ID 3.3.3.3
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 0.0.0.1          GigabitEthernet0/0/1             4.4.4.4          Full        
 ----------------------------------------------------------------------------
[r3-ospf-1-area-0.0.0.0]


在ABR路由器上做一个空行接口------目的:防止环路
[r3]ip route-static 192.168.1.0 25 NULL 0


[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r3-GigabitEthernet0/0/0]

R4:


[Huawei]sysname r4
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.130 25
[r4]interface LoopBack 0	
[r4-LoopBack0]ip address 4.4.4.4 24

[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
[r4-ospf-1-area-0.0.0.1]
 
[r4-ospf-1-area-0.0.0.1]ping  192.168.1.33
  PING 192.168.1.33: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.33: bytes=56 Sequence=1 ttl=254 time=60 ms
    Reply from 192.168.1.33: bytes=56 Sequence=2 ttl=254 time=70 ms
    Reply from 192.168.1.33: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 192.168.1.33: bytes=56 Sequence=4 ttl=254 time=40 ms
    Reply from 192.168.1.33: bytes=56 Sequence=5 ttl=254 time=30 ms


[r4]display ospf peer 

	 OSPF Process 1 with Router ID 4.4.4.4
		 Neighbors 

 Area 0.0.0.1 interface 192.168.1.130(GigabitEthernet0/0/0)'s neighbors
 Router ID: 3.3.3.3          Address: 192.168.1.129   
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.129  BDR: 192.168.1.130  MTU: 0    
   Dead timer due in 40  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:25:59     
   Authentication Sequence: [ 0 ] 

[r4]display ospf peer b	
[r4]display ospf peer brief 

	 OSPF Process 1 with Router ID 4.4.4.4
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.1          GigabitEthernet0/0/0             3.3.3.3          Full        
 ----------------------------------------------------------------------------


边界路由器设置缺省路由	
[r4]ospf 1
[r4-ospf-1]default-route-advertise always 
[r4-ospf-1]

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/676805.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【linux】线程同步和生产消费者模型

线程同步 当我们多线程访问同一个临界资源时&#xff0c;会造成并发访问一个临界资源&#xff0c;使得临界资源数据不安全&#xff0c;我们引入了锁的概念&#xff0c;解决了临界资源访问不安全的情况&#xff0c;对于线程而言竞争锁的能力有强有弱&#xff0c;对于之前就抢到…

图形学初识--颜色混合

文章目录 前言正文为什么要有颜色混合&#xff1f;颜色混合常见实现方式&#xff1f;上述颜色混合注意点 结尾&#xff1a;喜欢的小伙伴点点关注赞哦! 前言 本章节补充一下颜色混合的内容&#xff0c;主要包含&#xff1a;为什么要有颜色混合&#xff1f;颜色混合常实现方式&a…

外星人Alienware x17R1 原厂Windows11系统

装后恢复到您开箱的体验界面&#xff0c;包括所有原机所有驱动AWCC、Mydell、office、mcafee等所有预装软件。 最适合您电脑的系统&#xff0c;经厂家手调试最佳状态&#xff0c;性能与功耗直接拉满&#xff0c;体验最原汁原味的系统。 原厂系统下载网址&#xff1a;http://w…

全文检索-ElasticSearch

1.基本概念 1.Index索引 动词&#xff1a;相当于MySQL中的insert&#xff1b; 名词&#xff1a;相当于MySQL中的DataBase&#xff1b; 2.Type&#xff08;类型&#xff09; 在Index&#xff08;索引&#xff09;中&#xff0c;可以定义一个或多个类型 类似于MySQL中的Tab…

Docker大学生看了都会系列(二、2.1Mac通过Homebrew安装Docker)

系列文章目录 第一章 Docker介绍 第二章 2.1 Mac通过Homebrew安装Docker 第二章 2.2 CentOS安装Docker 文章目录 前言Mac通过Homebrew安装本机环境系统要求terminal命令安装查看安装信息配置阿里云镜像加速登陆阿里云配置加速地址其他国内加速地址 总结 前言 在上一章了解了Do…

步进电机双闭环细分控制(matlab仿真)内含课设等参考文件

1.1 步进电机工作原理 步进电机是一种用电脉冲进行控制&#xff0c;将电脉冲信号转换成相位移的电机&#xff0c;其机械位移和转速分别与输入电机绕组的脉冲个数和脉冲频率成正比,每一个脉冲信号可使步进电机旋转一个固定的角度。脉冲的数量决定了旋转的总角度&#xff0c;脉…

FebHost:什么是国别国外域名以及用途?

在数字时代的浪潮中&#xff0c;互联网如同一张无形的网&#xff0c;将全球的人们紧密相连。尽管世界因此变得“更小”&#xff0c;但在网络上展示个人或企业身份时&#xff0c;标明国家归属或地理位置依然显得格外重要。今天&#xff0c;我们将深入探讨国别域名的重要性、使用…

查看所用数据库的版本

通过查询 SELECT VERSION();

java面试题及答案2024,java2024最新面试题及答案(之二)

四、反射 57. 什么是反射&#xff1f; 反射主要是指程序可以访问、检测和修改它本身状态或行为的一种能力 Java反射&#xff1a; 在Java运行时环境中&#xff0c;对于任意一个类&#xff0c;能否知道这个类有哪些属性和方法&#xff1f;对于任意一个对象&#xff0c;能否调…

顺序表的讲解与实现

顺序表的讲解与实现 一、顺序表的概念及结构二、顺序表分类顺序表和数组的区别顺序表分类静态顺序表动态顺序表 三、动态顺序表的实现(使用VS2022)1.初始化、销毁、打印内容2.检查扩容3.尾部插入、尾部删除、头部插入、头部删除尾部插入尾部删除头部插入头部删除 4.指定插入、指…

Go语言 几种常见的IO模型用法 和 netpoll与原生GoNet对比

【go基础】16.I/O模型与网络轮询器netpoller_go中的多路io复用模型-CSDN博客 字节开源的netPoll多路复用器源码解析-CSDN博客 一、几种常见的IO模型 1. 阻塞I/O (1) 解释&#xff1a; 用户调用如accept、read等系统调用&#xff0c;向内核发起I/O请求后&#xff0c;应用程序…

装机必备——鲁大师安装教程

装机必备——鲁大师安装教程 软件下载 软件名称&#xff1a;鲁大师 软件语言&#xff1a;简体中文 软件大小&#xff1a;144.75M系统要求&#xff1a;Windows7或更高&#xff0c; 32/64位操作系统 硬件要求&#xff1a;CPU2GHz &#xff0c;RAM2G或更高 下载通道①迅雷云盘丨…

探究 Meme 的金融与社交属性

原文标题&#xff1a;《A Social and Financial Study of Memecoins》撰文&#xff1a;Andrew Hong编译&#xff1a;Chris&#xff0c;Techub News 每一个市场周期都伴随着 Meme 代币的出现。一群人围绕着某个 Meme 集结起来&#xff0c;暂时抬高了某个资产的价格&#xff08;从…

YOLOv5白皮书-第Y5周:yolo.py文件解读

&#x1f368; 本文为&#x1f517;365天深度学习训练营 中的学习记录博客&#x1f356; 原作者&#xff1a;K同学啊 一、环境 语言&#xff1a;Python3、Pytorch开发环境电脑系统&#xff1a;Windows 10语言环境&#xff1a;Python 3.9.2编译器&#xff1a;VS Code显卡&#…

LeetCode刷题之HOT100之组合总和

2024/6/3 周一&#xff0c;工作日的第一天。昨晚梦到被导师说去实验室不积极哈哈哈&#xff0c;风扇开到二级&#xff0c;早上被吹醒。买的书马上快要到了。上午刚来准备刷题&#xff0c;结果去搞了一下数据库sql&#xff0c;做的差不多了&#xff0c;还差点格式转换就差不多出…

暴力数据结构之排序大杂烩

1. 冒泡排序&#xff1a;O(N^2) 逻辑解析&#xff1a; 冒泡排序并没有什么实际意义&#xff0c;但是有教学意义&#xff0c;相信大部分小白在学习的初期第一个接触的排序就是冒泡排序。那么接下来我们了解一下他的底层逻辑&#xff1a; 冒泡排序顾名思义就是将最大&#xff08…

力扣 101. 对称二叉树

给你一个二叉树的根节点 root &#xff0c; 检查它是否轴对称。 /*** Definition for a binary tree node.* struct TreeNode {* int val;* struct TreeNode *left;* struct TreeNode *right;* };*/ bool check(struct TreeNode* L,struct TreeNode* R){if(!L&…

匠心独运,B 端系统 UI 演绎华章之美

匠心独运&#xff0c;B 端系统 UI 演绎华章之美

kettle从入门到精通 第六十四课 ETL之kettle kettle中执行SQL脚本步骤,使用需当心

1、群里有不定时会有同学反馈执行SQL脚本步骤使用有问题&#xff0c;那么咱们今天一起来学习下该步骤。trans中的执行SQL脚本有两方面功能&#xff0c;使用时需小心&#xff0c;不然很容易踩坑。 官方定义&#xff1a; 翻译&#xff1a; 您可以使用此步骤执行 SQL 脚本&#…

kafka集群内外网分流方案——筑梦之路

前言 在现代分布式系统架构中&#xff0c;Kafka作为一款高性能的消息队列系统&#xff0c;广泛应用于大数据处理、实时流处理以及微服务间的异步通信场景。特别是往往企业级应用中&#xff0c;业务网段和内网通信网段不是同一个网段&#xff0c;内网的机器想要访问业务数据只能…