• 使用ensp搭建路由拓扑,并使用ospf协议实现网络互通实操


    转载请注明出处:

    1.使用ENSP 搭建如下拓扑:

                              

    数据准备

      为完成此配置例,需准备如下的数据:

    设备

    Router ID

    Process ID

    IP地址

    DeviceA

    1.1.1.1

    1

    区域0:192.168.0.0/24

    区域1:192.168.1.0/24

    DeviceB

    2.2.2.2

    1

    区域0:192.168.0.0/24

    区域2:192.168.2.0/24

    DeviceC

    3.3.3.3

    1

    区域1:192.168.1.0/24、172.16.1.0/24

    DeviceD

    4.4.4.4

    1

    区域2:192.168.2.0/24、172.17.1.0/24

    DeviceE

    5.5.5.5

    1

    区域1:172.16.1.0/24

    DeviceF

    6.6.6.6

    1

    区域2:172.17.1.0/24

    2.配置ospf

      DeviceA配置如下:

    复制代码
    display current-configuration configuration ospf
    #
    ospf 1
     area 0.0.0.0
      network 192.168.0.0 0.0.0.255
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
    #
    return
    display current-configuration interface Ethernet 0/0/1
    #
    interface Ethernet0/0/1
     ip address 192.168.1.1 255.255.255.0
    #
    return
    display current-configuration interface Ethernet 0/0/0
    #
    interface Ethernet0/0/0
     ip address 192.168.0.1 255.255.255.0
    #
    return
    
    复制代码

      DeviceB 配置:

    复制代码
    display current-configuration configuration ospf
    #
    ospf 1
     area 0.0.0.0
      network 192.168.0.0 0.0.0.255
     area 0.0.0.2
      network 192.168.2.0 0.0.0.255
    #
    return
    display current-configuration interface Ethernet 0/0/0
    #
    interface Ethernet0/0/0
     ip address 192.168.0.2 255.255.255.0
    #
    return
    display current-configuration interface Ethernet 0/0/1
    #
    interface Ethernet0/0/1
     ip address 192.168.2.1 255.255.255.0
    #
    return
    
    复制代码

      DeviceC 配置:

    复制代码
    display current-configuration configuration ospf
    #
    ospf 1
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
      network 172.16.1.0 0.0.0.255
    #
    return
    display current-configuration interface Ethernet 0/0/0
    #
    interface Ethernet0/0/0
     ip address 192.168.1.2 255.255.255.0
    #
    return
    display current-configuration interface Ethernet 0/0/1
    #
    interface Ethernet0/0/1
     ip address 172.16.1.1 255.255.255.0
    #
    return
    
    复制代码

      DeviceD配置如下:

    复制代码
    display current-configuration configuration ospf
    #
    ospf 1
     area 0.0.0.2
      network 192.168.2.0 0.0.0.255
      network 172.17.1.0 0.0.0.255
    #
    return
    display current-configuration interface Ethernet 0/0/0
    #
    interface Ethernet0/0/0
     ip address 192.168.2.2 255.255.255.0
    #
    return
    display current-configuration interface Ethernet 0/0/1
    #
    interface Ethernet0/0/1
     ip address 172.17.1.1 255.255.255.0
    #
    return
    
    复制代码

      DeviceE配置如下:

    复制代码
    display current-configuration configuration ospf
    #
    ospf 1
     area 0.0.0.1
      network 172.16.1.0 0.0.0.255
    #
    return
    display current-configuration interface Ethernet 0/0/0
    #
    interface Ethernet0/0/0
     ip address 172.16.1.2 255.255.255.0
    #
    return
    
    复制代码

      DeviceF配置如下:

    复制代码
    display current-configuration configuration ospf
    #
    ospf 1
     area 0.0.0.2
      network 172.17.1.0 0.0.0.255
    #
    return
    
    display current-configuration interface Ethernet 0/0/0
    #
    interface Ethernet0/0/0
     ip address 172.17.1.2 255.255.255.0
    #
    return
    
    
    复制代码

    3.验证网络是否打通:

      在 DeviceE 设备上ping 另一个边缘区域的DeviceF,并跟踪过程:

                        

     4.分别查看每个设备上的路由和ospf路由:

      DeviceA 的路由表和ospf 路由表:

                       

       DeviceB 的路由表和ospf 路由表:

                       

       DeviceC 的路由表和ospf 路由表:

                         

       DeviceD 的路由表和ospf 路由表:

                         

       DeviceE 的路由表和ospf 路由表:

                      

       DeviceF 的路由表和ospf 路由表:

                       

     

  • 相关阅读:
    【SwiftUI模块】0003、SwiftUI搭建瀑布流-交错网格
    力扣:第81场双周赛
    CSRF+Self XSS
    OA项目之我的审批(查询&会议签字)
    sqlserver 查询数据显示行号
    解决办法‘npm‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。
    Mysql - 索引
    微信小程序三级分销商城源码系统+区域代理+完整的部署教程
    逍遥自在学C语言 | break-循环的中断与跳转
    阿里 P9 架构师力荐:Java 面试必刷的 17 套一线大厂真题(含答案)
  • 原文地址:https://www.cnblogs.com/zjdxr-up/p/17747878.html