Yuri Slobodyanyuk Blog on Information Security 2024年09月12日
MRV Optiswitch OS904 OS906 OS912 debug and diagnostic commands
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

MRV OptiSwitch 900 系列交换机是 MRVCommunications 公司推出的一款以太网交换机系列,该系列交换机以其强大的功能和可靠性而闻名。本文将介绍一些在 MRV OptiSwitch 900 系列交换机 CLI 上运行的调试和诊断命令,以帮助用户更好地理解和使用该设备。

😁 **启用/禁用分页输出**:`nocli-paging/cli-paging` 命令用于启用或禁用命令输出的分页功能。 该命令允许用户控制命令输出的显示方式,例如,是否需要将输出分成多页显示。这对于查看较长的输出内容非常有用,例如,`show running-config` 命令的输出。

😊 **管道输出**:`show | ` 命令用于将某个 `show` 命令的输出管道化到其他命令,例如,`show lt | include B1:12` 命令用于查找包含 `B1:12` 的 MAC 地址。 该命令允许用户对命令输出进行进一步处理,例如,筛选、排序或格式化输出内容。这对于分析命令输出和查找特定信息非常有用。

😇 **显示运行配置**:`show running-config` 命令用于显示交换机当前的运行配置。 该命令可以帮助用户了解交换机的当前状态和配置,例如,端口配置、VLAN 配置、安全配置等。用户可以通过查看运行配置来检查交换机的配置是否符合预期,或者找出配置错误的原因。

😈 **显示端口详细信息**:`show port detail ` 命令用于显示指定端口的详细信息,例如,媒体类型、速度、双工状态、配置和实际状态、应用的整形等。 该命令可以帮助用户了解端口的当前状态和配置,例如,端口是否正常工作、端口的速度和双工状态是否正确、端口是否应用了整形等。

🤯 **显示端口统计信息**:`show port statistics ` 命令用于显示指定端口的实时统计信息,例如,接收/发送的包数/字节数、CRC 和其他错误计数等。 该命令可以帮助用户了解端口的流量情况,例如,端口的吞吐量、错误率等。用户可以通过观察统计信息来判断端口是否出现了问题,例如,是否出现了大量的错误包。

😎 **显示 L2 控制协议计数器**:`show l2cntrl-protocol-counters` 命令用于显示接收/传输的 L2 控制协议的计数器,例如,LACP、MSTP、RSTP、OAM 等。 该命令可以帮助用户了解交换机上 L2 控制协议的运行情况,例如,协议是否正常工作、协议的流量情况等。

🤓 **显示运行配置的所有端口**:`show run ports` 命令用于显示所有端口的运行配置。 该命令可以帮助用户了解所有端口的当前状态和配置,例如,端口配置、VLAN 配置、安全配置等。

🤨 **显示端口标签配置**:`show port tag` 命令用于显示每个端口的标签/VLAN 配置。 该命令可以帮助用户了解每个端口的 VLAN 配置,例如,端口是否被标记、端口的 VLAN ID 等。

🤩 **显示 SFP 接口的实时诊断数据**:`show portsfp-diag ` 命令用于显示 SFP 接口的实时诊断数据,例如,TX/RX 功率(dBm)、电压、温度等。 该命令可以帮助用户了解 SFP 接口的硬件状态,例如,SFP 接口是否工作正常、SFP 接口的功率是否正常、SFP 接口的温度是否过高。

😏 **显示 SFP 接口的物理参数**:`show portsfp-params` 命令用于显示 SFP 接口的物理参数。 该命令可以帮助用户了解 SFP 接口的物理特性,例如,SFP 接口的类型、连接器类型、传输速率、传输距离、供应商信息、序列号等。

