美文网首页
网络设备光纤链路打环诊断方法

网络设备光纤链路打环诊断方法

作者: A04 | 来源:发表于2020-04-06 15:46 被阅读0次

      在IP网络中,光纤链路出现故障是经常出现的事情,光纤链路中间经过ODF、传输设备等多个节点,所以需要掌握诊断、定位故障位置的方法,一般就是采用在光纤链路的不同节点上,向端点设备打环,通过在端点设备上查看打环效果,来确认打环是否成功,如果打环成功,说明端点设备到打环节点之间的光路是正常。
      下面以cisco路由器为例,说明cisco路由器上使用哪些指令

    一、查看收发光功率

      查看端口的收发光功率是否正常?如下,通过命令可以看到端口的发光功率为-5.9dBm,发光功率为-7.1dBm,都在正常范围内,没有超过正常阈值;收发光功率在正常范围内,是打环测试的首要观察对象,如果收光功率太低,则要在不同节点上打环,确认哪个节点开始收光功率开始异常,来定位故障点;

    C7609#show interface gigabitEthernet 1/11 transceiver detail 
    Transceiver monitoring is disabled for all interfaces.
    
    ITU Channel not available (Wavelength not available),
    Transceiver is internally calibrated.
    mA: milliamperes, dBm: decibels (milliwatts), NA or N/A: not applicable.
    ++ : high alarm, +  : high warning, -  : low warning, -- : low alarm.
    A2D readouts (if they differ), are reported in parentheses.
    The threshold values are calibrated.
    
                                  High Alarm  High Warn  Low Warn   Low Alarm
               Temperature        Threshold   Threshold  Threshold  Threshold
    Port       (Celsius)          (Celsius)   (Celsius)  (Celsius)  (Celsius)
    ---------  -----------------  ----------  ---------  ---------  ---------
    Gi1/6        26.3                   89.0       85.0       -5.0       -9.0
    
                                  High Alarm  High Warn  Low Warn   Low Alarm
               Voltage            Threshold   Threshold  Threshold  Threshold
    Port       (Volts)            (Volts)     (Volts)    (Volts)    (Volts)
    ---------  -----------------  ----------  ---------  ---------  ---------
    Gi1/6        3.32                   3.59       3.50       3.09       3.00
    
                                  High Alarm  High Warn  Low Warn   Low Alarm
               Current            Threshold   Threshold  Threshold  Threshold
    Port       (milliamperes)     (mA)        (mA)       (mA)       (mA)
    ---------  -----------------  ----------  ---------  ---------  ---------
    Gi1/6        13.1                    N/A        N/A        N/A        N/A
    
               Optical            High Alarm  High Warn  Low Warn   Low Alarm
               Transmit Power     Threshold   Threshold  Threshold  Threshold
    Port       (dBm)              (dBm)       (dBm)      (dBm)      (dBm)
    ---------  -----------------  ----------  ---------  ---------  ---------
    Gi1/6        -7.1                    0.9       -3.0       -9.5      -13.5
    
               Optical            High Alarm  High Warn  Low Warn   Low Alarm
               Receive Power      Threshold   Threshold  Threshold  Threshold
    Port       (dBm)              (dBm)       (dBm)      (dBm)      (dBm)
    ---------  -----------------  ----------  ---------  ---------  ---------
    Gi1/6        -5.9                    0.9       -3.0      -19.0      -23.0
    
    

    二、查看端口收发包数量

      有些设备支持在端口状态下,直接查看是否检测到环路,但有些设备就不支持,对于不支持的设备,可以通过观察端口的收发包数量,来确认是否正常环路。
      先完成“硬环”或“软环”操作,“硬环”即物理上将某个ODF架或设备侧的收发两根尾纤使用法兰盘连接起来,“软环”即传输设备上向端点设备打环,完成打环操作后,就是端点设备上的操作了。
      首先,要将端口的计数器清零,使用命令clear counter gigabitEthernet 1/1,将端口各计数器都先清零。

    C7609#clear counters gigabitEthernet 1/11
    Clear "show interface" counters on this interface [confirm]y
    C7609#show interfaces gigabitEthernet 1/11
    GigabitEthernet1/11 is down, line protocol is down (notconnect)
      Hardware is C7600 1Gb 802.3, address is c067.af4b.1440 (bia c067.af4b.1440)
      Description: S9306_G6/0/0
      Internet address is 192.168.87.146/30
      MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 
         reliability 255/255, txload 0/255, rxload 0/255
      Encapsulation ARPA, loopback not set
      Keepalive set (10 sec)
      Full-duplex, 1000Mb/s
      input flow-control is off, output flow-control is off
      Clock mode is auto
      ARP type: ARPA, ARP Timeout 04:00:00
      Last input never, output never, output hang never
      Last clearing of "show interface" counters 00:00:06
      Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
      Queueing strategy: fifo
      Output queue: 0/40 (size/max)
      5 minute input rate 0 bits/sec, 0 packets/sec
      5 minute output rate 0 bits/sec, 0 packets/sec
      L2 Switched: ucast: 0 pkt, 0 bytes - mcast: 0 pkt, 0 bytes
      L3 in Switched: ucast: 0 pkt, 0 bytes - mcast: 0 pkt, 0 bytes mcast
      L3 out Switched: ucast: 0 pkt, 0 bytes mcast: 0 pkt, 0 bytes
         0 packets input, 0 bytes, 0 no buffer
         Received 0 broadcasts (0 IP multicasts)
         0 runts, 0 giants, 0 throttles
         0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 watchdog, 0 multicast, 0 pause input
         0 input packets with dribble condition detected
         0 packets output, 0 bytes, 0 underruns
         0 output errors, 0 collisions, 0 interface resets
         0 unknown protocol drops
         0 babbles, 0 late collision, 0 deferred
         0 lost carrier, 0 no carrier, 0 pause output
         0 output buffer failures, 0 output buffers swapped out
    C7609#
    

      其次,正常情况下,设备会自动发送一些协商之类的报文,所以即使不人为手动发包,此时端口的发包数量也会不断增加,假如打环正常的话,此时发包数量和收包数量是一致的,说明从打环位置到端点设备之间链路正常;如果此时收发包数量不一致,则说明打环异常,从打环的位置到端点设备之间链路有故障,需要将打环位置,往端点设备靠近,继续打环测试。
      使用命令show interfaces gigabitEthernet 1/11后,观察输出结果中的下面这两行;

    C7609#show interfaces gigabitEthernet 1/11
    
         xxx packets input, 0 bytes, 0 no buffer
    
         xxx packets output, 0 bytes, 0 underruns
    
    

      最后,可以通过人为发ping包,确认打环效果,本例中端口上配置的IP地址为192.168.87.146/30,而且端口状态为up,所以在设备上向网段192.168.87.146/30其他主机IP发送ping包的话,报文会从这个端口发送出去,用来测试发出去的报文,是否会经过环路返回。
      通过ping指令发送ping报文,观察端口的收发报文数量,收报文数量可能会有一定的延迟,短时间收发包不一致,可能过几秒就恢复一致;如果经过ping包测试,端口的收发包数量还能保持一致,则说明环路正常。

    C7609#ping 192.168.87.145 repeat 10
    
    Type escape sequence to abort.
    Sending 10, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
    ..........
    Success rate is 0 percent (0/10)
    C7609#show interfaces gigabitEthernet 1/11
    
         xxx packets input, 0 bytes, 0 no buffer
    
         xxx packets output, 0 bytes, 0 underruns
    
    

      以上链路打环诊断方法,绝大多数网络设备都使用,不需要再为设备接口无法查看环回状态而苦恼。

    相关文章

      网友评论

          本文标题:网络设备光纤链路打环诊断方法

          本文链接:https://www.haomeiwen.com/subject/pofbphtx.html