HCNA实验OSPF基础
1、拓扑图
方法:
1.配置接口IP 2.配置OSPF协议:
[R2]ospf 100
[R2-ospf-100]area 0
[R2-ospf-100-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R2-ospf-100-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[R2-ospf-100-area-0.0.0.0]quit
2、R1配置
The device is running!
####################
<Huawei>
Dec ::-: Huawei %%01IFPDT//IF_STATE(l)[]:Interface GigabitEt
hernet0// has turned into UP state.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn R1
[R1]int
[R1]interface g0//
[R1-GigabitEthernet0//]ip add 12.1.1.1
Dec ::-: R1 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R1-GigabitEthernet0//]q
[R1]
[R1]
[R1]
[R1]osfp
^
Error: Unrecognized command found at '^' position.
[R1]os
[R1]ospf
[R1-ospf-]are
[R1-ospf-]area
[R1-ospf--area-0.0.0.0]net
[R1-ospf--area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R1-ospf--area-0.0.0.0]q
[R1-ospf-]q
[R1]
Dec ::-: R1 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.12, Neighbo
rEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[R1]
Dec ::-: R1 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.12, Neighbo
rEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)
[R1]
Dec ::-: R1 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.12, Neighbo
rEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exch
ange)
[R1]
Dec ::-: R1 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.12, Neighbo
rEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadin
g)
[R1]
Dec ::-: R1 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.12, Neighbo
rEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[R1] Please check whether system data has been changed, and save data in time Configuration console time out, please press any key to log on
3、R2配置
The device is running!
######
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn R2
[R2]int
[R2]interface g0//
[R2-GigabitEthernet0//]ip add 12.1.1.2
Dec ::-: R2 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R2-GigabitEthernet0//]
[R2-GigabitEthernet0//]int
[R2-GigabitEthernet0//]int g0//
[R2-GigabitEthernet0//]ip add 23.1.1.2
Dec ::-: R2 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R2-GigabitEthernet0//]q
[R2]osf
[R2]osp
[R2]ospf
[R2-ospf-]are
[R2-ospf-]area
[R2-ospf--area-0.0.0.0]net
[R2-ospf--area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R2-ospf--area-0.0.0.0]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=1.1.1.12, Neighbo
rEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[R2-ospf--area-0.0.0.0]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=1.1.1.12, Neighbo
rEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way)
[R2-ospf--area-0.0.0.0]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=1.1.1.12, Neighbo
rEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart)
[R2-ospf--area-0.0.0.0]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=1.1.1.12, Neighbo
rEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exch
ange)
[R2-ospf--area-0.0.0.0]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=1.1.1.12, Neighbo
rEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadin
g)
[R2-ospf--area-0.0.0.0]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=1.1.1.12, Neighbo
rEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[R2-ospf--area-0.0.0.0]
[R2-ospf--area-0.0.0.0]net
[R2-ospf--area-0.0.0.0]network 23.1.1.0 0.0.0.255
[R2-ospf--area-0.0.0.0]q
[R2-ospf-]q
[R2]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=, NeighborAddress=3.1.1.23, Neighb
orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[R2]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=, NeighborAddress=3.1.1.23, Neighb
orEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart) [R2]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=, NeighborAddress=3.1.1.23, Neighb
orEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exc
hange)
[R2]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=, NeighborAddress=3.1.1.23, Neighb
orEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadi
ng)
[R2]
Dec ::-: R2 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=, NeighborAddress=3.1.1.23, Neighb
orEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[R2]
4、R3配置
The device is running!
######################
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname
^
Error:Incomplete command found at '^' position.
[Huawei]sysname R3
[R3]int
[R3]interface g0//
[R3-GigabitEthernet0//]ip add 23.1.1.3
Dec ::-: R3 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[R3-GigabitEthernet0//]q
[R3]os
[R3]ospf
[R3-ospf-]ar
[R3-ospf-]are
[R3-ospf-]area
[R3-ospf--area-0.0.0.0]net
[R3-ospf--area-0.0.0.0]network 23.1.1.0 0.0.0.255
[R3-ospf--area-0.0.0.0]
Dec ::-: R3 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.23, Neighbo
rEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[R3-ospf--area-0.0.0.0]
Dec ::-: R3 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.23, Neighbo
rEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way)
[R3-ospf--area-0.0.0.0]
Dec ::-: R3 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.23, Neighbo
rEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart)
[R3-ospf--area-0.0.0.0]
Dec ::-: R3 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.23, Neighbo
rEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exch
ange)
[R3-ospf--area-0.0.0.0]
Dec ::-: R3 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.23, Neighbo
rEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadin
g)
[R3-ospf--area-0.0.0.0]
Dec ::-: R3 %%01OSPF//NBR_CHANGE_E(l)[]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=, NeighborAddress=2.1.1.23, Neighbo
rEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[R3-ospf--area-0.0.0.0]q
[R3-ospf-]q
[R3]
5、测试结果
R1
<R1>dis ospf peer OSPF Process 100 with Router ID 12.1.1.1
Neighbors Area 0.0.0.0 interface 12.1.1.1(GigabitEthernet0/0/0)'s neighbors
Router ID: 12.1.1.2 Address: 12.1.1.2
State: Full Mode:Nbr is Master Priority: 1
DR: 12.1.1.1 BDR: 12.1.1.2 MTU: 0
Dead timer due in 39 sec
Retrans timer interval: 5
Neighbor is up for 00:06:44
Authentication Sequence: [ 0 ] <R1>dis ip rou
<R1>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8 Destination/Mask Proto Pre Cost Flags NextHop Interface 12.1.1.0/24 Direct 0 0 D 12.1.1.1 GigabitEthernet
0/0/0
12.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
12.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
23.1.1.0/24 OSPF 10 2 D 12.1.1.2 GigabitEthernet
0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <R1>dis ip rou
<R1>dis ip routing-table pro
<R1>dis ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 1 Routes : 1 OSPF routing table status : <Active>
Destinations : 1 Routes : 1 Destination/Mask Proto Pre Cost Flags NextHop Interface 23.1.1.0/24 OSPF 10 2 D 12.1.1.2 GigabitEthernet
0/0/0 OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0 <R1>
r2
<R2>dis ospf peer
OSPF Process with Router ID 12.1.1.2
Neighbors Area 0.0.0.0 interface 12.1.1.2(GigabitEthernet0//)'s neighbors
Router ID: 12.1.1.1 Address: 12.1.1.1
State: Full Mode:Nbr is Slave Priority:
DR: 12.1.1.1 BDR: 12.1.1.2 MTU:
Dead timer due in sec
Retrans timer interval:
Neighbor is up for ::
Authentication Sequence: [ ] Neighbors Area 0.0.0.0 interface 23.1.1.2(GigabitEthernet0//)'s neighbors
Router ID: 23.1.1.3 Address: 23.1.1.3
State: Full Mode:Nbr is Master Priority:
DR: 23.1.1.2 BDR: 23.1.1.3 MTU:
Dead timer due in sec
Retrans timer interval:
Neighbor is up for ::
Authentication Sequence: [ ]
R3
[R3]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8 Destination/Mask Proto Pre Cost Flags NextHop Interface 12.1.1.0/24 OSPF 10 2 D 23.1.1.2 GigabitEthernet
0/0/1
23.1.1.0/24 Direct 0 0 D 23.1.1.3 GigabitEthernet
0/0/1
23.1.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
23.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 [R3]dis ospf pee
[R3]dis ospf peer OSPF Process 100 with Router ID 23.1.1.3
Neighbors Area 0.0.0.0 interface 23.1.1.3(GigabitEthernet0/0/1)'s neighbors
Router ID: 12.1.1.2 Address: 23.1.1.2
State: Full Mode:Nbr is Slave Priority: 1
DR: 23.1.1.2 BDR: 23.1.1.3 MTU: 0
Dead timer due in 38 sec
Retrans timer interval: 5
Neighbor is up for 00:08:44
Authentication Sequence: [ 0 ] [R3]dis ip rou
[R3]dis ip routing-table pr
[R3]dis ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 1 Routes : 1 OSPF routing table status : <Active>
Destinations : 1 Routes : 1 Destination/Mask Proto Pre Cost Flags NextHop Interface 2.1.1.0/24 OSPF 10 2 D 23.1.1.2 GigabitEthernet
0/0/1 OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
HCNA实验OSPF基础的更多相关文章
- OSPF基础介绍
OSPF基础介绍 一.RIP的缺陷 1.以跳数评估的路由并非最优路径 2.最大跳数16导致网络尺度小 3.收敛速度慢 4.更新发送全部路由表浪费网络资源 二.OSPF基本原理 1.什么是OSPF a& ...
- OSPF 基础实验
一.环境准备 1. 软件:GNS3 2. 路由:c7200 二.实验操作 实验要求: 1.掌握多区域的 OSPF 配置方法. 2.区别不同区域的路由. 3.掌握 OSPF 的路由汇总配置. 4.掌握 ...
- HCNA Routing&Switching之动态路由协议OSPF基础(二)
前文我们主要了解了OSPF的区域.区域分类.路由器类型.OSPF的核心工作流程,回顾请参考:https://www.cnblogs.com/qiuhom-1874/p/15025533.html:今天 ...
- HCNA Routing&Switching之动态路由协议OSPF基础(一)
前文我们了解了基于路径矢量算法的动态路由协议RIP防环以及度量值的修改相关话题,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/15012895.html:今天我 ...
- 实验楼实验——LINUX基础入门
第一节 Linux简介 一.Linux的历史: 1965 年,Bell 实验室.MIT.GE(通用电气公司)准备开发 Multics 系统,为了同时支持 300 个终端访问主机,但是 1969 年失败 ...
- 路由器基础配置之ospf基础配置
我们将以上面的拓扑图进行本次ospf的实验,目的是能当三台pc机互通 先配置好pc机的IP地址,注意一定要给pc机设置好网关,接下来配置路由器的IP地址 router4 enable 进入特权模式 c ...
- Linux 实验一 基础实践
Linux 实践一 1:软件源的维护方法 删掉DEB打头的 在命令行中输入命令时,可以用命令补全的方法. 下载完成后,使用sudo dpkg-i skype.deb 来完成安装. 2:掌握Linux ...
- HCNA修改OSPF基准带宽
1.拓扑图 2.R1配置ip开启OSPF The device is running! <Huawei>sysEnter system view, return user view wit ...
- java实验程序基础中的问题总结 java图形化界面
一,课程中的问题 1,知道程序实现的大体框架,但是不能具体到每一个细节,这需要平时的积累. 2,在不同文件夹中定义的类之间有没有联系,类与类之间可以通过接口相互联系. 3,如何在一个对话框中显示文本, ...
随机推荐
- org.hibernate.QueryException: Unable to resolve path [SecWilldosetdate.name],xxxxxxxx...异常处理
今天在写hql语句的时候出现了这个错误,然后一直运行到执行hql这儿就出错了.页面报500. 原hql如下: String hql = "from SecWilldosetdate wher ...
- hdu 1754 I Hate It 线段树基础题
Problem Description 很多学校流行一种比较的习惯.老师们很喜欢询问,从某某到某某当中,分数最高的是多少. 这让很多学生很反感. 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求, ...
- KM算法(运用篇)
传送门:KM算法---理解篇 最佳匹配 什么是完美匹配 如果一个二分图,X部和Y部的顶点数相等,若存在一个匹配包含X部与Y部的所有顶点,则称为完美匹配. 换句话说:若二分图X部的每一个顶点都与Y中的一 ...
- 坐标&接龙型动态规划 - 20181026
109. Triangle 此题还可以用DFS,记忆化搜索去做,二刷实现 public class Solution { /** * @param triangle: a list of lists ...
- PIE SDK矢量数据项查看
1. 功能简介 矢量数据由大量要素信息构成,矢量数据项查看可以看到数据的属性表,下面就基于PIE SDK,介绍矢量数据项查看功能的实现. 2. 功能实现说明 2.1. 实现思路及原理说明 第一步 加载 ...
- linux + eclipse C语言 开发环境搭建
经常与linux系统打交道,了解学习一下C语言,下载eclipse c/c++ linux版,直接在虚拟机linux系统上安装http://www.eclipse.org/downloads/pack ...
- vue中使用对非表单元素使用contenteditable的问题
先说下问题,再上解决方案: span编辑时有多余空格和回车会影响样式(我用的是span便以此为例) 代码:(有换行符) 效果图: 代码:(无换行符) 效果图: 当在span标签的contentedit ...
- centos7.3下安装redis3.2 yum安装
1.进入centos 2.运行:yum install redis 3.安装完成后,选择y,确认 4.进入:cd /etc/;vi redis.conf 将,daemonize 修改为yes,并且添加 ...
- 爬虫beautifulsoup实践
爬虫beautifulsoup实践: 目的:在https://unsplash.com/上爬取图片并保存到本地文件夹里. 一.观察response.首先,在Chrome浏览器里观察一下该网页的re ...
- oracle基础知识(六)----spfile与pfile
一, 认识参数文件 Oracle中的参数文件是一个包含一系列参数以及参数对应值的操作系统文件.它们是在数据库实例启动时候加载的,决定了数据库的物理 结构.内存.数据库的限制及系统大量的默认值 ...