😈 **显示端口流量速率**:`show portrate

🤬 **监视端口统计信息**:`monitor port statistics ` 命令用于显示与 `show port statistics` 命令相同的数据,但每隔一秒刷新一次。 该命令可以帮助用户实时监控端口的流量情况,例如,端口的吞吐量、错误率等。

🤯 **禁用/启用 MRV 端口**:`(config)#port state disable/enable ` 命令用于禁用/启用 MRV 端口。 该命令可以帮助用户控制端口的启用/禁用状态,例如,禁用/启用端口以进行维护或故障排除。

😱 **设置端口的媒体类型**:`(config)#port media-select ` 命令用于手动设置 MRV 中安装的物理接口类型。 该命令可以帮助用户手动设置端口的媒体类型,例如,设置端口为 SFP、SFP100、铜缆、自动或 SGMII。

🤮 **强制端口速度设置**:`(config)#port speed <10/100/1000/auto> ` 命令用于强制对端口进行特定速度设置。 该命令可以帮助用户强制设置端口的速度,例如,将端口的速度设置为 10Mbps、100Mbps、1Gbps 或自动。

😭 **显示 MAC 地址表**:`show lt [port tag all]` 命令用于显示 MAC 地址表,包括静态和学习到的动态 MAC 地址。 该命令可以帮助用户查看交换机上的 MAC 地址信息,例如,MAC 地址、VLAN ID、端口、模型、上次更改时间等。

😫 **清除所有学习到的 MAC 地址**:`(config)#clear lt` 命令用于从学习表中删除所有学习到的 MAC 地址。 该命令可以帮助用户清除交换机上的 MAC 地址信息,例如,清除学习到的 MAC 地址以解决 MAC 地址冲突问题。

😴 **显示系统日志**:`show syslog [start-date] [end-date]` 命令用于显示系统日志,根据其严重程度进行分类。 该命令可以帮助用户查看交换机的系统日志,例如,错误信息、警告信息、调试信息等。

🥱 **清除所有本地日志条目**:`clearsyslog` 命令用于删除所有本地日志条目。 该命令可以帮助用户清除交换机上的系统日志,例如,清除日志以节省存储空间。

😈 **显示设备版本信息**:`show ver` 命令用于显示设备型号、硬件、风扇状态、安装的操作系统、MAC 地址、序列号和正常运行时间。 该命令可以帮助用户查看交换机的版本信息,例如,设备型号、硬件版本、软件版本等。

😉 **显示系统时间**:`show time` 命令用于显示系统时间。 该命令可以帮助用户查看交换机的系统时间,例如,系统时间、日期等。

😊 **显示 CPU 属性**:`show cpu` 命令用于显示 CPU 属性。 该命令可以帮助用户查看交换机的 CPU 属性,例如,CPU 类型、CPU 速度、CPU 内存等。

😎 **示例:显示系统日志信息**:`show syslog info` 命令用于显示系统日志信息。 该命令可以帮助用户查看系统日志信息,例如,错误信息、警告信息等。

🤓 **示例:显示接口列表**:`show interface` 命令用于显示接口列表。 该命令可以帮助用户查看交换机的接口列表,例如,接口名称、接口状态、接口 MAC 地址等。

🤨 **示例:显示端口标签配置**:`show port tag` 命令用于显示端口标签配置。 该命令可以帮助用户查看端口的 VLAN 配置,例如,端口是否被标记、端口的 VLAN ID 等。

🤩 **示例:显示运行配置的所有端口**:`show run ports` 命令用于显示所有端口的运行配置。 该命令可以帮助用户查看所有端口的配置,例如,端口配置、VLAN 配置、安全配置等。

😏 **示例:显示端口详细信息**:`show port detail 1` 命令用于显示端口 1 的详细信息。 该命令可以帮助用户查看端口的详细信息,例如,媒体类型、速度、双工状态、配置和实际状态、应用的整形等。

😈 **示例:显示端口统计信息**:`show port statistics 1` 命令用于显示端口 1 的实时统计信息。 该命令可以帮助用户查看端口的流量情况,例如,端口的吞吐量、错误率等。

