全部產品
Search
文件中心

Smart Access Gateway:OSPF狀態

更新時間:Jun 30, 2024

當業務不通時,如果是OSPF動態路由接入,可以通過交換器,查看裝置和交換器的連通性。

操作步驟

  1. 執行如下命令,登入交換器控制台。

    telnet 交換器IP

    說明 不同廠商的交換器裝置的命令列配置方法有所區別,詳細情況可參考廠商的配置手冊。本文僅以某一廠商的裝置舉例說明。
  2. 執行如下命令,查看鏈路鄰居狀態。

    show ip ospf neighbor

    系統顯示類似如下,查看State值:
    OSPF process 1, 8 Neighbors, 8 is Full:
    Neighbor ID     Pri   State                BFD State  Dead Time   Address         Interface
    10.10.**.**       0   Full/ -              -          00:00:10    192.168.**.**    GigabitEthernet 0/13
    10.10.**.**       0   Full/ -              -          00:00:10    192.168.**.**   GigabitEthernet 0/46
  3. 執行如下命令,查看OSPF配置資訊。
    configure terminal
    router ospf
    show this

    系統顯示類似如下,查看areanetwork的IP。

    Building configuration...
     !
     router-id 1.1.**.**
     area 1 nssa translator always default-information-originate no-summary
     area 2 nssa translator always default-information-originate no-summary
     area 3 nssa translator always default-information-originate no-summary
     area 17 nssa translator always default-information-originate no-summary
     area 18 nssa translator always default-information-originate no-summary
     area 81 nssa translator always default-information-originate no-summary
     area 90 nssa translator always default-information-originate no-summary
     area 91 nssa translator always default-information-originate no-summary
     network 192.168.**.** 0.0.**.** area 1
     network 192.168.**.** 0.0.**.** area 1
     network 192.168.**.** 0.0.**.** area 1
     network 192.168.**.** 0.0.**.** area 2
     network 192.168.**.** 0.0.**.** area 2
     network 192.168.**.** 0.0.**.** area 0
     network 192.168.**.** 0.0.**.** area 81
     network 192.168.**.** 0.0.**.** area 81
     network 192.168.**.** 0.0.**.** area 81
     network 192.168.**.** 0.0.**.** area 81
     network 192.168.**.** 0.0.**.** area 90
     network 192.168.**.** 0.0.**.** area 90
     network 192.168.**.** 0.0.**.** area 91
     network 192.168.**.** 0.0.**.** area 91
     network 192.169.**.** 0.0.**.** area 17
     network 192.169.**.** 0.0.**.** area 17
     network 192.169.**.** 0.0.**.** area 18
     network 192.169.**.** 0.0.**.** area 18
     !
    end
  4. 執行如下命令,查看串連裝置的介面狀態。

    show ip interface brief

    • up:表示介面正常。
    • administratively down :表示介面上配置了shutdown,執行no shutdown命令,使能shutdown。
    • down:一般表示網線沒有接好,檢查網線串連。
    系統顯示類似如下:
    Interface                        IP-Address(Pri)      IP-Address(Sec)      Status                 Protocol
    GigabitEthernet 0/2              no address           no address           down                   down
    GigabitEthernet 0/7              192.168.**.**/24       no address           up                     up
    GigabitEthernet 0/11             9.9.**.**/24           no address           down                   down
    GigabitEthernet 0/12             192.168.**.**/24      no address           up                     up
    GigabitEthernet 0/13             192.168.**.**/30      no address           up                     up
    GigabitEthernet 0/15             192.168.**.**/24      no address           down                   down
    GigabitEthernet 0/20             192.168.**.**/30      no address           up                     up
    GigabitEthernet 0/22             192.168.**.**/30      192.169.**.**/30      up                     up
                                                          192.168.**.**/24
    GigabitEthernet 0/23             192.168.**.**/30      192.169.**.**/30      up                     up
    GigabitEthernet 0/27             192.169.**.**/30      no address           up                     up
    GigabitEthernet 0/28             192.169.**.**/30      no address           up                     up
    GigabitEthernet 0/29             192.169.**.**/30      192.168.**.**/30     up                     up
                                                          192.169.**.**/30
    GigabitEthernet 0/30             192.169.**.**/30      no address           up                     up
    GigabitEthernet 0/33             192.168.**.**/30      192.168.68.6/30      down                   down
    GigabitEthernet 0/35             192.169.**.**/30      no address           up                     up
    GigabitEthernet 0/36             192.169.**.**/30      no address           up                     up
    GigabitEthernet 0/37             192.168.**.**/30      192.169.**.**/30      down                   down
                                                          192.168.**.**/30
    GigabitEthernet 0/38             192.168.**.**/30      192.169.**.**/30      down                   down
    GigabitEthernet 0/39             192.168.**.**/30      192.169.**.**/30      administratively down  down
                                                          192.168.**.**/30
    GigabitEthernet 0/40             192.168.**.**/30      192.169.**.**/30      up                     up
    GigabitEthernet 0/43             192.168.**.**/24     no address           up                     up
    GigabitEthernet 0/45             192.168.**.**/30     no address           down                   down
    GigabitEthernet 0/46             192.168.**.**/30     no address           up                     up
    GigabitEthernet 0/48             192.168.**.**/30    no address           down                   down
    Loopback 0                       no address           no address           up                     down
    VLAN 1                           no address           no address           up                     down
    VLAN 4                           192.168.**.**/24      no address           up                     down
    VLAN 19                          192.168.**.**/30      no address           up                     down
    VLAN 47                          192.168.**.**/24     no address           up                     down
    VLAN 148                         172.16.**.**/24       no address           up                     up
  5. 執行如下命令,查看介面下配置的OSPF協商時間和認證等是否匹配。
    interface GigabitEthernet 0/39
    show this

    查看ospf authentication ospf message-digest-key對應的認證的參數是否和裝置上配置的一致,如果不一致表示裝置沒有認證,無法建立鄰居。

    系統顯示類似如下:
    Building configuration...
     !
     poe enable
     no switchport
     ip ospf network point-to-point
     ip ospf authentication message-digest
     ip ospf message-digest-key 23 md5 888
     ip ospf hello-interval 3
     ip ospf dead-interval 10
     ip ospf priority 0
     no ip proxy-arp
     ip address 192.168.**.** 255.255.255.252
     ip address 192.169.**.** 255.255.255.252 secondary
     ip address 192.168.**.** 255.255.255.252 secondary
     !
    end2 secondary