zoukankan      html  css  js  c++  java
  • 路由器基础配置之ospf基础配置

    我们将以上面的拓扑图进行本次ospf的实验,目的是能当三台pc机互通

    先配置好pc机的IP地址,注意一定要给pc机设置好网关,接下来配置路由器的IP地址

    router4

    enable  进入特权模式

    config t  进入全局配置模式

    interface g0/0

    ip address 192.168.1.254 255.255.255.0

    no shu

    exit

    interface s0/3/0

    ip address 192.168.10.1 255.255.255.0

    no shu

    router1

    enable

    config t

    interface s0/3/0

    ip address 192.168.10.2 255.255.255.0

    clock rate 6400  同步时间

    no shu

    exit

    interface s0/3/1

    ip address 192.168.20.1 255.255.255.0

    clock rate 6400

    no shu

    exit

    interface s0/2/0

    ip address 192.168.40.1 255.255.255.0

    clock rate 6400

    no shu

    router2

    enable

    config t

    interface s0/3/0

    ip address 192.168.50.1 255.255.255.0

    clock rate 6400  同步时间

    no shu

    exit

    interface s0/2/1

    ip address 192.168.60.2 255.255.255.0

    clock rate 6400

    no shu

    exit

    interface s0/2/0

    ip address 192.168.40.2 255.255.255.0

    clock rate 6400

    no shu

    router0

    enable

    config t

    interface s0/3/0

    ip address 192.168.20.2 255.255.255.0

    clock rate 6400  同步时间

    no shu

    exit

    interface s0/3/1

    ip address 192.168.50.2 255.255.255.0

    clock rate 6400

    no shu

    exit

    interface s0/2/0

    ip address 192.168.30.2 255.255.255.0

    clock rate 6400

    no shu

    router3

    enable  

    config t  

    interface g0/0

    ip address 192.168.3.254 255.255.255.0

    no shu

    exit

    interface s0/3/0

    ip address 192.168.30.1 255.255.255.0

    no shu

    router5

    enable  

    config t  

    interface g0/0

    ip address 192.168.2.254 255.255.255.0

    no shu

    exit

    interface s0/3/0

    ip address 192.168.60.1 255.255.255.0

    no shu

    路由器的IP地址配置完毕

    配置ospf

    router4

    在全局配置模式下

    router ospf 1

    router-id 1.1.1.1

    network 192.168.1.0 0.0.0.255 area 0

    network 192.168.10.0 0.0.0.255 area 0

    router1

    在全局配置模式下

    router ospf 1

    router-id 2.2.2.2

    network 192.168.10.0 0.0.0.255 area 0

    network  192.168.20.0 0.0.0.255 area 0

    network 192.168.40.0 0.0.0.255 area 0

    router0

    在全局配置模式下

    router ospf 1

    router-id 3.3.3.3

    network 192.168.30.0 0.0.0.255 area 0

    network  192.168.20.0 0.0.0.255 area 0

    network 192.168.50.0 0.0.0.255 area 0

    router2

    在全局配置模式下

    router ospf 1

    router-id 4.4.4.4

    network 192.168.40.0 0.0.0.255 area 0

    network  192.168.50.0 0.0.0.255 area 0

    network 192.168.60.0 0.0.0.255 area 0

    router3

    在全局配置模式下

    router ospf 1

    router-id 5.5.5.5

    network 192.168.3.0 0.0.0.255 area 0

    network  192.168.30.0 0.0.0.255 area 0

    router5

    在全局配置模式下

    router ospf 1

    router-id 6.6.6.6

    network 192.168.2.0 0.0.0.255 area 0

    network  192.168.60.0 0.0.0.255 area 0

    ospf全部配置完毕,等待路由器之间相互学习,可以在特权模式下使用show ip route来查看路由表的学习情况

    学习完毕可以使用ping命令,三台pc机就可以互通了,到此实验完成

  • 相关阅读:
    MOSS网站与我的网站显示的登录用户信息不同
    Windows Workflow: The Base Activity Library
    非对称加密相关基础
    Windows SharePoint Services 3.0 应用程序模板
    MOSS2007备份还原后搜索服务出现的问题
    MOSS发生“未能转换部分或所有标识引用”错误的处理
    MOSS工作流开发中两个非常实用的类
    MOSS2007最终用户培训资料
    [单调队列] UVA 10534 Wavio Sequence
    [拓扑排序] PKU 1094 Sorting It All Out
  • 原文地址:https://www.cnblogs.com/wuhaohao/p/9230872.html
Copyright © 2011-2022 走看看