aos_r6_abfrage_mit_snmpv3_und_reboot
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
aos_r6_abfrage_mit_snmpv3_und_reboot [2016/08/29 18:59] – angelegt benny | aos_r6_abfrage_mit_snmpv3_und_reboot [2024/06/09 10:29] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Wie kann ein OmniSwitch per SNMPv3 abgefragt werden oder per SNMPv3 rebootet werden? ====== | + | ====== Wie kann ein OmniSwitch |
- | In diesem kurzen Artikel geht es darum wie ein Switch | + | In diesem kurzen Artikel geht es darum wie ein OmniSwitch mit AOS Release 6 per SNMPv3 abgefragt werden kann und wie man einen Reboot durchführen könnte. |
===== Einen snmpwalk per SNMPv3 durchführen ===== | ===== Einen snmpwalk per SNMPv3 durchführen ===== | ||
Zeile 11: | Zeile 11: | ||
<WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
- | Das hinterlegte Passwort auf dem OmniSwitch ist " | + | Das hinterlegte Passwort auf dem OmniSwitch ist " |
</ | </ | ||
- | < | + | < |
BennyE$ snmpwalk -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 | BennyE$ snmpwalk -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 | ||
SNMPv2-MIB:: | SNMPv2-MIB:: | ||
Zeile 37: | Zeile 37: | ||
IF-MIB:: | IF-MIB:: | ||
.... | .... | ||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 60%> | ||
+ | Einige OIDs enden auf .65 und funktionieren im snmpset auch nur wenn diese .65 dort steht. Diese ominöse .65 ist das primäre Chassis-Management-Module (CMM), das teilweise natürlich virtuell abgebildet ist! | ||
+ | </ | ||
+ | |||
+ | ==== snmpwalk ohne AOS 6.7.1.R03 MIBs ==== | ||
+ | <code bash> | ||
+ | BennyE$ snmpwalk -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1 | ||
+ | SNMPv2-SMI:: | ||
+ | SNMPv2-SMI:: | ||
+ | SNMPv2-SMI:: | ||
+ | SNMPv2-SMI:: | ||
+ | SNMPv2-SMI:: | ||
+ | SNMPv2-SMI:: | ||
+ | SNMPv2-SMI:: | ||
+ | SNMPv2-SMI:: | ||
+ | </ | ||
+ | |||
+ | ==== snmpwalk mit AOS 6.7.1.R03 MIBs ==== | ||
+ | <code bash> | ||
+ | BennyE$ snmpwalk -v3 -m ALL -M +/ | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== write memory flash-synchro ===== | ||
+ | |||
+ | Die Konfiguration kann natürlich auch über SNMPv3 gespeichert und zertifiziert werden. Dabei ist zu beachten dass man wissen muss ob es sich um ein redundantes System (VC/ | ||
+ | |||
+ | <code bash> | ||
+ | 1.3.6.1.4.1.6486.800.1.2.1.11.1.1.1.43.0 | ||
+ | |||
+ | configWriteMemory OBJECT-TYPE | ||
+ | SYNTAX INTEGER (0..1) | ||
+ | MAX-ACCESS read-write | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "A set of this object causes | ||
+ | the entire switch snap-shot configuration to | ||
+ | be stored in the boot.cfg file in the | ||
+ | working directory." | ||
+ | DEFVAL | ||
+ | ::= { configManager 43 } | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.2.1.11.1.1.1.43.0 i 1 | ||
+ | SNMPv2-SMI:: | ||
+ | |||
+ | alternativ | ||
+ | |||
+ | BennyE$ snmpset -v3 -m ALL -M +/ | ||
+ | ALCATEL-IND1-CONFIG-MGR-MIB:: | ||
+ | |||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1.3.65 | ||
+ | |||
+ | chasControlVersionMngt OBJECT-TYPE | ||
+ | SYNTAX INTEGER | ||
+ | { | ||
+ | notSignificant(1), | ||
+ | certifySynchro(2), | ||
+ | certifyNoSynchro(3), | ||
+ | flashSynchro(4), | ||
+ | restore(5), | ||
+ | activate(6) | ||
+ | } | ||
+ | MAX-ACCESS read-write | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "For the primary this means: | ||
+ | notSignificant - No command applied. | ||
+ | certifySynchro - Copy the file from the working to the certified | ||
+ | directory and from the primary to the secondary | ||
+ | (reboot of the secondary). | ||
+ | certifyNoSynchro - Copy the file from the working to the certified | ||
+ | directory. | ||
+ | flashSynchro - Copy the file from the primary to the secondary | ||
+ | (reboot of the secondary). | ||
+ | restore - Copy the file from the certified directory to the | ||
+ | working directory. | ||
+ | activate - Reload from the working directory. Activate can be | ||
+ | scheduled. " | ||
+ | |||
+ | ::= { chasControlModuleEntry 3 } | ||
+ | </ | ||
+ | |||
+ | * Für ein " | ||
+ | |||
+ | <code bash> | ||
+ | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1.3.65 i 3 | ||
+ | SNMPv2-SMI:: | ||
+ | |||
+ | alternativ | ||
+ | |||
+ | BennyE$ snmpset -v3 -m ALL -M +/ | ||
+ | ALCATEL-IND1-CHASSIS-MIB:: | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ===== reload working no rollback-timeout ===== | ||
+ | |||
+ | <WRAP center round alert 60%> | ||
+ | Folgende SNMP-Kommandos starten den OmniSwitch sofort aus dem " | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1.3.65 i 6 | ||
+ | SNMPv2-SMI:: | ||
+ | |||
+ | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1.2.65 i 0 | ||
+ | SNMPv2-SMI:: | ||
+ | |||
+ | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1.4.65 u 0 | ||
+ | SNMPv2-SMI:: | ||
+ | </ | ||
+ | |||
+ | ===== reload working rollback-timeout 5 in 10 ===== | ||
+ | |||
+ | <WRAP center round alert 60%> | ||
+ | Folgende SNMP-Kommandos starten den OmniSwitch in 10 Minuten aus dem " | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1.3.65 i 6 | ||
+ | SNMPv2-SMI:: | ||
+ | |||
+ | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1.2.65 i 300 | ||
+ | SNMPv2-SMI:: | ||
+ | |||
+ | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.1.1.4.65 u 600 | ||
+ | SNMPv2-SMI:: | ||
</ | </ | ||
===== Einen Reboot in X Sekunden planen ===== | ===== Einen Reboot in X Sekunden planen ===== | ||
+ | |||
<WRAP center round alert 60%> | <WRAP center round alert 60%> | ||
- | Folgendes | + | Folgendes |
</ | </ | ||
- | < | + | |
+ | < | ||
BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.2.1.2.65 u 1 | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.2.1.2.65 u 1 | ||
SNMPv2-SMI:: | SNMPv2-SMI:: | ||
Zeile 49: | Zeile 194: | ||
===== Einen geplanten Reboot abbrechen ===== | ===== Einen geplanten Reboot abbrechen ===== | ||
- | < | + | < |
BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.2.1.2.65 u 0 | BennyE$ snmpset -v3 -a SHA -A \$testing123 -u snmpv3 -x DES -X \$testing123 -l authPriv 192.168.5.104 1.3.6.1.4.1.6486.800.1.1.1.3.1.1.2.1.2.65 u 0 | ||
SNMPv2-SMI:: | SNMPv2-SMI:: | ||
</ | </ |
aos_r6_abfrage_mit_snmpv3_und_reboot.1472497166.txt.gz · Zuletzt geändert: 2024/06/09 10:29 (Externe Bearbeitung)