第三章 OSPF多区域原理及配置
更新时间:2024-05-26 12:14:01 阅读量: 综合文库 文档下载
- 第三章第四幕推荐度:
- 相关推荐
第三章 OSPF多区域原理及配置
实验案例一 OSPF邻居的建立
一、实验环境
二、需求描述
1、通过配置不同的故障现象,加深对OSPF邻居状态的理解。
三、实验步骤
(一)配置路由器接口地址和OSPF协议,保证两台路由器之间形成邻接关系。
1、R1的配置
R1(config)# int f0/0
R1(config-if)# ip add 10.0.0.1 255.255.255.0 R1(config-if)# no shutdown
R1(config)# router ospf 1
R1(config-router)# network 0.0.0.0 255.255.255.255 area 0(将本机上的IP网段或IP地址告知邻居交换机,0.0.0.0 255.255.255.255是IP和IP反码,area是区域号)(router-id在ospf中,起到一个表明身份的作用,如果不手工指定的话,
会默认用loopback来作为router-id,如果loopback口没有地址,则用物理接口上最大的ip地址作为router-id,如果连物理地址都没有,路由器会提示你手工指定一个router-id)
2、R2的配置
R2(config)# int f0/0
R2(config-if)# ip add 10.0.0.2 255.255.255.0 R2(config-if)# no shutdown R2(config)# int S1/0
R2(config-if)# ip add 20.0.0.1 255.255.255.0 R2(config-if)# no shutdown
R2(config)# router ospf 1
R21(config-router)# network 0.0.0.0 255.255.255.255 area 0
3、R3的配置
R31(config)# int S0/0
R3(config-if)# ip add 20.0.0.2 255.255.255.0 R3(config-if)# no shutdown
R3(config)# router ospf 1
R3(config-router)# network 0.0.0.0 255.255.255.255 area 0
4、验证
Show ip ospf d d 查看ospf数据库 Show ip ospf nei查看邻居端口情况
(二)更改路由器R1和R2的F0/0接口的HELLO报文参数。 R1(config)# int f0/0
R1(config-if)# ip ospf hello-interval 50
R2(config)# int f0/0
R2(config-if)# ip ospf hello-interval 30
结论:Hello报文的间隔时间不同,不能建立邻接关系。
(三)更改路由器R1和R2的F0/0接口的HELLO时间,使其大于Dead时间。
R1(config)# int f0/0
R1(config-if)# ip ospf hello-interval 50 R1(config-if)# ip ospf dead-interval 40
R2(config)# int f0/0
R2(config-if)# ip ospf hello-interval 50 R2(config-if)# ip ospf dead-interval 40
结论:Hello报文的间隔时间大于Dead时间,不能建立邻接关系
(四)更改路由器R1和R2的F0/0接口优先级,设为0。
R1(config)# int f0/0
R1(config-if)# ip ospf priority 0
R2(config)# int f0/0
R2(config-if)# ip ospf priority 0
结论:以太网相连接口间优先级都设为0,没有DR,所以不能建立邻接关系,邻接状态为2way。
(五)更改路由器R2和R3的串口接口MTU值。
R2(config)# int S1/0
R2(config-if)# MTU 1518
R3(config)# int S0/0 R3(config-if)# MTU 1496
结论:串口上MTU值不同,不能建立邻接关系。
(六)更改路由器R2和R2的串口接口封装类型。
R2(config)# int S1/0
R2(config-if)# encapsulation ppp R3(config)# int S0/0
R3(config-if)# encapsulation hdlc
结论:串口上一个PPP封装,一个是HDLC封装,邻接关系表为空。
实验案例二 OSPF多区域的配置
一、实验环境
二、需求描述
1、使用OSPF实现总公司和各分公司互通,避免由于网段变更导致的重复配置。
三、实验步骤
(一)配置路由器接口地址和loopback接口。
1、R1的配置
R1(config)# int f0/0
R1(config-if)# ip add 10.0.0.9 255.255.255.252 R1(config-if)# no shutdown R1(config)# int f1/0
R1(config-if)# ip add 10.0.0.5 255.255.255.252 R1(config-if)# no shutdown R1(config)# int f2/0
R1(config-if)# ip add 10.0.0.1 255.255.255.252 R1(config-if)# no shutdown R1(config)# int f3/0
R1(config-if)# ip add 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config)# int loopback 0(作用是检测和管理路由器) R1(config-if)# ip add 1.1.1.1 255.255.255.255 R1(config-if)# no shutdown
2、R2的配置
R2(config)# int f0/0
R2(config-if)# ip add 10.0.0.2 255.255.255.252 R2(config-if)# no shutdown R2(config)# int f1/0
R2(config-if)# ip add 192.168.2.1 255.255.255.0 R2(config-if)# no shutdown R2(config)# int loopback 0
R2(config-if)# ip add 2.2.2.2 255.255.255.255 R2(config-if)# no shutdown
3、R3的配置
R3(config)# int f0/0
R3(config-if)# ip add 10.0.0.6 255.255.255.252 R3(config-if)# no shutdown R3(config)# int f1/0
R3(config-if)# ip add 192.168.4.1 255.255.255.0 R3(config-if)# no shutdown R3(config)# int loopback 0
R3(config-if)# ip add 3.3.3.3 255.255.255.255 R3(config-if)# no shutdown
3、R4的配置
R4(config)# int f0/0
R4(config-if)# ip add 10.0.0.10 255.255.255.252 R4(config-if)# no shutdown R4(config)# int f1/0
R4(config-if)# ip add 192.168.3.1 255.255.255.0 R4config-if)# no shutdown R4(config)# int loopback 0
R4(config-if)# ip add 4.4.4.4 255.255.255.255 R4(config-if)# no shutdown
(二)配置OSPF协议,实现内部网络互通。 1、R1的配置
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 1.1.1.1 0.0.0.0 area 0 R1(config-router)# network 192.168.1.1 0.0.0.0 area 0
R1(config-router)# network 10.0.0.5 0.0.0.0 area 0 R1(config-router)# network 10.0.0.1 0.0.0.0 area 1 R1(config-router)# network 10.0.0.9 0.0.0.0 area 2 2、R2的配置
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 0.0.0.0 255.255.255.255 area 1
3、R3的配置
R3(config)# router ospf 1
R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 0.0.0.0 255.255.255.255 area 0
4、R4的配置
R4(config)# router ospf 1
R4(config-router)# router-id 4.4.4.4
R4(config-router)# network 0.0.0.0 255.255.255.255 area 2
(三)验证网络访问是否正常。
1、查看各路由器的路由表 show ip route
2、各PC互ping 通。
(四)OSPF的DR/BDR的选举
1、在R1和R2上查看默认OSPF优先级,以及哪台路由器为DR show ip ospf neighbor
2、在非DR的路由器的以太网接口上修改路由优先级为255,重新查看。 (Config-if)# ip ospf priority 255
Show ip ospf neighbor 重启OSPF进程,再次查看 Clear ip ospf process
2、在DR的路由器的以太网接口上修改路由优先级为0,重新查看。 (Config-if)# ip ospf priority 0
3、把R1和R2的以太网接口路由优先级都修改为0,再次查看邻居状态。 show ip ospf neighbor
正在阅读:
第三章 OSPF多区域原理及配置05-26
市电子政务信息中心年度工作总结08-08
美丽的武当山作文500字06-30
2002年全国中学生英语能力竞赛(NEPCS)决赛高二组试题09-09
国立台湾师范大学附属高级中学九十五学年度高三第二学05-10
内墙批腻子技术交底05-22
英语十大类词复习过程04-20
课程标准-形体训练2017旅游管理05-09
正当防卫制度思考05-07
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- 原理
- 区域
- 配置
- 第三章
- OSPF
- 浅谈《梁祝》小提琴协奏曲
- 关于加油站单站促销的请示 - 图文
- 【第6章】数组
- 最新2017长春版一年语文下册教案全册
- 二极管工作原理及故障特点
- 小学生寒假社会实践心得范文500字
- 浅谈员工公平感与工作满意度的关系
- EPSON PLQ-20K安装不能打印的设置方法
- 基于PLC的变频调速电梯控制系统设计(终稿) - 图文
- 新海高中录取名单
- 常用标点符号与特殊符号大全
- 解线性方程组的几种迭代算法
- 上海语文教材目录
- 新常态经济下财税体制改革面临的挑战及对策
- 06-01-16路灯配电系统若干问题的探讨
- 二年级语文阅读练习、看图写话(含答案) - 副本
- 温水镇中学校本研修实施方案 - 图文
- 铝合金压铸项目环境影响评价报告表 - 图文
- 镇江市物业承接查验管理工作指导意见
- 东平湖(梁山泊)国家级水利风景区申报材料