Skip to content

SNMP Server

SNMP (Simple Network Management Protocol) server configuration enables comprehensive network monitoring and management by providing standardized access to device operational data, configuration parameters, and event notifications through Management Information Bases (MIBs). Support also includes host targets with unencrypted and encrypted community strings (traps and informs), as well as VRF-specific SNMP configuration for isolated trap delivery and context management within each VRF’s routing table.

Diagram
NameTypeConstraintMandatoryDefault Value
snmp_serverClass[snmp_server]No

NameTypeConstraintMandatoryDefault Value
communitiesList[communities]No
contactStringNo
groupsList[groups]No
hostsList[hosts]No
locationStringNo
chassis_idStringNo
packetsizeIntegermin: 484, max: 65500No
trap_timeoutIntegermin: 1, max: 1000No
queue_lengthIntegermin: 1, max: 5000No
throttle_timeIntegermin: 50, max: 1000No
overload_controlIntegermin: 0, max: 300No
overload_throttle_rateIntegermin: 0, max: 1000No
trap_sourceStringNo
trap_source_ipv4StringNo
trap_source_ipv6StringNo
trap_source_portIntegermin: 1024, max: 65535No
trap_throttle_timeIntegermin: 10, max: 500No
trap_authentication_vrf_disableBooleantrue, falseNo
trap_delay_timerIntegermin: 30, max: 240No
ipv4_dscpAnyInteger[min: 0, max: 63] or Choice[af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, ef] or String[Regex: ^.*[\$\%]\{.*$]No
ipv6_dscpAnyInteger[min: 0, max: 63] or Choice[af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, ef] or String[Regex: ^.*[\$\%]\{.*$]No
drop_unknown_userBooleantrue, falseNo
drop_report_acl_ipv4StringNo
drop_report_acl_ipv6StringNo
engine_idsClass[engine_ids]No
interfacesList[interfaces]No
mibsClass[mibs]No
oid_poll_statsBooleantrue, falseNo
timeouts_subagentIntegermin: 1, max: 20No
timeouts_duplicateIntegermin: 0, max: 20No
timeouts_in_qdropIntegermin: 0, max: 20No
timeouts_thresholdIntegermin: 0, max: 100000No
timeouts_pdu_statsIntegermin: 1, max: 10No
logging_threshold_oid_processingIntegermin: 0, max: 20000No
logging_threshold_pdu_processingIntegermin: 0, max: 20000No
inform_retriesIntegermin: 0, max: 100No
inform_timeoutIntegermin: 1, max: 42949671No
inform_pendingIntegermin: 1, max: 4294967295No
trapsClass[traps]No
usersList[users]No
viewsList[views]No
vrfsList[vrfs]No

communities (iosxr.devices.configuration.snmp_server)

Section titled “communities (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
ipv4_aclStringNo
ipv6_aclStringNo
roBooleantrue, falseNo
rwBooleantrue, falseNo
sdrownerBooleantrue, falseNo
systemownerBooleantrue, falseNo
viewStringNo

groups (iosxr.devices.configuration.snmp_server)

Section titled “groups (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
versionChoicev1, v2c, v3Yes
v3_security_levelChoicepriv, auth, noauthNo
read_viewStringNo
write_viewStringNo
notify_viewStringNo
contextStringNo
ipv4_aclStringNo
ipv6_aclStringNo

hosts (iosxr.devices.configuration.snmp_server)

Section titled “hosts (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
addressIPYes
informsList[informs]No
trapsList[traps]No

engine_ids (iosxr.devices.configuration.snmp_server)

Section titled “engine_ids (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
localStringNo
remoteList[remote]No

interfaces (iosxr.devices.configuration.snmp_server)

Section titled “interfaces (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
notification_linkupdown_enableBooleantrue, falseNo
notification_linkupdown_disableBooleantrue, falseNo
index_persistenceBooleantrue, falseNo

mibs (iosxr.devices.configuration.snmp_server)

Section titled “mibs (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
cbqosmib_cacheBooleantrue, falseNo
cbqosmib_cache_refresh_timeIntegermin: 5, max: 60No
cbqosmib_cache_service_policy_countIntegermin: 1, max: 5000No
cbqosmib_persistBooleantrue, falseNo
cbqosmib_member_statsBooleantrue, falseNo
ifindex_persistBooleantrue, falseNo
trap_link_ietfBooleantrue, falseNo
ifmib_ifalias_longBooleantrue, falseNo
ifmib_stats_cacheBooleantrue, falseNo
ifmib_ipsubscriberBooleantrue, falseNo
ifmib_internal_cache_max_durationIntegermin: 0, max: 60No
rfmib_entphyindexBooleantrue, falseNo
sensormib_cacheBooleantrue, falseNo
mplstemib_cache_timers_garbage_collectIntegermin: 0, max: 3600No
mplstemib_cache_timers_refreshIntegermin: 0, max: 600No
mplsp2mpmib_cache_timerIntegermin: 0, max: 600No
frrmib_cache_timerIntegermin: 0, max: 600No
cmplsteextmib_cache_timerIntegermin: 0, max: 600No
cmplsteextstdmib_cache_timerIntegermin: 0, max: 600No
mroutemib_send_all_vrfBooleantrue, falseNo
notification_log_mib_defaultBooleantrue, falseNo
notification_log_mib_global_age_outIntegermin: 1, max: 4294967295No
notification_log_mib_global_sizeIntegermin: 1, max: 15000No
notification_log_mib_disableBooleantrue, falseNo
notification_log_mib_sizeIntegermin: 1, max: 15000No
entityindex_persistBooleantrue, falseNo

traps (iosxr.devices.configuration.snmp_server)

Section titled “traps (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
snmp_authenticationBooleantrue, falseNo
snmp_coldstartBooleantrue, falseNo
snmp_warmstartBooleantrue, falseNo
snmp_linkupBooleantrue, falseNo
snmp_linkdownBooleantrue, falseNo
snmp_allBooleantrue, falseNo
l2vpn_allBooleantrue, falseNo
l2vpn_vc_upBooleantrue, falseNo
l2vpn_vc_downBooleantrue, falseNo
l2vpn_ciscoBooleantrue, falseNo
vpls_allBooleantrue, falseNo
vpls_statusBooleantrue, falseNo
vpls_full_raiseBooleantrue, falseNo
vpls_full_clearBooleantrue, falseNo
bfdBooleantrue, falseNo
configBooleantrue, falseNo
cfmBooleantrue, falseNo
ethernet_oam_eventsBooleantrue, falseNo
rfBooleantrue, falseNo
sensorBooleantrue, falseNo
mpls_l3vpn_allBooleantrue, falseNo
mpls_l3vpn_vrf_upBooleantrue, falseNo
mpls_l3vpn_vrf_downBooleantrue, falseNo
mpls_l3vpn_mid_threshold_exceededBooleantrue, falseNo
mpls_l3vpn_max_threshold_exceededBooleantrue, falseNo
mpls_l3vpn_max_threshold_clearedBooleantrue, falseNo
mpls_l3vpn_max_threshold_reissue_notif_timeIntegermin: 0, max: 2147483647No
mpls_traffic_eng_ciscoBooleantrue, falseNo
mpls_traffic_eng_cisco_ext_bringup_failBooleantrue, falseNo
mpls_traffic_eng_cisco_ext_insuff_bwBooleantrue, falseNo
mpls_traffic_eng_cisco_ext_preemptBooleantrue, falseNo
mpls_traffic_eng_cisco_ext_reroute_pendingBooleantrue, falseNo
mpls_traffic_eng_cisco_ext_reroute_pending_clearBooleantrue, falseNo
mpls_traffic_eng_downBooleantrue, falseNo
mpls_traffic_eng_p2mp_downBooleantrue, falseNo
mpls_traffic_eng_p2mp_upBooleantrue, falseNo
mpls_traffic_eng_reoptimizeBooleantrue, falseNo
mpls_traffic_eng_rerouteBooleantrue, falseNo
mpls_traffic_eng_upBooleantrue, falseNo
ntpBooleantrue, falseNo
bgp_cbgp_twoChoiceenable, updownNo
bgp_enableChoicebgp4_mib, updownNo
hsrpBooleantrue, falseNo
isis_database_overloadBooleantrue, falseNo
isis_manual_address_dropsBooleantrue, falseNo
isis_corrupted_lsp_detectedBooleantrue, falseNo
isis_attempt_to_exceed_max_sequenceBooleantrue, falseNo
isis_id_len_mismatchBooleantrue, falseNo
isis_max_area_addresses_mismatchBooleantrue, falseNo
isis_own_lsp_purgeBooleantrue, falseNo
isis_sequence_number_skipBooleantrue, falseNo
isis_authentication_type_failureBooleantrue, falseNo
isis_authentication_failureBooleantrue, falseNo
isis_version_skewBooleantrue, falseNo
isis_area_mismatchBooleantrue, falseNo
isis_rejected_adjacencyBooleantrue, falseNo
isis_lsp_too_large_to_propagateBooleantrue, falseNo
isis_orig_lsp_buff_size_mismatchBooleantrue, falseNo
isis_protocols_supported_mismatchBooleantrue, falseNo
isis_adjacency_changeBooleantrue, falseNo
isis_lsp_error_detectedBooleantrue, falseNo
isis_allBooleantrue, falseNo
vrrp_eventsBooleantrue, falseNo
alarmBooleantrue, falseNo
bridgemibBooleantrue, falseNo
copy_completeBooleantrue, falseNo
entityBooleantrue, falseNo
cisco_entity_extBooleantrue, falseNo
entity_redundancy_allBooleantrue, falseNo
entity_redundancy_switchoverBooleantrue, falseNo
entity_redundancy_statusBooleantrue, falseNo
entity_state_switchoverBooleantrue, falseNo
entity_state_operstatusBooleantrue, falseNo
flash_insertionBooleantrue, falseNo
flash_removalBooleantrue, falseNo
fru_ctrlBooleantrue, falseNo
ipslaBooleantrue, falseNo
mpls_ldp_downBooleantrue, falseNo
mpls_ldp_upBooleantrue, falseNo
mpls_ldp_thresholdBooleantrue, falseNo
pim_neighbor_changeBooleantrue, falseNo
pim_interface_state_changeBooleantrue, falseNo
pim_invalid_message_receivedBooleantrue, falseNo
pim_rp_mapping_changeBooleantrue, falseNo
powerBooleantrue, falseNo
syslogBooleantrue, falseNo
systemBooleantrue, falseNo

users (iosxr.devices.configuration.snmp_server)

Section titled “users (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
groupStringYes
versionChoicev1, v2c, v3Yes
ipv4_aclStringNo
ipv6_aclStringNo
systemownerBooleantrue, falseNo
v3_authenticationClass[v3_authentication]No
v3_privacyClass[v3_privacy]No

views (iosxr.devices.configuration.snmp_server)

Section titled “views (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
mibsList[mibs]No

vrfs (iosxr.devices.configuration.snmp_server)

Section titled “vrfs (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
vrfStringYes
hostsList[hosts]No
contextsList[contexts]No

informs (iosxr.devices.configuration.snmp_server.hosts)

Section titled “informs (iosxr.devices.configuration.snmp_server.hosts)”
NameTypeConstraintMandatoryDefault Value
communityStringYes
encryption_typeChoiceunencrypted, default, aesYes
versionChoicev1, v2c, v3Yes
udp_portIntegermin: 1, max: 65535No
v3_security_levelChoiceauth, noauth, privNo

remote (iosxr.devices.configuration.snmp_server.engine_ids)

Section titled “remote (iosxr.devices.configuration.snmp_server.engine_ids)”
NameTypeConstraintMandatoryDefault Value
addressIPYes
idStringYes
udp_portIntegermin: 1, max: 65535Yes

v3_authentication (iosxr.devices.configuration.snmp_server.users)

Section titled “v3_authentication (iosxr.devices.configuration.snmp_server.users)”
NameTypeConstraintMandatoryDefault Value
algorithmChoicemd5, sha, sha-256, sha-512Yes
encryption_typeChoicedefault, aesNo
passwordStringYes

v3_privacy (iosxr.devices.configuration.snmp_server.users)

Section titled “v3_privacy (iosxr.devices.configuration.snmp_server.users)”
NameTypeConstraintMandatoryDefault Value
algorithmChoiceaes-128, aes-192, aes-256Yes
encryption_typeChoicedefault, aesNo
passwordStringYes

mibs (iosxr.devices.configuration.snmp_server.views)

Section titled “mibs (iosxr.devices.configuration.snmp_server.views)”
NameTypeConstraintMandatoryDefault Value
idStringYes
scopeChoiceincluded, excludedYes

hosts (iosxr.devices.configuration.snmp_server.vrfs)

Section titled “hosts (iosxr.devices.configuration.snmp_server.vrfs)”
NameTypeConstraintMandatoryDefault Value
addressIPYes
informsList[informs]No
trapsList[traps]No

contexts (iosxr.devices.configuration.snmp_server.vrfs)

Section titled “contexts (iosxr.devices.configuration.snmp_server.vrfs)”
NameTypeConstraintMandatoryDefault Value
nameStringYes

informs (iosxr.devices.configuration.snmp_server.vrfs.hosts)

Section titled “informs (iosxr.devices.configuration.snmp_server.vrfs.hosts)”
NameTypeConstraintMandatoryDefault Value
communityStringYes
encryption_typeChoiceunencrypted, default, aesYes
versionChoicev1, v2c, v3Yes
udp_portAnyInteger[min: 1, max: 65535] or Choice[default] or String[Regex: ^.*[\$\%]\{.*$]No
v3_security_levelChoiceauth, noauth, privNo

DSCP Values

SNMP Server DSCP fields accept both numeric and named string values.

  • ipv4_dscp / ipv6_dscp: integer 0-63 or named value (e.g., ef, af11, cs3)

Both formats can be used interchangeably. The normalization layer automatically converts integer values to their named equivalents before sending to the device, preventing configuration drift.

The following configuration describes how to set up various SNMP parameters on a Cisco IOS-XR device.

snmp-server location "My location"
snmp-server contact "My contact"
snmp-server trap source Loopback10
snmp-server traps rf
snmp-server traps bfd
snmp-server traps bgp cbgp-two enable
snmp-server traps bgp enable cisco-bgp4-mib
snmp-server traps ntp
snmp-server traps ethernet oam events
snmp-server traps copy-complete
snmp-server traps snmp linkup
snmp-server traps snmp linkdown
snmp-server traps power
snmp-server traps config
snmp-server traps entity
snmp-server traps system
snmp-server traps bridgemib
snmp-server traps entity-state operstatus
snmp-server traps entity-redundancy all
snmp-server traps sensor
snmp-server traps fru-ctrl
snmp-server traps isis database-overload
snmp-server traps isis manual-address-drops
snmp-server traps isis corrupted-lsp-detected
snmp-server traps isis adjacency-change
snmp-server traps l2vpn all
snmp-server traps l2vpn vc-up
snmp-server traps l2vpn vc-down
snmp-server user USER1 GROUP1 v3 auth md5 encrypted 073C05626E2A4841141D priv aes 128 encrypted 073C05626E2A4841141D IPv4 ACL1 systemowner
snmp-server user USER2 GROUP1 v3 auth sha encrypted 080D7A1A10151A190B priv aes 128 encrypted 073C05626E2A4841141D IPv4 ACL2
snmp-server group GROUP1 v3 priv read VIEW1 write VIEW2 context CONTEXT1 notify VIEW3 IPv4 ACL1 IPv6 ACL2
snmp-server community public view VIEW1 RO IPv4 ACL1
snmp-server community private view VIEW2 RW systemowner IPv4 ACL2 IPv6 ACL3
snmp-server view VIEW1 1.3.6.1.2.1.1 included
snmp-server view VIEW2 1.3.6.1.2.1 included
snmp-server view VIEW2 1.3.6.1.2.1.11 excluded
snmp-server vrf VRF1 host 11.11.11.11 traps COMMUNITY1 version 3 auth

Example-1: Basic SNMP Server configuration with location and contact.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
snmp_server:
location: "Data Center A"
contact: "admin@example.com"

Example-2: SNMP Server with trap configuration.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
snmp_server:
location: "Data Center B"
trap_source: Loopback0
traps:
rf: true
bfd: true
bgp_cbgp_two: enable
bgp_enable: bgp4_mib
ntp: true
ethernet_oam_events: true
copy_complete: true
snmp_linkup: true
snmp_linkdown: true
power: true
config: true
entity: true
system: true
bridgemib: true
entity_state_operstatus: true
entity_redundancy_all: true
sensor: true
fru_ctrl: true
isis_database_overload: true
isis_manual_address_drops: true
isis_corrupted_lsp_detected: true
isis_adjacency_change: true
l2vpn_all: true
l2vpn_vc_up: true
l2vpn_vc_down: true

Example-3: SNMP Server with SNMPv3 users and groups.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
snmp_server:
location: "Data Center C"
contact: "netops@example.com"
users:
- name: snmp_admin
group: admin_group
version: v3
ipv4_acl: MGMT_ACL
systemowner: true
v3_authentication:
algorithm: md5
encryption_type: aes
password: "encrypted_password"
groups:
- name: admin_group
version: v3
v3_security_level: priv
read_view: all_view
write_view: config_view
ipv4_acl: MGMT_ACL

Example-4: SNMP Server with SNMPv2c communities.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
snmp_server:
location: "Branch Office"
communities:
- name: public
view: read_only_view
ro: true
ipv4_acl: SNMP_RO_ACL
- name: private
view: read_write_view
rw: true
systemowner: true
ipv4_acl: SNMP_RW_ACL

Example-5: SNMP Server hosts with encrypted communities.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
snmp_server:
hosts:
- address: 11.11.11.11
traps:
- community: COMMUNITY1
encryption_type: unencrypted
version: v3
v3_security_level: auth
- community: "15021E0E082328"
encryption_type: default
version: v2c
informs:
- community: COMMUNITY2
encryption_type: unencrypted
udp_port: 1100
version: v2c
- community: "06253E2C5A471E1C5E"
encryption_type: aes
version: v3
v3_security_level: auth

Example-6: SNMP Server MIB settings with CBQoSMIB caching and interface configuration.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
snmp_server:
mibs:
cbqosmib_cache: true
cbqosmib_cache_refresh_time: 30
cbqosmib_cache_service_policy_count: 100
cbqosmib_persist: true
cbqosmib_member_stats: true
ifmib_ifalias_long: true
ifmib_stats_cache: true
ifindex_persist: true
trap_link_ietf: true
interfaces:
- name: GigabitEthernet0/0/0/1
notification_linkupdown_disable: true
index_persistence: true

VRF-specific SNMP configuration applies trap destinations and contexts to individual VRFs and is used for isolated SNMP monitoring within each VRF context. These settings define how the router delivers SNMP traps and informs for applications, services, and routing protocols operating within that VRF’s routing table.

Example-1: SNMP Server VRF with hosts, encrypted communities, and contexts.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
snmp_server:
vrfs:
- vrf: VRF1
hosts:
- address: 11.11.11.11
traps:
- community: COMMUNITY1
encryption_type: unencrypted
version: v3
v3_security_level: auth
- community: "15021E0E082328"
encryption_type: default
version: v2c
informs:
- community: COMMUNITY2
encryption_type: unencrypted
udp_port: 1100
version: v2c
- community: "06253E2C5A471E1C5E"
encryption_type: aes
version: v3
v3_security_level: auth
contexts:
- name: CONTEXT1