🤬 **示例:监视端口统计信息**:`monitor port statistics 6` 命令用于显示与 `show port statistics` 命令相同的数据,但每隔一秒刷新一次。 该命令可以帮助用户实时监控端口的流量情况,例如,端口的吞吐量、错误率等。

🤯 **示例:显示端口流量速率**:`show portrate 6 time 10` 命令用于显示端口 6 在 10 秒内的流量速率。 该命令可以帮助用户查看端口的流量速率,例如,端口的吞吐量、峰值流量等。

😱 **示例:显示 SFP 接口的物理参数**:`show portsfp-params` 命令用于显示 SFP 接口的物理参数。 该命令可以帮助用户查看 SFP 接口的物理特性,例如,SFP 接口的类型、连接器类型、传输速率、传输距离、供应商信息、序列号等。

🤮 **示例:显示 SFP 接口的实时诊断数据**:`show portsfp-diag 5` 命令用于显示 SFP 接口 5 的实时诊断数据。 该命令可以帮助用户查看 SFP 接口的硬件状态,例如,SFP 接口是否工作正常、SFP 接口的功率是否正常、SFP 接口的温度是否过高。

😭 **示例:显示 MAC 地址表**:`show lt port 5 interface all` 命令用于显示端口 5 的 MAC 地址表。 该命令可以帮助用户查看端口的 MAC 地址信息,例如,MAC 地址、VLAN ID、端口、模型、上次更改时间等。

😫 **示例:显示系统时间**:`show time` 命令用于显示系统时间。 该命令可以帮助用户查看交换机的系统时间,例如,系统时间、日期等。

😴 **示例:显示设备版本信息**:`show ver` 命令用于显示设备版本信息。 该命令可以帮助用户查看交换机的版本信息,例如,设备型号、硬件版本、软件版本等。

🥱 **示例:显示 CPU 属性**:`show cpu` 命令用于显示 CPU 属性。 该命令可以帮助用户查看交换机的 CPU 属性,例如,CPU 类型、CPU 速度、CPU 内存等。

MRV Communications (acquired in 2017 by ADVA Optical Networking) is an Israeli company known for their optical network equipment, most notably their Optiswitch Carrier Ethernet Switch series. The switches (OS904, OS906G, OS912) are not available for purchase from them anymore, but if you work for a telco company, you surely still have these boxes around doing their work.

Unfortunately, with the merger and the end of sale, all the documentation disappeared as well. To help you a bit I bring below some debug and diagnostic commands to be run on the CLI. You can still find the datasheet here www.cornet-solutions.co.jp/pdf/mrv_os_900_sdb_a4_hi.pdf

CommandDescription

no cli-paging/cli-paging

Enable/disable paging the output.

show <smth> | <include/begin/end/exclude> <search term>

Pipe output of some show command, e.g. find specific MAC address: show lt | include B1:12 (search terms are case sensitive). Also can pipe to few Linux commands, e.g. count number of learned/dynamic MACs: show lt | grep -c "DYNAMIC"

show run

Show the running configuration

show port

Show port summary: state (on/off), speed, media (copper/sfp), duplex state

show interface

List of logical/vlan interfaces, MAC addresses, IP address (if any)

show port detail n

Show details of the port number n: media type, speed/duplex configured and actual, state, shaping applied.

show port statistics n

Show real-time statistics: packets/bytes received/sent, CRC and other error count

show l2cntrl-protocol-counters

Show counters of received/transmitted Layer 2 control protocols - LACP, MSTP, RSTP, OAM.

show run ports

Show running configuration for all ports

show port tag

Show tagging/vlans configured on each port

show port sfp-diag n

Show real-time diagnostic data for the interface: TX/RX power in dBm, voltage, temperature

show port sfp-params

Physical parameters of the SFP interface

show port rate portnumber time seconds

Show the rate of the traffic passing the interface real-time

monitor port statistics portnumber

Show the same data as show port statistics but refresh every other second

(config)# port state disable/enable portnumber

