# 網路管理筆記 ###### tags: `network` `operations` ## 國際電路 故障維修 - 檢查 interface - 告知中華電信 - 確認 Tx Rx 光強度 - show optic [Slot Number] - 都沒問題後 確認 interface up link up ## SNMP 計算 - RX utilization $utilization_{Rx}=\frac{\Delta iflnOctets} {ifSpeed \times \Delta sysUpTime}$ - Tx utilization $utilization_{Tx}=\frac{\Delta ifOtOctets} {ifSpeed \times \Delta sysUpTime}$ - rate of receive package drop $Packet Drop_{Rx}=\frac{\Delta ifInDiscards}{\Delta sysUpTime}$ - rate of transmit package drop $Packet Drop_{Tx}=\frac{\Delta ifOutDiscards}{\Delta sysUpTime}$ - rate of receive package error $Packet Error_{Rx}=\frac{\Delta ifInErrors}{\Delta sysUpTime}$ - rate of transmit package error $Packet Error_{Tx}=\frac{\Delta ifOutErrors}{\Delta sysUpTime}$ - rate of receive Broadcast $B_{Rx}=\frac{\Delta ifHCInBroadcastPkts}{\Delta sysUpTime}$ - rate of transmit Broadcast $B_{Tx}=\frac{\Delta ifHCOutBroadcastPkts}{\Delta sysUpTime}$ - Discards of receive $D_{Rx}=\frac{\Delta ifInDiscards}{\Delta sysUpTime}$ - Discards of transmit $D_{Tx}=\frac{\Delta ifOutDiscards}{\Delta sysUpTime}$ ![](https://i.imgur.com/UrpBeDw.png) - 參考來源:http://thuir.thu.edu.tw/retrieve/7615/092THU00392007-001.pdf ## SNMP OID 資訊 - juniper [http://mibs.observium.org/mib/JUNIPER-DOM-MIB/](http://mibs.observium.org/mib/JUNIPER-DOM-MIB/) - 1.3.6.1.4.1.2636 - MLXe4 [http://oid-info.com/get/1.3.6.1.4.1.1991.1.1.3.3.6.1](http://oid-info.com/get/1.3.6.1.4.1.1991.1.1.3.3.6.1) - 1.3.6.1.4.1.1991 - N7K - SNMP Polling of optical budget - URL : [https://community.cisco.com/t5/xr-os-and-platforms/snmp-polling-of-optical-budget-dbm/td-p/2735006](https://community.cisco.com/t5/xr-os-and-platforms/snmp-polling-of-optical-budget-dbm/td-p/2735006) - 取得 sencer ID : 1.3.6.1.2.1.47.1.1.1.1.7 - 取得 sencer 值 : [https://oidref.com/1.3.6.1.4.1.9.9.91.1.1.1.1.7](https://oidref.com/1.3.6.1.4.1.9.9.91.1.1.1.1.7) ## 網路設備操作 以及 SNMP ### juniper (QFX 10002) - 查詢 interface 光訊號相關資訊 ``` bash show interfaces diagnostics optics [Interface name / ifName] ``` | oid | object name | name on router | unit | | ----------------------------------- | ---------------------------------- | ------------------------ | --------- | | 1.3.6.1.4.1.2636.3.60.1.2.1.1.1 | jnxDomLaneIndex | Lane | | | 1.3.6.1.4.1.2636.3.60.1.2.1.1.6 | jnxDomCurrentLaneRxLaserPower | Laser receiver power | dBm | | 1.3.6.1.4.1.2636.3.60.1.2.1.1.7 | jnxDomCurrentLaneTxLaserBiasCurrent| Laser bias current | mA | | 1.3.6.1.4.1.2636.3.60.1.2.1.1.8 | jnxDomCurrentLaneTxLaserOutputPower| Laser output power | dBm | | 1.3.6.1.4.1.2636.3.60.1.2.1.1.9 | jnxDomCurrentLaneLaserTemperature | Module temperature | degrees c | ### MLXe4 - 查詢 interface 光訊號相關資訊 ``` bash show optic [Slot Number] ``` | oid | object name | name on router | unit | | -------------------------------- | ---------------------------------- | ------------------------ | --------- | | 1.3.6.1.4.1.1991.1.1.3.3.6.1.3 | snIfOpticalMonitoringRxPower | Rx power | dBm | | 1.3.6.1.4.1.1991.1.1.3.3.6.1.4 | snIfOpticalMonitoringTxBiasCurrent | Tx Bias Current | mA | | 1.3.6.1.4.1.1991.1.1.3.3.6.1.2 | snIfOpticalMonitoringTxPower | Tx power | dBm | | 1.3.6.1.4.1.1991.1.1.3.3.6.1.1 | snIfOpticalMonitoringTemperature | Temperature | degrees c | ### N7K - 查詢 interface 光訊號相關資訊 ``` bash show interface ethernet [Slot Number/Port Number] transceiver details ``` | oid | object name | name on router | unit | | ------------------------------ | --------------- | ------------------------ | --------- | | 1.3.6.1.4.1.9.9.91.1.1.1.1.4 | entSensorValue | Rx power | dBm | | 1.3.6.1.4.1.9.9.91.1.1.1.1.4 | entSensorValue | Tx Bias Current | mA | | 1.3.6.1.4.1.9.9.91.1.1.1.1.4 | entSensorValue | Tx power | dBm | | 1.3.6.1.4.1.9.9.91.1.1.1.1.4 | entSensorValue | Temperature | degrees c | - 注意: - 在 N7K 上,interface 的測量值 (溫度,電流,光訊號(Rx Tx)) 都對應到一個 sensor ID,必須要先取得 interface sensor ID 之後,再跟 entSensorValue 去比對所得到的資料,是屬於那一個值