zoukankan      html  css  js  c++  java
  • OSPF 开放式最短路径优先

    1.1         ping

    配置OSPF使PC-91与PC-92互相ping通

    PC端配置默认路由为交换机直连接口的IP

    1.1.1         拓扑

    1.1.2         配置

    1)配置相应接口为三层口并按拓扑所示配置好IP

    208号机:

    xNet#configure terminal

    xNet(config)#interface ge1

    xNet(config-if)#ip address 192.168.4.208/24

    xNet(config-if)#exit

    xNet(config)#interface ge48

    xNet(config-if)#ip address 20.1.1.2/24

    xNet(config-router)#end

    xNet#

    同样方法配置好207号机接口IP

    2)配置OSPF

    208号机宣告路由:

    xNet#configure terminal

    xNet(config)#router ospf 1

    xNet(config-router)#network 192.168.4.0/24 area 0

    xNet(config-router)#network 20.1.1.0/24 area 0

    xNet(config-router)#end

    xNet#

    207号机同样宣告路由:

    xNet#configure terminal

    xNet(config)#router ospf 1

    xNet(config-router)#network 192.168.3.0/24 area 0

    xNet(config-router)#network 20.1.1.0/24 area 0

    xNet(config-router)#end

    xNet#

    1.1.3         结果

    当不配置OSPF时,PC-91与PC-92互ping不通

    当配置OSPF,宣告网段后,PC-91与PC-92能够互相ping通

    查看OSPF相关信息:

    1.2         认证

    通过配置认证来对路由信息加密

    1.2.1         拓扑

    1.2.2         配置

    1)在208上配置OSPF认证,207暂时不配OSPF认证,观察路由信息

    xNet#configure terminal

    xNet(config)#router ospf 1

    xNet(config-router)#area 0 authentication message-digest /定义认证类型MD5

    xNet(config-router)#exit

    xNet(config)#interface ge1

    xNet(config-if)#ip ospf message-digest-key 1 md5 test /设置key和密码

    xNet(config-if)#end

    xNet#

    xNet#configure terminal

    xNet(config)#interface ge48

    xNet(config-if)#ip ospf authentication

    xNet(config-if)#ip ospf authentication-key test

    xNet(config-if)#end

    xNet#

    查看路由信息,没有207的路由信息

    2)同样在207配置OSPF认证,再查看路由信息

    xNet#configure terminal

    xNet(config)#interface ge48

    xNet(config-if)#ip ospf authentication

    xNet(config-if)#ip ospf authentication-key test

    xNet(config-if)#end

    xNet#

    这时经过认证以后才相互交换路由信息,可以查看到OSPF路由

    1.2.3         结果

    当配置OSPF认证后,只有经过认证以后才相互交换路由信息。

    1.3         OSPFv3基本功能

    配置OSPFv3使PC-91与PC-92互相ping通

    PC端配置默认路由为交换机直连接口的IP

    1.3.1         拓扑

    1.3.2         配置

    在PC端用ifconfig配置好相应ipv6 address

    如:

    $ ifconfig eth0 inet6 add 2003::92/64

    PC端添加默认网关:

    $ route -A inet6 add ::/0 gw 2003::208

    1)配置路由器ID

    xNet#con t

    xNet(config)#router ipv6 ospf 1

    xNet(config-router)#router-id 208.208.208.208

    xNet(config-router)#end

    xNet#

    2)在接口上启用OSPFv3

    208为例:

    xNet#con t

    xNet(config)#interface ge1

    xNet(config-if)#ipv6 router ospf tag 1 area 0

    xNet(config-if)#exit

    xNet(config)#interface ge48

    xNet(config-if)#ipv6 router ospf tag 1 area 0

    xNet(config-if)#end

    xNet#

    1.3.3         结果

    1)当两台交换机都配置完后,查看OSPFv3路由表

    208:

    207:

    2)使PC-91和PC-92互ping,能够ping通

  • 相关阅读:
    iOS离屏渲染简书
    iOS Waxpatch项目(动态更新)
    waxpatch修改任意类的用法
    ios waxpatch lua语法
    ios WaxPatch热更新原理
    WaxPatch中demo注意问题
    ios wax热更新之安装wax(xcode7.3.1)
    获取第三方键盘高度(包括自带键盘高度)
    25个增强iOS应用程序性能的提示和技巧(高级篇)(2)
    JS基础_一元运算符
  • 原文地址:https://www.cnblogs.com/niezhongle/p/11075269.html
Copyright © 2011-2022 走看看