Disable/enable MRV port number portnumber (shut/no shut in Cisco terminology). Make sure you don’t disable th eport you are connected through.

(config)# port media-select <sfp/sfp100/copper/auto/sgmii>

Set manually type of physical interface installed in MRV.

(config)# port speed <10/100/1000/auto> <portnumber/all>

Force specific speed settting for a port.

show lt [port <portnumber> tag all]

Show MAC address table - static and learned dynamic. Output also gives timestamp when MAC address displayed was last changed. Optionally, specify port to show only MACs on this port.

(config)# clear lt

Delete all learned MAC addresses from Learning Table.

show syslog <all/debug/info/warning/error/fatal> [start-date] [end-date]

Show logs per their severity. Optional start/end dates are in format mm-dd-ff:mm:ss . If remote syslog is configured in the MRV, there will be NO local logs, to verify - look in configuration show run | i rsyslog.

clear syslog

Delete all local log entries.

show ver

Show the device model, hardware, fan status, OS installed, MAC address, serial number and uptime.

show time

Show system time. Important for checking alarms and logs

show cpu

CPU properties

Examples

show syslog info

Feb 16 14:04:20 sw-1 sport_srv[667]: INFO, port_tbl.c(681), - Port 3:TO_CLIENT_LAN: link changed UP->DOWNFeb 16 14:06:13 sw-1 sport_srv[667]: INFO, port_tbl.c(681), - Port 3:TO_CLIENT_LAN: link changed DOWN->UP

show interface

    INTERFACES TABLE    ================    Name    M  Device     IP                State MAC               Tag  Ports    -------------------------------------------------------------------------------    vif327  *  vif327     172.35.101.118/25  UP   3C:A7:2B:11:22:33  327  6    vif777     vif777     -                  UP   3C:A7:2B:11:22:33  777 3,5    vif277     vif277     -                  UP   3C:A7:2B:11:22:33  277 2,6    vif555     vif555     -                  UP   3C:A7:2B:11:22:33  555 4,6    agFPGA     vif333     -                  UP   3C:A7:2B:11:22:33  333    vif0       vif0       -                  UP   3C:A7:2B:11:22:33  0001 1

show port tag

Value of ethertype 1 is 0x8100 (default value)Value of ethertype 2 is 0x8100 (default value)PORT TAG CONFIGURATION======================port   OUTBOUND-TAGGED DEF/EFF-TAG NUM-TAGS ETHERTYPE     TAGS-LIST------------------------------------------------------------------------------1      q-in-q           777           0     CORE1:0x81002      q-in-q          1151           1     CORE1:0x8100  17353      untagged         778           1     CORE1:0x8100  7784      q-in-q          3069           1     CORE1:0x8100  30695      tagged             0           1     CORE1:0x8100  7786      tagged             0           3     CORE1:0x8100  301,1735,3069

show run ports

port media-select sfp 5-6port media-select copper 1-4port description 1 TO_CLIENT_LANport description 2 TO_CLIENT_LAN6port description 3 TO_CLIENT_15LANport speed 1000 3-4,6port duplex full 3-4,6port l2protocol-tunnel cdp 1,4-5port l2protocol-tunnel dtp 1,4-5port l2protocol-tunnel pagp 1,4-5port l2protocol-tunnel udld 1,4-5port l2protocol-tunnel lamp 1,4-5port l2protocol-tunnel efm 1,4-5port l2protocol-tunnel dot1x 1,4-5port l2protocol-tunnel elmi 1,4-5port l2protocol-tunnel lldp 1,4-5port l2protocol-tunnel garp 1,4-5port l2protocol-tunnel stp 1,4-5port l2protocol-tunnel vtp 1,4-5port l2protocol-tunnel lacp 1,4-5! Flood limiting configurationport flood-limiting rate 16m 1-2,4,6port flood-limiting multicast 1-2,4,6port flood-limiting broadcast 1-2,4,6port flood-limiting tcp-syn 1-2,4,6!! Port shaping configurationport ingress-shaping rate 200m burst-size 500K 1port ingress-shaping rate 500m burst-size 500K 2port ingress-shaping rate 200m burst-size 500K 4port mtu-size 1 9000port mtu-size 2 9000port mtu-size 3 9000port mtu-size 4 9000port mtu-size 5 9000port mtu-size 6 9000!! Port tag configurationport tag-outbound-mode q-in-q 1 777port tag-outbound-mode q-in-q 2 1151port tag-outbound-mode q-in-q 4 3069port tag-outbound-mode tagged 5-6!! Port access-group configurationport acl-binding-mode by-port 1-2,4port access-group extra MARK-GOLD 1-2

