The rmon2 protocoldirtable command creates or modifies an entry in the protocolDirTable.
The undo rmon2 protocoldirtable command deletes an entry from the protocolDirTable. If optional parameters are not specified, the entire table is deleted.
rmon2 protocoldirtable protocoldirid protocol-id parameter parameter-value [ descr description-string ] [ host { notsupported | supportedon | supportedoff } ] [ owner owner-name ] [ status { active | inactive } ]
undo rmon2 protocoldirtable [ protocoldirid protocol-id parameter parameter-value ]
Parameter | Description | Value |
---|---|---|
protocoldirid protocol-id | Indicates the protocol ID. Only IP protocol is supported currently. | The value is fixed at 8.0.0.0.1.0.0.8.0. |
parameter parameter-value | Indicates the protocol parameter. | The value is fixed at 2.0.0. |
descr description-string | Indicates the description of the protocol directory table. | The value is a string of 1 to 64 characters. |
host { notsupported | supportedon | supportedoff } | Indicates the configuration of protocol directory host,
corresponding to protocolDirHostConfig in the display rmon2
protocoldirtable command output.
|
- |
owner owner-name | Indicates the owner. | The value is a string of 1 to 127 characters. |
status { active | inactive } | Indicates the entry status, corresponding to the protocolDirStatus
value in the display rmon2 protocoldirtable command
output.
|
- |
Usage Scenario
To monitor statistics on IP packets, run this command.
RMON2 supports only statistics on IP packets on an Ethernet interface. A protocol occupies an entry, so there is only one entry in the table.
Precautions
When running the rmon2 protocoldirtable command, you must set the description and protocols supported by the host. That is, the descr and host parameters are mandatory.
The parameter status in the display rmon2 protocoldirtable command output matches the protocolDirStatus value, which indicates the entry status.
When the status is inactive, all related entries in the host table are deleted.
# Create an entry in the protocol directory table.
<HUAWEI> system-view [HUAWEI] rmon2 protocoldirtable protocoldirid 8.0.0.0.1.0.0.8.0 parameter 2.0.0 descr huawei host supportedon owner huawei status active
# Set the protocolDirStatus value in the protocol directory table to not in service.
<HUAWEI> system-view [HUAWEI] rmon2 protocoldirtable protocoldirid 8.0.0.0.1.0.0.8.0 parameter 2.0.0 status inactive
# Set the protocolDirHostConfig value in the protocol directory table to supportedoff.
<HUAWEI> system-view [HUAWEI] rmon2 protocoldirtable protocoldirid 8.0.0.0.1.0.0.8.0 parameter 2.0.0 host supportedoff