Cisco Switch Catalyst serial community string 配置

Community String Indexing


Some standard MIBs assume that a particular SNMP entity only contains one instance of the MIB. Thus the standard MIB does not have any index which would allow one to directly access a particular instance of the MIB. In these cases we provide community string indexing to access each instance of the standard MIB. The syntax is [community string]@[instance number|context].

[community string]@[instance number]

For example, the Catalyst switch includes one instance of the standard BRIDGE-MIB for each Virtual LAN in the switch. If the read-only community string is "public" and the read-write community string is "private", one could use "public@25" to read the BRIDGE-MIB for VLAN 25 and use "private@33" to read and write the BRIDGE-MIB for VLAN 33. If just "public" or "private" is used, the BRIDGE-MIB for VLAN 1 is accessed.

Traps sent from a mib that is indexed by community string also indicate which instance of the mib it corresponds to by using community string indexing. For example, a newRoot trap from the BRIDGE-MIB for VLAN 25 would have a community string of "public@25" assuming the read-only community string is "public".

Also note that community string indexing does not affect access to MIBs which have only one instance. Thus "public@25" can be used to access RFC1213-MIB at the same time BRIDGE-MIB for VLAN 25 is being accessed.

Another example for the Catalyst switches is the SNMP-REPEATER-MIB. To access this MIB for a particular repeater in the Catalyst switch, use [community string]@[module number/port number]. For example, if the read-only community string is "public", one could use "public@3/1" to read the SNMP-REPEATER-MIB for the repeater attached to port 1 on module 3.

[community string]@[context]

New options for the [context] described above have been added. The new options are snmp contexts. There are currently five context prefixes: "vlan-", "mistp-", "mod/port-", "mod-" and "mst-". In most cases, the text following the prefix would be a number. However, for the "mod/port-" case, it would be "#/#", representing the module and port.

The list of all available snmp contexts currently available on a switch can be obtained by issuing the command "show snmp context" on the console.

Console> sh snmp context
Index Context
----- --------
    0
    1 vlan-1
    2 vlan-1002
    3 vlan-1003
    4 vlan-1004
    5 vlan-1005
    6 mst-2
    7 mst-3
    8 mod-7
    9 mod-8
   10 mod-10/1
   11 mod-10/13
   12 mod-10/25
   13 mod-10/27

For example, in order to access a MIB for the vlan-1002 context, with the community string "public", one could use "public@vlan-1002".

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值