如何在交換機和路由器下開啓SNMP服務

CISCO設備
router>                           
router> enable                                        進入路由器是用戶模式
router# conf terminal                               進入路由器的全局配置模式
#snmp-server community cisco ro         (只讀) ;配置只讀通信字符串
#snmp-server community secret rw        (讀寫) ;配置讀寫通信字符串
#snmp-server enable traps                配置網關SNMP TRAP
#snmp-server host 10.254.190.1 rw        配置網關工作站地址
在路由器上配置日誌信息(Syslog Message Logging)
router(config) # logging on
router(config) # logging server-ip-address
router(config) # logging trap severity-level
華爲交換機SNMP配置
<switch>
<switch>system-view                   進入交換機的配置模式、
[switch]snmp-agent community read huawei 配置community 只讀屬性爲huawei
[switch]snmp-agent community write huawei配置community 可寫屬性爲huawei
[switch]snmp-agent sys-info version all      配置版本爲所有

港灣交換機配置TELNET SNMP
啓動SNMP服務的配置步驟如下:
配置步驟
步驟1 service snmp enable 使能SNMP agent服務
步驟2 service snmp trap enable 使能SNMP trap服務
步驟3 config snmp community readonly <string> 設置SNMP只讀權限認證密碼
步驟4 config snmp community readwrite <string> 設置SNMP讀寫權限認證密碼
步驟5 config snmpauthentrap [enable|disable] 使用enable設置當SNMP認證失敗時發送trap
步驟6 show service 顯示SNMP是否啓動
步驟7 show snmp community-string 顯示當前的權限認證密碼
配置SNMP trap
交換機上的SNMP agent會產生很多種類的trap信息,如啓動(start)、接口(interface)、RMON(遠程監控)等。可以在交換機上配置SNMP trap來指定一臺或多臺trap接收站(trap receiver),並指定哪些種類的trap信息會發送到這些接收站。
配置步驟
步驟1 service snmp enable 使能SNMP agent服務
步驟2 service snmp trap enable 使能SNMP trap服務
步驟3 config snmp trap type [all|interface|bgp|ospf|vrrp|stp|rmon|start|auth|pppoe|isis] [on|off] 配置發送trap的類型
步驟4 config snmp trapreceiver add <A.B.C.D> version [v1|v2c] {community <string>}*1 添加一個trap接收站
步驟5 config snmp trapreceiver add <A.B.C.D> version [v1|v2c] {community <string>}*1 添加另一個trap接收站
步驟6 show snmp trap type 顯示系統允許發送的trap種類
步驟7 Show snmp trapreceiver 顯示已經添加的所有trap接收站
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章