snmp-server vrf

Syntax

snmp-server vrf <VRF-NAME>

no snmp-server vrf <VRF-NAME>

Description

Configures the VRF on which the SNMP agent listens for incoming requests. By default, the SNMP agent does not listen on any VRF. The SNMP agent can be enabled by the user either on the default or mgmt VRF. The SNMP agent can run on only one VRF at a time. It will be disabled from all VRFs, if multiple agents are configured.

The no form of this command stops the SNMP agent from listening for incoming requests on the specified VRF.

Command context

config

Parameters

<VRF-NAME>

Specifies the VRF on which the SNMP agent listens for incoming requests. If configured for multiple VRFs, the SNMP agent gets disabled.

Authority

Administrators

Example

switch(config)# snmp-server
  agent-port          Configure UDP port to reach SNMP Master Agent
  community           The name of the community string. Default is public
  host                Configure SNMP trap or inform
  system-contact      Configure system contact
  system-description  Configure system description
  system-location     Configure system location
  vrf                 Specify VRF to run SNMP on. All will be disabled if
                      configured multiple
switch(config)# snmp-server vrf default
switch(config)# no snmp-server vrf default