首页 > 其他分享 >OSPF 学习笔记

OSPF 学习笔记

时间:2022-12-23 11:33:26浏览次数:40  
标签:1.1 no 0.0 笔记 学习 exit ip router OSPF

1、网络拓扑

 

 

 

2、R1\R2\R3 OSPF配置

R1:
enable
config t
no ip domain lookup
line console 0
no exec-timeout
logging synchronous
exit


interface f0/0
no shutdown
ip add 1.1.123.1 255.255.255.224
exit

interface loopback 0
ip add 10.10.1.1 255.255.255.0
no shutdown
exit
end


R2:
enable
config t
no ip domain lookup
line console 0
no exec-timeout
logging synchronous
exit


interface f0/0
no shutdown
ip add 1.1.123.2 255.255.255.224
exit

interface s1/0
no shutdown
ip add 1.1.24.1 255.255.255.248
exit

interface loopback 0
ip add 10.10.2.2 255.255.255.0
no shutdown
exit
end


R3:
enable
config t
no ip domain lookup
line console 0
no exec-timeout
logging synchronous
exit


interface f0/0
no shutdown
ip add 1.1.123.3 255.255.255.224
exit


interface s1/1
no shutdown
ip add 1.1.34.1 255.255.255.248
exit

interface loopback 0
ip add 10.10.3.3 255.255.255.0
no shutdown
exit
end




R4 :
enable
config t
no ip domain lookup
line console 0
no exec-timeout
logging synchronous
exit


interface s1/0
no shutdown
ip add 1.1.24.2 255.255.255.248
exit

interface s1/1
no shutdown
ip add 1.1.34.2 255.255.255.248
exit

interface s1/2
no shutdown
ip add 1.1.45.2 255.255.255.0
exit

interface loopback 0
no shut
ip address 10.10.4.4 255.255.255.0
end

      



R5 :
enable
config t
no ip domain lookup
line console 0
no exec-timeout
logging synchronous
exit

interface s1/2
no shutdown
ip add 1.1.45.1 255.255.255.0
exit

interface loopback 0
no shut
ip add 10.10.5.5 255.255.255.0
end

R1-OSPF-Router config 

config t
router ospf 1
router-id 1.1.1.1
network 1.1.123.1 0.0.0.0 area 2
network 10.10.1.1 0.0.0.0 area 2
end

R2-OSPF-Router config 

config t
router ospf 1
router-id 2.2.2.2
network 1.1.123.2 0.0.0.0 area 2
network 10.10.2.2 0.0.0.0 area 2
end

config t
router ospf 2
router-id 2.2.2.3
network 1.1.24.1 0.0.0.0 area 2
end



q 


R3-OSPF-Router config 

config t
router ospf 1
router-id 3.3.3.3
network 1.1.123.3 0.0.0.0 area 2
network 10.10.3.3 0.0.0.0 area 2
end

config t
router ospf 2
router-id 3.3.3.3
network 1.1.34.1  0.0.0.0 area 2
end 


R4-OSPF-Router config 

config t
router ospf 2
router-id 4.4.4.4
network 1.1.24.2 0.0.0.0 area 2
network 1.1.34.2 0.0.0.0 area 2
network 1.1.45.2 0.0.0.0 area 2
network 10.10.4.4 0.0.0.0 area 2
end


R5-OSPF-Router config
config t
router ospf 2
router-id 5.5.5.5
network 1.1.45.1 0.0.0.0 area 2
network 10.10.5.5 0.0.0.0 area 2
end 

3、 OSPF配置

R3#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/BDR        00:00:33    1.1.123.1       FastEthernet0/0
2.2.2.2           1   FULL/DR         00:00:32    1.1.123.2       FastEthernet0/0
  • DR: Designate router,指定路由器
  • BDR:Backup Disignate router,备用指定路由器
  • DROthers:其余非DR/BDR路由器
  • DR/BDR选举规则:先比较接口优先级,越大越优先。优先级相同,比较RID,越大越优先
R3#show ip ospf interface f0/0
FastEthernet0/0 is up, line protocol is up 
  Internet Address 1.1.123.3/27, Area 2 
  Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DROTHER, Priority 1 
  Designated Router (ID) 2.2.2.2, Interface address 1.1.123.2
  Backup Designated router (ID) 1.1.1.1, Interface address 1.1.123.1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:02
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2 
    Adjacent with neighbor 1.1.1.1  (Backup Designated Router)
    Adjacent with neighbor 2.2.2.2  (Designated Router)
  Suppress hello for 0 neighbor(s)
R3#

 

标签:1.1,no,0.0,笔记,学习,exit,ip,router,OSPF
From: https://www.cnblogs.com/leishu/p/17000318.html

相关文章

  • SVN培训笔记(下拉项目、同步修改、添加文件、修改文件、删除文件、改名文件等)
    前言  为了方便新加入团队的员工熟悉团队协作开发。  为了将好东西整理分享给有需要的网友。  将SVN内部员工培训文档公开,以方便更多的人,提高知识获取速度,尽快熟......
  • mybatis-学习笔记
    Mybatis1简介MyBatis是一款优秀的持久层框架它支持定制化SQL、存储过程以及高级映射。MyBatis避免了几乎所有的JDBC代码和手动设置参数以及获取结果集。MyBati......
  • 详解聚类算法Kmeans-概述 & 工作原理【菜菜的sklearn课堂笔记】
    视频作者:菜菜TsaiTsai链接:【技术干货】菜菜的机器学习sklearn【全85集】Python进阶_哔哩哔哩_bilibili有监督学习:模型在训练的时候,即需要特征矩阵X,也需要真实标签y。无......
  • 机器学习-企业破产预测
    企业破产预测选题背景企业破产是商品经济的必然产物.在社会主义商品经济条件下,企业破产也是一种客观存在的经济现象.新中国的第一部《企业破产法》已经诞生,它的实施必......
  • #yyds干货盘点# react笔记之学习之空列表提示
    前言我是歌谣我有个兄弟巅峰的时候排名c站总榜19叫前端小歌谣曾经我花了三年的时间创作了他现在我要用五年的时间超越他今天又是接近兄弟的一天人生难免坎坷大不了从......
  • 【机器学习】李宏毅——Adversarial Attack(对抗攻击)
    研究这个方向的动机,是因为在将神经网络模型应用于实际场景时,它仅仅拥有较高的正确率是不够的,例如在异常检测中、垃圾邮件分类等等场景,那些负类样本也会想尽办法来“欺骗”......
  • win10 - 查看笔记本的电池损耗指令
    将报告文件放到c盘根目录powercfg/batteryreport/output"C:\battery_report.html"  这个文件,用浏览器打开  哈哈哈,用了一年多的电脑,拯救者r9000p,电池才损......
  • 【python机器学习课程设计】狗的品种识别
    一、选题背景近年来,随着生活水平的提高,狗作为参加的宠物品种慢慢步入了中国千万家庭中。而狗的品种识别案例可以帮助我们了解狗品种的差异特征,并使用机器学习技术来分析这......
  • 机器学习——识别是否可回收物品
    (一)选题背景现在大家丢垃圾都是乱丢垃圾,可回收不可回收有害垃圾都堆叠在一起,做识别可回收垃圾就是为了工厂方便识别可再利用的垃圾。可回收垃圾(Recyclablegarbage)是一种......
  • Python学习笔记--数据可视化的开头
    JSON数据格式的转换示例:若是有中文数据,可以在data后面加上ensure_ascii=Falsepyecharts模块网站:https://gallery.pyecharts.org(有参考代码可以看简称,画廊)记得......