Oracle® Switch ES2-72 和 Oracle Switch ES2-64 配置指南

退出打印视图

更新时间: 2015 年 4 月
 
 

配置 OSPF 动态路由

此任务介绍了如何使用 SEFOS 中 OSPF 协议的重新分配功能配置动态路由。此任务先通过 OSPF 动态了解两台主机之间的路由,然后验证两台主机是否可以相互到达。

有关此任务的拓扑,请参见Routing Feature Topology

  1. 验证 SEFOS-1 和 SEFOS-2 是否仍然具有保存的配置信息。

    请参见Configure Static Unicast Route Entries

    动态路由的基本 VLAN 配置类似于静态路由的基本 VLAN 配置。如果 SEFOS-1 和 SEFOS-2 上未保存配置信息,请执行Configure Static Unicast Route Entries 中的Step 1Step 6

    如果 SEFOS-1 或 SEFOS-2 是一台第三方交换机,请根据交换机制造商的建议配置基本 VLAN 和动态路由。

  2. 在 SEFOS-1 上启用 OSPF。
    SEFOS-1# configure terminal
    SEFOS-1(config)# router ospf
    SEFOS-1(config-router)# asBR router
    SEFOS-1(config-router)# router-id 10.0.0.201
    SEFOS-1(config-router)# network 20.0.0.201 area 0.0.0.0
    SEFOS-1(config-router)# network 10.0.0.201 area 0.0.0.0
    SEFOS-1(config-router)# redistribute all
    SEFOS-1(config-router)# end
    
  3. 在 SEFOS-2 上启用 OSPF。
    SEFOS-2# configure terminal
    SEFOS-2(config)# router ospf
    SEFOS-2(config-router)# asBR router
    SEFOS-2(config-router)# router-id 40.0.0.200
    SEFOS-2(config-router)# network 20.0.0.200 area 0.0.0.0
    SEFOS-2(config-router)# network 40.0.0.200 area 0.0.0.0
    SEFOS-2(config-router)# redistribute all
    SEFOS-2(config-router)# end
    

    如果 SEFOS-2 是一台第三方交换机,请验证在 SEFOS-2 上是否启用了 OSPF 协议,以及是否相应地应用了相关配置。

  4. 检查 SEFOS-1 的邻居路由器状态。
    SEFOS-1# show ip ospf neighbor
     
    Vrf default
     
    Neighbor-IDPriStateDeadTimeAddress    Interface 
    ------------------------------------------- 
    40.0.0.2001FULL/DR  3920.0.0.200 vlan20
    SEFOS-1# show ip route
    Codes: C - connected, S - static, R - rip, B - bgp, O - ospf
    C 10.0.0.0/24 is directly connected, vlan10
    C 20.0.0.0/24 is directly connected, vlan20
    O 40.0.0.0/24 [2] via 20.0.0.200
    
  5. 验证 SEFOS-2 的邻居路由器状态。
    SEFOS-2# show ip ospf neighbor
     
    Vrf default 
    Neighbor-ID Pri State DeadTime Address Interface 
    ----------- --- ----- -------- ------- --------- 
    SEFOS-2# show ip route
    10.0.0.201 1 FULL/BACKUP 32 20.0.0.201 vlan20
    Codes: C - connected, S - static, R - rip, B - bgp, O - ospf 
     
    O 10.0.0.0/24 [2] via 20.0.0.201 
    C 20.0.0.0/24 is directly connected, vlan20 
    C 40.0.0.0/24 is directly connected, vlan40
    

    如果 SEFOS-2 是一台第三方交换机,请使用相应的命令来验证邻居路由器状态。

  6. 使用 ping 命令验证 SEFOS-1 与 SEFOS-2 之间的连接。

相关信息