一、实验目的:用OSPF协议使全网互通

二、拓扑图

三、具体步骤配置

(1)R1路由器配置

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.1.2 255.255.255.0
R1(config-if)#no shutdown

R1(config-if)#interface s0/0/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown

R1(config-if)#interface s0/0/1
R1(config-if)#ip address 30.1.1.1 255.255.255.0
R1(config-if)#clock rate 64000
This command applies only to DCE interfaces
R1(config-if)#no shutdown

R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 10.1.1.0 0.0.0.255 area 0
R1(config-router)#network 30.1.1.0 0.0.0.255 area 0
R1(config-router)#end

(2)R2路由器配置

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface f0/0
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no shutdown

R2(config-if)#interface s0/0/0
R2(config-if)#ip address 20.1.1.1 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown

R2(config-if)#interface s0/0/1
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#clock rate 64000
This command applies only to DCE interfaces
R2(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 192.168.2.0 0.0.0.255 area 0
R2(config-router)#network 20.1.1.0 0.0.0.255 area 0
R2(config-router)#network 10.1.1.0 0.0.0.255 area 0
R2(config-router)#end

(3)R3路由器配置

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#interface f0/0
R3(config-if)#ip address 192.168.3.1 255.255.255.0
R3(config-if)#no shutdown

R3(config-if)#interface s0/0/0
R3(config-if)#ip address 30.1.1.2 255.255.255.0
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R3(config-if)#interface s0/0/1
R3(config-if)#ip address 20.1.1.2 255.255.255.0
R3(config-if)#clock rate 64000
This command applies only to DCE interfaces
R3(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
R3(config-if)#exit
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 192.168.3.0 0.0.0.255 area 0
R3(config-router)#network 30.1.1.0 0.0.0.255 area 0
R3(config-router)#network 20.1.1.0 0.0.0.255 area 0
R3(config-router)#end

(4)R4路由器配置

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R4
R4(config)#interface f0/0
R4(config-if)#ip address 192.168.1.1 255.255.255.0
R4(config-if)#no shutdown

R4(config-if)#interface f0/1
R4(config-if)#ip address 192.168.10.254 255.255.255.0
R4(config-if)#no shutdown

R4(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 192.168.1.0 0.0.0.255 area 0
R4(config-router)#network 192.168.10.0 0.0.0.255 area 0
R4(config-router)#end

(5)R5路由器配置

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R5
R5(config)#interface f0/0
R5(config-if)#ip address 192.168.3.2 255.255.255.0
R5(config-if)#no shutdown

R5(config-if)#interface f0/1
R5(config-if)#ip address 192.168.30.254 255.255.255.0
R5(config-if)#no shutdown

R5(config-if)#exit
R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 192.168.3.0 0.0.0.255 area 0
R5(config-router)#network 192.168.30.0 0.0.0.255 area 0
R5(config-router)#end

(6)R6路由器配置

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R6
R6(config)#interface f0/0
R6(config-if)#ip address 192.168.2.1 255.255.255.0
R6(config-if)#no shutdown

R6(config-if)#interface f0/1
R6(config-if)#ip address 192.168.20.254 255.255.255.0
R6(config-if)#no shutdown

R6(config-if)#exit
R6(config)#router ospf 1
R6(config-router)#router-id 6.6.6.6
R6(config-router)#network 192.168.2.0 0.0.0.255 area 0
R6(config-router)#network 192.168.20.0 0.0.0.255 area 0
R6(config-router)#end

四、验证测试

1、查看R1路由表信息

2、查看ip路由协议配置与统计信息

3、查看OSPF数据库信息

4、查看OSPF进程及区域的细节。如路由器运行SPF算法的次数

5、测试各台主机间是否互通

(1)PC1与PC2

(2)PC2与PC3

(3)PC3与PC1

路由器配置——OSPF协议(1)的更多相关文章

  1. 路由器配置——OSPF协议(2)

    一.实验目的:使用OSPF协议达到全网互通的效果 二.拓扑图 三.具体步骤配置 (1)R1路由器配置 Router>enableRouter#configure terminalEnter co ...

  2. 路由器配置PPP协议 CHAP验证 PAP验证

    路由器配置PPP协议 CHAP验证 PAP验证 来源 https://www.cnblogs.com/tcheng/p/5967485.html PAP是两次握手,明文传输用户密码进行认证:CHAP是 ...

  3. 华为路由器配置OSPF

    OSPF是什么 OSPF(Open Shortest Pass First,开放最短路径优先协议),是一个最常用的内部网管协议,是一个链路状态协议. 使用场景:适用于运营商.政府机构等大型网络中多节点 ...

  4. OSPF协议详解

    CCNP OSPF协议详解 2010-02-24 20:30:22 标签:CCNP 职场 OSPF 休闲 OSPF(Open Shortest Path Fitst,ospf)开放最短路径优先协议,是 ...

  5. H3C路由器配置——动态路由OSPF协议

    一.介绍 1.OSPF协议介绍 (1).OSPF(Open Shortest Path First,开放最短路径优先)路由协议是用于网际协议(IP)网络的链路状态路由协议.是一个被各厂商设备广泛支持的 ...

  6. OSPF协议学习以及路由器配置

    OSPF协议学习以及路由器配置 1.实验任务 2,使用eNsp搭建网络拓扑 3.配置路由IP ps:要使用GE(3层口),2层口(E口)需要先配置Vlan才能配置IP地址 4.配置路由器R1的ospf ...

  7. OSPF协议介绍及配置 (下)

    4.特殊区域详解 为了让我们的讲解更加的通俗易懂,我们看上面这个拓扑,这是一个根据客户业务逻辑结构所涉及的OSPF网络,共有三个区域(实际上远远不止),骨干区域area0为一级行及二级行所部署,*** ...

  8. OSPF协议介绍及配置 (上)

    OSPF协议介绍及配置 (上) 一.OSPF概述 回顾一下距离矢量路由协议的工作原理:运行距离矢量路由协议的路由器周期性的泛洪自己的路由表,通过路由的交互,每台路由器都从相邻的路由器学习到路由,并且加 ...

  9. OSPF协议介绍及配置

    一.OSPF概述 回顾一下距离矢量路由协议的工作原理:运行距离矢量路由协议的路由器周期性的泛洪自己的路由表,通过路由的交互,每台路由器都从相邻的路由器学习到路由,并且加载进自己的路由表中,而对于这个网 ...

随机推荐

  1. Python学习2——使用字符串(完整版)

    """ 在C语言入门的时候字符串没有好好学习,导致后期语言根本没有入门, 更导致之后大量的codeing时间浪费,效率低下. 因此,借助这次Python入门,好好地将字符 ...

  2. S02_CH13_ AXI_PWM 实验

    S02_CH13_ AXI_PWM 实验 当学习了上一章的协议介绍内容后,开发基于这些协议的方案已经不是什么难事了,关键的一点就是从零到有的突破了.本章就以AXI-Lite总线实现8路LED自定义IP ...

  3. 关于BIOS系统的认识和学习(源自摘录)

    BIOS系统的介绍与学习 BIOS (basic input output system 即基本输入输出系统)在计算机系统中起着非常重要的作用,其是计算机系统最底层的设置, BIOS设置程序是被固化到 ...

  4. CentOS7安装配置redis5集群

    一.服务器准备 本文准备了3台服务器 , 分别是 172.18.0.231 172.18.0.232 172.18.0.233 每台运行2个redis实例, 端口分别为7000 7001 ,即总共6个 ...

  5. IntelliJ IDEA 搭建 Go 开发环境

    本文介绍 Windows7 x64 基于 IntelliJ IDEA 搭建 Go 语言开发环境.主要是一些操作过程截图以及简单文字描述,如有不清楚的地方​,欢迎指正.所有软件使用当前(2016.12. ...

  6. C++反汇编第五讲,认识C++中的Try catch语法,以及在反汇编中还原

    我们以前讲SEH异常处理的时候已经说过了,C++中的Try catch语法只不过是对SEH做了一个封装. 如果不懂SEH异常处理,请点击博客链接熟悉一下,当然如果不想知道,也可以直接往下看.因为异常处 ...

  7. MVC和WebApi中设置Area中的页为首页

    拿WebApi为例,我们一般会生成一份帮助文档,帮助文档会在Area中 我们现在要讲帮助文档设为首页 只需在App_Start文件夹下添加 RouteConfig 类 public class Rou ...

  8. Linux设备驱动中的软件架构思想

    目录 更新记录 一.Linux驱动的软件架构 1.1 出发点 1.2 分离思想 1.3 分层思想 二.platform设备驱动 2.1 platform设备 2.2 platform驱动 2.3 pl ...

  9. vue中非父子组件的传值bus的使用

    非父子之间的组件传值,可以使用vuex.简单的状态管理,也可以用vue bus vue bus可以实现不同组件间.不同页面间的通信,比如我在A页面出发点击事件,要B页面发生变化,使用方法如下: 全局定 ...

  10. DVA-subscriptions

    import { routerRedux } from 'dva/router' export default { namespace: 'notice', state: { notices:[], ...