< Home

Example for Configuring RMON2

Networking Requirements

In Figure 1, a LAN is connected to GE0/0/1. IP packet statistics collection needs to be configured on VLANIF10.

Figure 1 RMON2 network diagram

Configuration Roadmap

Run RMON2 to remotely monitor traffic on networks using the NMS or command line. The following example describes using the command line:

  1. Configure IP addresses for switch interfaces.
  2. Configure the host control table and protocol directory table so that RMON2 collects traffic statistics.

Procedure

  1. Configure a VLAN and add GE0/0/1 to it.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan 10
    [Switch-vlan10] quit
    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] port link-type hybrid
    [Switch-GigabitEthernet0/0/1] port hybrid pvid vlan 10
    [Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 10
    [Switch-GigabitEthernet0/0/1] quit
    

  2. Create a VLANIF interface and assign an IP address to the VLANIF interface.

    [Switch] interface vlanif 10
    [Switch-Vlanif10] ip address 10.1.1.1 24
    [Switch-Vlanif10] quit

  3. Configure RMON2 traffic statistics collection.

    # Configure the host control table. Set the index to 123 and the maximum number of entries in the table to 100.

    [Switch] rmon2 hlhostcontroltable index 123 datasource interface vlanif 10 maxentry 100 owner china status active

    # Configure the protocol directory table. The protocol ID is fixed at 8.0.0.0.1.0.0.8.0, the parameter is fixed at 2.0.0, and the host value is fixed at supportedon (collecting statistics on these protocol packets).

    [Switch] rmon2 protocoldirtable protocoldirid 8.0.0.0.1.0.0.8.0 parameter 2.0.0 descr IP host supportedon owner china status active
    [Switch] quit

  4. Verify the configuration.

    # View information on the host table.

    <Switch> display rmon2 nlhosttable hostcontrolindex 123
    Abbreviation:
    HIdx - hlHostControlIndex 
    PIdx - ProtocolDirLocalIndex
    Addr - nlHostAddress
    InPkts - nlHostInPkts
    OutPkts - nlHostOutPkts
    InOctes - nlHostInOctets
    OutOctes - nlHostOutOctets
    OutMac - nlHostOutMacNonUnicastPkts
    ChgTm - nlHostTimeMark
    CrtTm - nlHostCreateTime
    HIdx  PIdx Addr           InPkts     OutPkts    InOctes    OutOctes   OutMac     ChgTm                                 CrtTm   
    123   1    10.1.1.1       0          78         0          10046      78         0 days 00h:01m:29s.09th(8909)         0 days 00h:01m:01s.13th(6113)
    123   1    10.1.1.4       78         0          10046      0          0          0 days 00h:01m:29s.09th(8909)         0 days 00h:01m:01s.13th(6113)

    # Set the time filter to display only the entries meeting filtering conditions.

    <Switch> display rmon2 nlhosttable hostcontrolindex 123 timemark 1000 hostaddress 10.1.1.1
    Abbreviation:
    HIdx - hlHostControlIndex 
    PIdx - ProtocolDirLocalIndex
    Addr - nlHostAddress
    InPkts - nlHostInPkts
    OutPkts - nlHostOutPkts
    InOctes - nlHostInOctets
    OutOctes - nlHostOutOctets
    OutMac - nlHostOutMacNonUnicastPkts
    ChgTm - nlHostTimeMark
    CrtTm - nlHostCreateTime
    HIdx  PIdx Addr           InPkts     OutPkts    InOctes    OutOctes   OutMac     ChgTm                                 CrtTm     
    123   1    10.1.1.1       0          78         0          10046      78         0 days 00h:01m:29s.09th(8909)         0 days 00h:01m:01s.13th(6113)

    # View information on the host control table, such as the number of added entries and deleted entries, and the total number of entries on the interface.

    <Switch> display rmon2 hlhostcontroltable
    Abbreviation:
    index - hlhostcontrolindex
    datasource - hlhostcontroldatasource
    droppedfrm - hlhostcontrolnldroppedframes
    inserts - hlhostcontrolnlinserts
    Deletes - hlHostControlNlDeletes
    maxentries - hlhostcontrolnlmaxdesiredentries
    status - hlhostcontrolstatus
    
    index datasource      droppedfrm inserts    Deletes    maxentries status  
    123   Vlanif10        0          19         0         100         active

Configuration Files

Switch configuration file

#
sysname Switch
#
vlan batch 10
#
interface Vlanif10
 ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-type hybrid
 port hybrid pvid vlan 10
 port hybrid untagged vlan 10
#
rmon2 protocoldirtable protocoldirid 8.0.0.0.1.0.0.8.0 parameter 2.0.0 descr IP host supportedon owner china status active
rmon2 hlhostcontroltable index 123 datasource interface Vlanif10 maxentry 100 owner china status active
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic