Hierarchical Navigation |
目次
概要このドキュメントでは、Simple Network Management Protocol(SNMP; 簡易ネットワーク管理プロトコル)を使用している Cisco Catalyst スイッチで、VLAN を作成および削除する方法について説明しています。また、SNMP を使用する VLAN にポートを追加する方法についても説明しています。 前提条件要件このドキュメントの情報を使用する前に、次のことを理解している必要があります。
コンポーネントこのドキュメントの対象となるのは、標準の Catalyst OS または IF-MIB、CISCO-VTP-MIB、および CISCO-VLAN-MEMBERSHIP-MIB をサポートする Catalyst IOS が稼働している Catalyst スイッチです。このドキュメントの情報は、次のソフトウェアとハードウェアのバージョンに基づくものです。
このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されたものです。このドキュメントで使用するすべてのデバイスは、クリアな(デフォルト)設定で作業を開始しています。対象のネットワークが実稼働中である場合には、どのような作業についても、その潜在的な影響について確実に理解しておく必要があります。 表記法ドキュメント表記の詳細は、『シスコ テクニカル ティップスの表記法』を参照してください。 背景説明MIB 変数の詳細(オブジェクト識別子(OID)を含む)
1.3.6.1.4.1.9.9.46.1.3.1.1.2 (CISCO-VTP-MIB)
vtpVlanState OBJECT-TYPE
SYNTAX INTEGER { operational(1),
suspended(2),
mtuTooBigForDevice(3),
mtuTooBigForTrunk(4) }
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The state of this VLAN.
The state 'mtuTooBigForDevice' indicates that this device
cannot participate in this VLAN because the VLAN's MTU is
larger than the device can support.
The state 'mtuTooBigForTrunk' indicates that while this
VLAN's MTU is supported by this device, it is too large for
one or more of the device's trunk ports."
::= { vtpVlanEntry 2 }
1.3.6.1.4.1.9.9.46.1.4.1.1.1 (CISCO-VTP-MIB)
vtpVlanEditOperation OBJECT-TYPE
SYNTAX INTEGER { none(1),
copy(2),
apply(3),
release(4),
restartTimer(5)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION "This object always has the value 'none' when read. When
written, each value causes the appropriate action:
'copy' - causes the creation of rows in the
vtpVlanEditTable exactly corresponding to the current global
VLAN information for this management domain. If the Edit
Buffer (for this management domain) is not currently empty,
a copy operation fails. A successful copy operation starts
the deadman-timer.
'apply' - first performs a consistent check on the the
modified information contained in the Edit Buffer, and if
consistent, then tries to instanciate the modified
information as the new global VLAN information. Note that
an empty Edit Buffer (for the management domain) would
always result in an inconsistency since the default VLANs
are required to be present.
'release' - flushes the Edit Buffer (for this management
domain), clears the Owner information, and aborts the
deadman-timer. A release is generated automatically if the
deadman-timer ever expires.
'restartTimer' - restarts the deadman-timer.
'none' - no operation is performed."
::= { vtpEditControlEntry 1 }
1.3.6.1.4.1.9.9.46.1.4.1.1.3 (CISCO-VTP-MIB)
vtpVlanEditBufferOwner OBJECT-TYPE
SYNTAX OwnerString
MAX-ACCESS read-create
STATUS current
DESCRIPTION "The management station which is currently using the Edit
Buffer for this management domain. When the Edit Buffer for
a management domain is not currently in use, the value of
this object is the zero-length string. Note that it is also
the zero-length string if a manager fails to set this object
when invoking a copy operation."
::= { vtpEditControlEntry 3 }
1.3.6.1.4.1.9.9.46.1.4.2.1.11 (CISCO-VTP-MIB)
vtpVlanEditRowStatus OBJECT-TYPE
SYNTAX RowStatus
1:active
2:notInService
3:notReady
4:createAndGo
5:createAndWait
6:destroy
MAX-ACCESS read-create
STATUS current
DESCRIPTION "The status of this row. Any and all columnar objects in an
existing row can be modified irrespective of the status of
the row.
A row is not qualified for activation until instances of at
least its vtpVlanEditType, vtpVlanEditName and
vtpVlanEditDot10Said columns have appropriate values.
The management station should endeavor to make all rows
consistent in the table before 'apply'ing the buffer. An
inconsistent entry in the table will cause the entire
buffer to be rejected with the vtpVlanApplyStatus object
set to the appropriate error value."
::= { vtpVlanEditEntry 11 }
1.3.6.1.4.1.9.9.46.1.4.2.1.3.1.48 (CISCO-VTP-MIB)
vtpVlanEditType OBJECT-TYPE
SYNTAX VlanType
MAX-ACCESS read-create
STATUS current
DESCRIPTION "The type which this VLAN would have.
An implementation may restrict access to this object."
DEFVAL { ethernet }
::= { vtpVlanEditEntry 3 }
1.3.6.1.4.1.9.9.46.1.4.2.1.4.1.48 (CISCO-VTP-MIB)
vtpVlanEditName OBJECT-TYPE
SYNTAX DisplayString (SIZE (1..32))
MAX-ACCESS read-create
STATUS current
DESCRIPTION "The name which this VLAN would have. This name would be
used as the ELAN-name for an ATM LAN-Emulation segment of
this VLAN.
An implementation may restrict access to this object."
::= { vtpVlanEditEntry 4 }
1.3.6.1.4.1.9.9.46.1.4.2.1.6.1.48 (CISCO-VTP-MIB)
vtpVlanEditDot10Said OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (4))
MAX-ACCESS read-create
STATUS current
DESCRIPTION "The value of the 802.10 SAID field which would be used for
this VLAN.
An implementation may restrict access to this object."
::= { vtpVlanEditEntry 6 }
1.3.6.1.4.1.9.9.46.1.4.1.1.2.1 (CISCO-VTP-MIB)
vtpVlanApplyStatus OBJECT-TYPE
SYNTAX INTEGER { inProgress(1),
succeeded(2),
configNumberError(3),
inconsistentEdit(4),
tooBig(5),
localNVStoreFail(6),
remoteNVStoreFail(7),
editBufferEmpty(8),
someOtherError(9)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The current status of an 'apply' operation to instanciate
the Edit Buffer as the new global VLAN information (for this
management domain). If no apply is currently active, the
status represented is that of the most recently completed
apply. The possible values are:
inProgress - 'apply' operation in progress;
succeeded - the 'apply' was successful (this value is
also used when no apply has been invoked since the
last time the local system restarted);
configNumberError - the apply failed because the value of
vtpVlanEditConfigRevNumber was less or equal to
the value of current value of
managementDomainConfigRevNumber;
inconsistentEdit - the apply failed because the modified
information was not self-consistent;
tooBig - the apply failed because the modified
information was too large to fit in this VTP
Server's non-volatile storage location;
localNVStoreFail - the apply failed in trying to store
the new information in a local non-volatile
storage location;
remoteNVStoreFail - the apply failed in trying to store
the new information in a remote non-volatile
storage location;
editBufferEmpty - the apply failed because the Edit
Buffer was empty (for this management domain).
someOtherError - the apply failed for some other reason
(e.g., insufficient memory)."
::= { vtpEditControlEntry 2 }
1.3.6.1.4.1.9.9.68.1.2.2.1.2 (CISCO-VLAN-MEMBERSHIP-MIB)
vmVlan OBJECT-TYPE
SYNTAX INTEGER(0..4095)
MAX-ACCESS read-write
STATUS current
DESCRIPTION "The VLAN id of the VLAN the port is assigned to
when vmVlanType is set to static or dynamic.
This object is not instantiated if not applicable.
The value may be 0 if the port is not assigned
to a VLAN.
If vmVlanType is static, the port is always
assigned to a VLAN and the object may not be
set to 0.
If vmVlanType is dynamic the object's value is
0 if the port is currently not assigned to a VLAN.
In addition, the object may be set to 0 only."
::= { vmMembershipEntry 2 }
SNMP を使用する Cisco Catalyst スイッチへの VLAN の追加手順説明次に示す例では、VLAN 11 をスイッチに追加しています。
SNMP を使用する Cisco Catalyst スイッチへの VLAN の追加ワン ステップの説明ワン ステップ プロセスでは、上記の手順ごとの説明での OID 名ではなく、OID 番号を使用します。変換については、「MIB 変数の詳細」を参照してください。次の例では VLAN 6 を作成しています。 snmpset -c private crumpy 1.3.6.1.4.1.9.9.46.1.4.1.1.1.1 integer 2 1.3.6.1.4.1.9.9.46.1.4.1.1.3.1 octetstring "gcober" snmpset -c private gooroo 1.3.6.1.4.1.9.9.46.1.4.2.1.11.1.6 integer 4 1.3.6.1.4.1.9.9.46.1.4.2.1.3.1.6 integer 1 1.3.6.1.4.1.9.9.46.1.4.2.1.4.1.6 octetstring "vlan6" 1.3.6.1.4.1.9.9.46.1.4.2.1.6.1.6 octetstringhex 000186A6 1.3.6.1.4.1.9.9.46.1.4.1.1.1.1 integer 3 snmpset -c private gooroo 1.3.6.1.4.1.9.9.46.1.4.1.1.1.1 integer 4 snmpwalk -c public crumpy 1.3.6.1.4.1.9.9.46.1.3.1.1.2 cisco.ciscoMgmt.ciscoVtpMIB.vtpMIBObjects.vlanInfo.vtpVlanTable.vtpVlanEntry.vtpVlanState.1.1 : INTEGER: operational cisco.ciscoMgmt.ciscoVtpMIB.vtpMIBObjects.vlanInfo.vtpVlanTable.vtpVlanEntry.vtpVlanState.1.6 : INTEGER: operational cisco.ciscoMgmt.ciscoVtpMIB.vtpMIBObjects.vlanInfo.vtpVlanTable.vtpVlanEntry.vtpVlanState.1.11 : INTEGER: operational 注:一部の SNMP バージョンでは、SNMP SET コマンドで OID の前に(.)を使用する必要があります。 SNMP を使用する Cisco Catalyst スイッチからの VLAN の削除手順説明この例では、スイッチから VLAN 48 を削除しています。詳細は、「SNMP による Cisco Catalyst スイッチへの VLAN の追加」を参照してください。VLAN を削除するこのセクションと、VLAN を追加するセクションとの違いは、vtpVlanEditRowStatus に対して CreateAndGo コマンドではなく destroy を使用することです。
SNMP を使用する Cisco Catalyst スイッチの VLAN へのポートの追加次の例では、ファスト イーサネットのポート 0/5 を VLAN 48 に追加する方法について説明しています。
ポートをある VLAN から他の VLAN に変更する方法この例では、ポート Fast Eth 0/3 が VLAN 48 に属する仕組みと、それを VLAN 1(デフォルトの VLAN)に移動する方法について説明しています。
関連情報 |