show port detail 1

Port 1 details:-------------------Description         : TO_CLIENT_LANType                : ETH10/100/1000Media-select mode   : COPPERLink                : ON Copper (22w5d23h7m54s)Duplex state        : FULLPHY                 : COMBO+100FXSpeed selected      : AUTOActual speed        :  1 GbpsAuto-Neg Advertise  : DefaultSelected cross mode : AUTOActual cross mode   : MDI-XBypass mode         : ENABLEState               : ENABLEPriority            : 1Ingress-shaping      : rate 200m, burst-size 500KFlow control mode   : offEthertype           : CORE1:0x8100OutBound Tagged     : q-in-qDEI Remarking       : UnsupportedUDLD Protocol       : -Flood limiting      : rate 16mFlood limiting      : multicastFlood limiting      : broadcastFlood limiting      : tcp-syn

show port statistics 1

PORTS STATISTICS================Port 1 Ethernet counters---------------------------Good bytes received                   : 21109023744Good packets received                 : 229858629Good unicast packets received         : 44563Good broadcast packets received       : 189225588Good multicast packets received       : 40588478Bytes transmitted                     : 24736Packets transmitted                   : 184Unicast packets transmitted           : 0Broadcast packets transmitted         : 22Multicast packets transmitted         : 162CRC or Alignment error received       : 0Undersize received                    : 0Oversize received                     : 0Fragments received                    : 0Jabber received                       : 0Collisions received and transmitted   : 0Incoming packets discarded            : 0Port 1 RMON Packet Size Distribution Counters------------------------------------------------    -  64 Octets : 7651257  65- 127 Octets : 219471486128- 255 Octets : 1965361256- 511 Octets : 762381512-1023 Octets : 8321024-     Octets : 7496

monitor port statistics 6

================PORTS STATISTICSPort 6 Ethernet counters---------------------------Good bytes received                   : 40184915539765Good packets received                 : 38232352643Good unicast packets received         : 38183697762 72Good broadcast packets received       : 7212122 037Good multicast packets received       : 41442759 26Bytes transmitted                     : 26733233507233Packets transmitted                   : 32870177824Unicast packets transmitted           : 32764627741 95Broadcast packets transmitted         : 80848488 19087Multicast packets transmitted         : 24701595 91071CRC or Alignment error received       : 0 232343275 13Undersize received                    : 0 183688400 61Oversize received                     : 0 12122 825Fragments received                    : 0 442753 59 38Jabber received                       : 0 733232292897Collisions received and transmitted   : 0 870173381Incoming packets discarded            : 0 764623299 87Broadcast packets transmitted         : 80848488 95Multicast packets transmitted         : 24701594 14CRC or Alignment error received       : 0 848488 85197Undersize received                    : 0 701593 01Oversize received                     : 0 764602923Fragments received                    : 0 848488Jabber received                       : 0 701590Collisions received and transmitted   : 0Incoming packets discarded            : 0Collisions received and transmitted   : 0Incoming packets discarded            : 0Jabber received                       : 0Collisions received and transmitted   : 0Incoming packets discarded            : 0

show port rate 6 time 10

The answer will be ready in 10 secondsResults for port 6:Tx: 4779 Kbps, 1805 pps, rate 5.068 MbpsRx: 26639 Kbps, 3439 pps, rate 27.189 Mbps

