< Home

Example for Outputting Traps to the Console

Networking Requirements

As shown in Figure 1, the PC connects to SwitchA through a console interface. It is required that debugging messages of the ARP module be displayed on the PC.

Figure 1 Networking diagram for outputting debugging messages to the console

Configuration Roadmap

The configuration roadmap is as follows:

  1. Enable the information center.

  2. Configure a channel and a rule for outputting debugging messages to the console so that the console can receive debugging messages generated by SwitchA.

  3. Enable terminal display so that users can use the terminal to view debugging messages generated by SwitchA.

Procedure

  1. Enable the information center.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] info-center enable
    

  2. Configure a channel and a rule for outputting debugging messages to the console.

    # Configure a channel for outputting debugging messages to the console.

    [SwitchA] info-center console channel console
    

    # Configure a rule for outputting debugging messages to the console.

    [SwitchA] info-center source arp channel console debug level debugging state on
    [SwitchA] quit

  3. Enable terminal display.

    <SwitchA> terminal monitor
    <SwitchA> terminal debugging
    

  4. Debug the ARP module.

    <SwitchA> debugging arp packet

  5. Verify the configuration.

    # View debugging message output.

    <SwitchA> display channel 0
    channel number:0, channel name:console
    MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL
    ffff0000 default  Y      warning       Y      debugging     Y      debugging
    416e0000 ARP      Y      warning       Y      debugging     Y      debugging
    

Configuration Files

SwitchA configuration file

#
sysname SwitchA
#
info-center source ARP channel 0
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic