بنا دارم هر روز یک دستور رو کم کم به کمک دوستان بررسی و تحلیل کنیم.
امیدوارم دوستان کمک کنن و وقت هم توان رو به مابده تا یک مطلب رفرنس پربار برای همه ایجاد بشه.
Printable View
بنا دارم هر روز یک دستور رو کم کم به کمک دوستان بررسی و تحلیل کنیم.
امیدوارم دوستان کمک کنن و وقت هم توان رو به مابده تا یک مطلب رفرنس پربار برای همه ایجاد بشه.
اولین دستور :
نمایش وضعیت محیطی دستگاه - شامل وضعیت فن ، منبع تغذیه و دمای دستگاه و ولتاژ
[LTR]
[LEFT]
Syntax
[B]show environment [/B][alarms | all | fans | hardware | last | leds | power-supply | table | temperature | voltages]
[B]alarms [/B] (Optional) Displays the alarm contact information.
[B]all [/B] (Optional) Displays a detailed listing of all environmental monitor parameters (for example, the power supplies, temperature readings, voltage readings, and blower speeds). This is the default.
[B]fans [/B] (Optional) Displays blower and fan information.
[B]hardware [/B] (Optional) Displays hardware-specific information.
[B]last [/B] (Optional) Displays information on the last measurement made.
[B]leds [/B] (Optional) Displays the status of the MBus LEDs on the clock and scheduler cards and switch fabric cards.
[B]power-supply [/B] (Optional) Displays power supply voltage and current information. If applicable, displays the status of the redundant power supply.
[B]table [/B] (Optional) Displays the temperature, voltage, and blower ranges and thresholds.
[B]temperature [/B] (Optional) Displays temperature information.
[B]voltages [/B] (Optional) Displays voltage information[/LEFT] [/LTR]
و MIB برای مانیتور کردن در برنامه هایی مثل MRTG
[LTR]
[LEFT]SNMP OIDS from CISCO-ENVMON-MIB:
ciscoEnvMonVoltageState .1.3.6.1.4.1.9.9.13.1.2.1.7
ciscoEnvMonTemperatureState .1.3.6.1.4.1.9.9.13.1.3.1.6
ciscoEnvMonFanState .1.3.6.1.4.1.9.9.13.1.4.1.3
ciscoEnvMonSupplyState .1.3.6.1.4.1.9.9.13.1.5.1.3[/LEFT]
[/LTR]
شما دوست ندارید که دستگاه سیسکو شما تمام اطلاعاتی که داره رو از طریق SNMP ارسال کنه.. برای مثال اگه شما یک اکسسس سرور بت 60 خط ارتباطی E1 داشته باشه به ازای هر مشترک که ارتباط بر قرار می کنه چندین Traps ارسال می کنه که در جمع حجم بسیار زیادی میشه. برای همین امر ما اونها رو کنترل می کنم
[LTR][LEFT]
[B]snmp-server host [/B]host-addr [traps | informs] [version {1 | 2c | 3 [auth | noauth | priv]}] community-string [udp-port port] [notification-type]
[B]snmp-server enable traps [/B][notification-type] [notification-option]
مثال[B][COLOR="red"]
snmp-server host 10.10.10.10 public config bgp tty
snmp-server enable traps config
snmp-server enable traps bgp[/COLOR][/B]
این مثال دستگاه رو به ارسال تغییر فقط در تنظیمات و پروتکل BGP و ارتباط TTY به سرور 10.10.10.10 ملزم می کند.
[B] snmp-server host [/B]host-addr [traps | informs] [version {1 | 2c | 3 [auth | noauth | priv]}]
community-string [udp-port port] [notification-type]
no snmp-server host host [traps | informs]
Syntax Description
[COLOR="red"][I]host-addr[/I][/COLOR]
The name or Internet address of the host (the targeted recipient).
[COLOR="red"]traps[/COLOR]
(Optional) Send SNMP traps to this host. This is the default.
[COLOR="red"]informs[/COLOR]
(Optional) Send SNMP informs to this host.
[B]version[/B]
(Optional) The version of the SNMP used to send the traps. Version 3 is the most secure model, as this model allows packet encryption with the priv keyword. If you use the version keyword, you must specify one of these options:
*
1—SNMPv1. This option is not available with informs.
*
2c—SNMPv2C
*
3—SNMPv3. These three optional keywords can follow the version 3 keyword:
o
auth (Optional) Enables Message Digest 5 (MD5) and Secure Hash Algorithm (SHA) packet authentication.
o
noauth (Default) The noAuthNoPriv security level. This is the default if the [auth | noauth | priv] keyword choice is not specified.
o
priv (Optional) Enables Data Encryption Standard (DES) packet encryption (also called "privacy").
[COLOR="red"][B]community-string[/B][/COLOR]
The password-like community string sent with the notification operation. Though you can set this string with the snmp-server host command by itself, Cisco recommends that you define this string with the snmp-server community command before you issue the snmp-server host command.
[COLOR="red"][I]udp-port port[/I][/COLOR]
User Datagram Protocol (UDP) port of the host to use. The default is 162.
[COLOR="red"][I]notification-type[/I][/COLOR]
(Optional) The type of notification to be sent to the host. If no type is specified, all notifications are sent. The notification type can be one or more of these keywords:
*
aaa-server—Sends AAA notifications.
*
bgp—Sends Border Gateway Protocol (BGP) state change notifications.
*
bstun—Sends Block Serial Tunneling (BSTUN) notifications.
*
calltracker—Sends CallTracker notifications.
*
config—Sends configuration notifications.
*
dlsw—Sends data-link switching (DLSw) notifications.
*
ds0-busyout—Sends ds0-busyout notifications.
*
ds1-loopback—Sends ds1-loopback notifications.
*
dspu—Sends downstream physical unit (DSPU) notifications.
*
dsp—Sends digital signal processing (DSP) notifications.
*
entity—Sends Entity Management Information Base (MIB) modification notifications.
*
envmon—Sends Cisco enterprise-specific environmental monitor notifications when an environmental threshold is exceeded.
*
frame-relay—Sends Frame Relay notifications.
*
hsrp—Sends Hot Standby Router Protocol (HSRP) notifications.
*
isdn—Sends Integrated Services Digital Network (ISDN) notifications.
*
msdp—Sends Multicast Source Discovery Protocol (MSDP) notifications.
*
llc2—Sends Logical Link Control, type 2 (LLC2) notifications.
*
repeater—Sends standard repeater (hub) notifications.
*
rsrb—Sends remote source-route bridging (RSRB) notifications.
*
rsvp—Sends Resource Reservation Protocol (RSVP) notifications.
*
rtr—Sends SA Agent (RTR) notifications.
*
sdlc—Sends Synchronous Data Link Control (SDLC) notifications.
*
snmp—Sends Simple Network Management Protocol (SNMP) notifications (as defined in RFC 1157).
*
stun—Sends serial tunnel (STUN) notifications.
*
syslog—Sends error message notifications (Cisco Syslog MIB). Specify the level of messages to be sent with the logging history level command.
*
tty—Sends Cisco enterprise-specific notifications when a Transmission Control Protocol (TCP) connection closes.
*
voice—Sends voice notifications.
*
x25—Sends X.25 event notifications.
*
xgcp—Sends External Media Gateway Control Protocol (XGCP) notifications.
[/LEFT][/LTR]
SNMP Traps به صورت پیش فرض غیر فعال هست