第三章 OSPF多区域原理及配置
更新时间:2024-05-28 05:12: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-28
南开大学周恩来政府管理学院考研《人口学理论》科目大纲05-16
最适合校园种植植物06-06
通信原理复习题05-18
离婚协议书怎样写08-08
《电工基础》教案(第1~5章)08-27
世界顶级销售话术06-04
《实用养老机构管理》课程标准04-27
- 计算机试题
- 【2012天津卷高考满分作文】鱼心人不知
- 教育心理学历年真题及答案--浙江教师资格考试
- 20180327-第六届“中金所杯”全国大学生金融知识大赛参考题库
- 洪林兴达煤矿2018年度水情水害预测预报
- 基本要道讲义
- 机电设备安装试运行异常现象分析与对策
- 《有机化学》复习资料-李月明
- 非常可乐非常MC2--非常可乐广告策划提案 - 图文
- 2011中考数学真题解析4 - 科学记数法(含答案)
- 企业人力资源管理师三级07- 09年真题及答案
- 基于单片机的光控自动窗帘控制系统设计说明书1 - 图文
- 20160802神华九江输煤皮带机安装方案001
- (共53套)新人教版一生物必修2(全册)教案汇总 word打印版
- 2014行政管理学总复习
- 中国银监会关于加强地方政府融资平台贷款风险监管的指导意见
- 民宿酒店核心竞争与研究
- 游园活动谜语大全2012
- 河南省天一大联考2016届高三英语5月阶段性测试试题(六)(A卷)
- 小型超市管理系统毕业论文详细设计4
- 原理
- 区域
- 配置
- 第三章
- OSPF
- 上海语文教材目录
- EPSON PLQ-20K安装不能打印的设置方法
- 想象画《教室物品变变变》(中班)
- 最新-2018年中考数学试题分类汇编(圆)1388 精品
- ——构建小学生道德品质发展性评价操作体系的实践研究
- 昌江区九年级语文专项训练(三)
- 技能鉴定收支办法
- 湘桂铁路扩改工程XG-3标灵川综合行车室实施性施工组织设计-8wr
- 上海市交大附中高三数学上学期摸底考试试题
- 江西省住房和城乡建设厅 赣建价8号
- 关于加油站单站促销的请示 - 图文
- 新常态经济下财税体制改革面临的挑战及对策
- 浅谈小学音乐教学中的器乐教学
- 兵团广播电视大学开放教育护理专业专科综合实践环节手册(1)
- 高中物理力学经典例题汇编3
- 厨房不锈钢水槽行业细分产品市场分析(中元智盛) - 图文
- 安全生产法习题课
- 新海高中录取名单
- 广东省水电安装工程综合定额
- 二极管伏安特性曲线的研究