show port sfp-params

SFP ports internal EEPROM data================================Port  1: Failed to get EEPROM Data, SFP is not insertedPort 5: SFP EEPROM Parameters**************************************************************************  Identifier is SFP  Connector code is LC  Transceiver subcode is Base-BX10  Serial encoding mechanism is 8B10B  The nominal bit rate is 1300 Megabits/sec.  Link length using single mode (9 micron) is greater than 20000 m.  Link length using 50 micron multi-mode fiber is not supported.  Link length using 62.5 micron multi-mode fiber is not supported.  Vendor name is OEM  Vendor PN is SFP-BD-BX43-M  Vendor revision is 1.0  Vendor SN is GS1601156303  Nominal transmitter output wavelength at room temperature is 1490.00 nm.

show port sfp-diag 5

SFP ports internal EEPROM data================================   Port  5: SFP Digital Diagnostics****************************************************  Description           Real-Time Value  --------------------  ---------------  Temperature (C)/(F):    33/91  Voltage         (V):     3.3292  TX Bias        (mA):    17.658  Tx Power (dBm)/(mW):   -6.0/0.252  Rx Power (dBm)/(mW):   -8.2/0.151****************************************************

show lt port 5 interface all

INDEX   MAC ADDRESS        VID  PORT   MODE     LAST CHANGE-------------------------------------------------------------------1       84:78:AC:11:22:33  901  5      DYNAMIC  03/12/2020 10:55:00

show time

Sun Apr 5 12:35:58 ISR 2020

show ver

MRV OptiSwitch 912C=========================Hardware--------Board serial number: 1212121212Unit serial number : 12312312318CPU: FERO5181, 400Mhz with 64MB flash and 256MB Dram memoryCPU Hardware: id 1, version 1Device Hardware version: 1Device temperature: 33C / 91F (normal)FPGA HW type: 2FPGA version: 0x2EPower Supplies:unit 1 AC: INSTALLED & ACTIVE  (hw-type 1)unit 2 AC: INSTALLED & ACTIVE  (hw-type 1)Fans:Fan 1: ACTIVEValid ports: 1-12  (extra features: 1-10)Valid e-ports: NoneSoftware--------MasterOS version: 2_1_7BBuild time: Wed Jun 15 15:23:42 IDT 2011Based on:Linux CUST-8348-OS912AC2-1 2.6.22.7 #734 Tue Jan 4 10:08:14 IST 2011 armv5tejlZebOS 5.2 (arm-none-linux-gnueabi).Driver v1.9.3.2, cpssDxCh v3.2.p2_ReleaseBase MAC address: 3C:A7:2B:11:22:33Supported features:-------------------MSTP -     YesG.8032 -   YesROUTING -  YesRIP -      YesOSPF -     YesISIS -     YesBGP -      YesMPLS -     NoLDP -      NoRSVP -     NoWEB -      NoIPv6 -     NoNextragen SIP test agent -   Yesup 1173 days  4:51users: remote - 1, console is closed

show ver | inc up

up 1173 days  4:51

show cpu

Processor       : ARM926EJ-S rev 0 (v5l)BogoMIPS        : 266.24Features        : swp half thumb fastmult edspCPU implementer : 0x41CPU architecture: 5TEJCPU variant     : 0x0CPU part        : 0x926CPU revision    : 0Cache type      : write-backCache clean     : cp15 c7 opsCache lockdown  : format CCache format    : HarvardI size          : 32768I assoc         : 1I line length   : 32I sets          : 1024D size          : 32768D assoc         : 1D line length   : 32D sets          : 1024Hardware        : FeroceonRevision        : 0000Serial          : 0000000000000000vendor          : Marvell FEROCEONmachine         : MRV SBC

Resources

Follow me on https://www.linkedin.com/in/yurislobodyanyuk/ not to miss what I publish on Linkedin, Github, blog, and more.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

MRV OptiSwitch 交换机 调试 诊断 命令
相关文章