snmp context-name

Use snmp context-name to configure an SNMP context for a BGP instance.

Use undo snmp context-name to restore the default.

Syntax

snmp context-name context-name

undo snmp context-name

Default

No SNMP context is configured for a BGP instance.

Views

BGP instance view

Predefined user roles

network-admin

Parameters

context-name: Specifies an SNMP context by its name, a case-sensitive string of 1 to 32 characters.

Usage guidelines

BGP does not know the BGP instance to which a managed MIB node belongs. To resolve this issue, configure different SNMP contexts for different BGP instances.

The device selects a MIB for an SNMP packet according to the context (for SNMPv3) or community name (for SNMPv1/v2c) in the following ways:

For more information about SNMP contexts and community names, see Network Management and Monitoring Configuration Guide.

Do not configure the same SNMP context for different BGP instances.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure SNMP context bgp-abc for BGP instance abc.

<Sysname> system-view
[Sysname] bgp 100 instance abc
[Sysname-bgp-abc] snmp context-name bgp-abc

Related commands

snmp-agent community-map (Network Management and Monitoring Command Reference)

snmp-agent context (Network Management and Monitoring Command Reference)