Skip to content

SNMP Server

Configure SNMP Server settings on IOS-XR devices including location, contact, trap sources, SNMP traps, SNMPv3 users and groups, SNMPv2c communities, and SNMP views.

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_dscpStringNo
ipv6_dscpStringNo
drop_unknown_userBooleantrue, falseNo
drop_report_acl_ipv4StringNo
drop_report_acl_ipv6StringNo
engine_id_localStringNo
engine_id_remotesList[engine_id_remotes]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
traps_snmp_authenticationBooleantrue, falseNo
traps_snmp_coldstartBooleantrue, falseNo
traps_snmp_warmstartBooleantrue, falseNo
traps_snmp_linkupBooleantrue, falseNo
traps_snmp_linkdownBooleantrue, falseNo
traps_snmp_allBooleantrue, falseNo
traps_l2vpn_allBooleantrue, falseNo
traps_l2vpn_vc_upBooleantrue, falseNo
traps_l2vpn_vc_downBooleantrue, falseNo
traps_l2vpn_ciscoBooleantrue, falseNo
traps_vpls_allBooleantrue, falseNo
traps_vpls_statusBooleantrue, falseNo
traps_vpls_full_raiseBooleantrue, falseNo
traps_vpls_full_clearBooleantrue, falseNo
traps_bfdBooleantrue, falseNo
traps_configBooleantrue, falseNo
traps_cfmBooleantrue, falseNo
traps_ethernet_oam_eventsBooleantrue, falseNo
traps_rfBooleantrue, falseNo
traps_sensorBooleantrue, falseNo
traps_mpls_l3vpn_allBooleantrue, falseNo
traps_mpls_l3vpn_vrf_upBooleantrue, falseNo
traps_mpls_l3vpn_vrf_downBooleantrue, falseNo
traps_mpls_l3vpn_mid_threshold_exceededBooleantrue, falseNo
traps_mpls_l3vpn_max_threshold_exceededBooleantrue, falseNo
traps_mpls_l3vpn_max_threshold_clearedBooleantrue, falseNo
traps_mpls_l3vpn_max_threshold_reissue_notif_timeIntegermin: 0, max: 2147483647No
traps_mpls_traffic_eng_ciscoBooleantrue, falseNo
traps_mpls_traffic_eng_cisco_ext_bringup_failBooleantrue, falseNo
traps_mpls_traffic_eng_cisco_ext_insuff_bwBooleantrue, falseNo
traps_mpls_traffic_eng_cisco_ext_preemptBooleantrue, falseNo
traps_mpls_traffic_eng_cisco_ext_reroute_pendingBooleantrue, falseNo
traps_mpls_traffic_eng_cisco_ext_reroute_pending_clearBooleantrue, falseNo
traps_mpls_traffic_eng_downBooleantrue, falseNo
traps_mpls_traffic_eng_p2mp_downBooleantrue, falseNo
traps_mpls_traffic_eng_p2mp_upBooleantrue, falseNo
traps_mpls_traffic_eng_reoptimizeBooleantrue, falseNo
traps_mpls_traffic_eng_rerouteBooleantrue, falseNo
traps_mpls_traffic_eng_upBooleantrue, falseNo
traps_ntpBooleantrue, falseNo
traps_bgp_cbgp_two_enableBooleantrue, falseNo
traps_bgp_cbgp_two_updownBooleantrue, falseNo
traps_bgp_enable_cisco_bgp4_mibBooleantrue, falseNo
traps_bgp_enable_updownBooleantrue, falseNo
traps_hsrpBooleantrue, falseNo
traps_isis_database_overloadBooleantrue, falseNo
traps_isis_manual_address_dropsBooleantrue, falseNo
traps_isis_corrupted_lsp_detectedBooleantrue, falseNo
traps_isis_attempt_to_exceed_max_sequenceBooleantrue, falseNo
traps_isis_id_len_mismatchBooleantrue, falseNo
traps_isis_max_area_addresses_mismatchBooleantrue, falseNo
traps_isis_own_lsp_purgeBooleantrue, falseNo
traps_isis_sequence_number_skipBooleantrue, falseNo
traps_isis_authentication_type_failureBooleantrue, falseNo
traps_isis_authentication_failureBooleantrue, falseNo
traps_isis_version_skewBooleantrue, falseNo
traps_isis_area_mismatchBooleantrue, falseNo
traps_isis_rejected_adjacencyBooleantrue, falseNo
traps_isis_lsp_too_large_to_propagateBooleantrue, falseNo
traps_isis_orig_lsp_buff_size_mismatchBooleantrue, falseNo
traps_isis_protocols_supported_mismatchBooleantrue, falseNo
traps_isis_adjacency_changeBooleantrue, falseNo
traps_isis_lsp_error_detectedBooleantrue, falseNo
traps_isis_allBooleantrue, falseNo
traps_vrrp_eventsBooleantrue, falseNo
traps_alarmBooleantrue, falseNo
traps_bridgemibBooleantrue, falseNo
traps_copy_completeBooleantrue, falseNo
traps_entityBooleantrue, falseNo
traps_cisco_entity_extBooleantrue, falseNo
traps_entity_redundancy_allBooleantrue, falseNo
traps_entity_redundancy_switchoverBooleantrue, falseNo
traps_entity_redundancy_statusBooleantrue, falseNo
traps_entity_state_switchoverBooleantrue, falseNo
traps_entity_state_operstatusBooleantrue, falseNo
traps_flash_insertionBooleantrue, falseNo
traps_flash_removalBooleantrue, falseNo
traps_fru_ctrlBooleantrue, falseNo
traps_ipslaBooleantrue, falseNo
traps_mpls_ldp_downBooleantrue, falseNo
traps_mpls_ldp_upBooleantrue, falseNo
traps_mpls_ldp_thresholdBooleantrue, falseNo
traps_pim_neighbor_changeBooleantrue, falseNo
traps_pim_interface_state_changeBooleantrue, falseNo
traps_pim_invalid_message_receivedBooleantrue, falseNo
traps_pim_rp_mapping_changeBooleantrue, falseNo
traps_powerBooleantrue, falseNo
traps_syslogBooleantrue, falseNo
traps_systemBooleantrue, falseNo
usersList[users]No
viewsList[views]No

communities (iosxr.devices.configuration.snmp_server)

Section titled “communities (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
communityStringYes
ipv4StringNo
ipv6StringNo
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
group_nameStringYes
v1Booleantrue, falseNo
v1_readStringNo
v1_writeStringNo
v1_contextStringNo
v1_notifyStringNo
v1_ipv4StringNo
v1_ipv6StringNo
v2cBooleantrue, falseNo
v2c_readStringNo
v2c_writeStringNo
v2c_contextStringNo
v2c_notifyStringNo
v2c_ipv4StringNo
v2c_ipv6StringNo
v3_privBooleantrue, falseNo
v3_readStringNo
v3_writeStringNo
v3_contextStringNo
v3_notifyStringNo
v3_ipv4StringNo
v3_ipv6StringNo

hosts (iosxr.devices.configuration.snmp_server)

Section titled “hosts (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
addressStringYes
traps_unencrypted_stringsList[traps_unencrypted_strings]No
informs_unencrypted_stringsList[informs_unencrypted_strings]No

engine_id_remotes (iosxr.devices.configuration.snmp_server)

Section titled “engine_id_remotes (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
addressStringYes
engine_idStringYes
udp_portIntegermin: 1, max: 65535No

users (iosxr.devices.configuration.snmp_server)

Section titled “users (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
group_nameStringYes
user_nameStringYes
v1Booleantrue, falseNo
v1_ipv4StringNo
v1_ipv6StringNo
v1_systemownerBooleantrue, falseNo
v2cBooleantrue, falseNo
v2c_ipv4StringNo
v2c_ipv6StringNo
v2c_systemownerBooleantrue, falseNo
v3Booleantrue, falseNo
v3_auth_md5_encryption_aesStringNo
v3_auth_md5_encryption_defaultStringNo
v3_auth_sha_encryption_aesStringNo
v3_auth_sha_encryption_defaultStringNo
v3_auth_sha_256_encryption_aesStringNo
v3_auth_sha_256_encryption_defaultStringNo
v3_auth_sha_512_encryption_aesStringNo
v3_auth_sha_512_encryption_defaultStringNo
v3_ipv4StringNo
v3_ipv6StringNo
v3_priv_aes_aes_128_encryption_aesStringNo
v3_priv_aes_aes_128_encryption_defaultStringNo
v3_priv_aes_aes_192_encryption_aesStringNo
v3_priv_aes_aes_192_encryption_defaultStringNo
v3_priv_aes_aes_256_encryption_aesStringNo
v3_priv_aes_aes_256_encryption_defaultStringNo
v3_systemownerBooleantrue, falseNo

views (iosxr.devices.configuration.snmp_server)

Section titled “views (iosxr.devices.configuration.snmp_server)”
NameTypeConstraintMandatoryDefault Value
view_nameStringYes
mib_view_familiesList[mib_view_families]No

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

Section titled “traps_unencrypted_strings (iosxr.devices.configuration.snmp_server.hosts)”
NameTypeConstraintMandatoryDefault Value
community_stringStringYes
udp_portIntegermin: 1, max: 65535No
version_v2cBooleantrue, falseNo
version_v3_security_levelChoiceauth, noauth, privNo

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

Section titled “informs_unencrypted_strings (iosxr.devices.configuration.snmp_server.hosts)”
NameTypeConstraintMandatoryDefault Value
community_stringStringYes
udp_portIntegermin: 1, max: 65535No
version_v2cBooleantrue, falseNo
version_v3_security_levelChoiceauth, noauth, privNo

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

Section titled “mib_view_families (iosxr.devices.configuration.snmp_server.views)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
excludedBooleantrue, falseNo
includedBooleantrue, falseNo

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

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
traps_bfd: true
traps_bgp_cbgp_two_enable: true
traps_bgp_enable_cisco_bgp4_mib: true
traps_ntp: true
traps_ethernet_oam_events: true
traps_copy_complete: true
traps_snmp_linkup: true
traps_snmp_linkdown: true
traps_power: true
traps_config: true
traps_entity: true
traps_system: true
traps_bridgemib: true
traps_entity_state_operstatus: true
traps_entity_redundancy_all: true
traps_sensor: true
traps_fru_ctrl: true
traps_isis_database_overload: true
traps_isis_manual_address_drops: true
traps_isis_corrupted_lsp_detected: true
traps_isis_adjacency_change: true
traps_l2vpn_all: true
traps_l2vpn_vc_up: true
traps_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:
- user_name: "snmp_admin"
group_name: "admin_group"
v3_auth_md5_encryption_aes: "encrypted_password"
v3_ipv4: "MGMT_ACL"
v3_systemowner: true
groups:
- group_name: "admin_group"
v3_priv: true
v3_read: "all_view"
v3_write: "config_view"
v3_ipv4: "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:
- community: "public"
view: "read_only_view"
ro: true
rw: false
ipv4: "SNMP_RO_ACL"
- community: "private"
view: "read_write_view"
ro: false
rw: true
systemowner: true
ipv4: "SNMP_RW_ACL"

Example-5: Combined SNMP Server configuration.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
snmp_server:
location: "Primary Data Center"
contact: "network-ops@example.com"
trap_source: "Loopback10"
traps_rf: true
traps_bfd: true
traps_bgp_cbgp_two_enable: true
traps_bgp_enable_cisco_bgp4_mib: true
traps_isis_database_overload: true
traps_isis_manual_address_drops: true
traps_isis_corrupted_lsp_detected: true
traps_isis_adjacency_change: true
traps_isis_all: true
traps_ntp: true
traps_ethernet_oam_events: true
traps_copy_complete: true
traps_snmp_linkup: true
traps_snmp_linkdown: true
traps_power: true
traps_config: true
traps_entity: true
traps_system: true
traps_bridgemib: true
traps_entity_state_operstatus: true
traps_entity_redundancy_all: true
traps_sensor: true
traps_fru_ctrl: true
traps_l2vpn_all: true
traps_l2vpn_vc_up: true
traps_l2vpn_vc_down: true
users:
- user_name: "USER1"
group_name: "GROUP1"
v3_auth_md5_encryption_aes: "073C05626E2A4841141D"
v3_priv_aes_aes_128_encryption_aes: "073C05626E2A4841141D"
v3_ipv4: "ACL1"
v3_systemowner: true
- user_name: "USER2"
group_name: "GROUP1"
v3_auth_sha_encryption_default: "080D7A1A10151A190B"
v3_priv_aes_aes_128_encryption_aes: "073C05626E2A4841141D"
v3_ipv4: "ACL2"
groups:
- group_name: "GROUP1"
v3_priv: true
v3_read: "VIEW1"
v3_write: "VIEW2"
v3_context: "CONTEXT1"
v3_notify: "VIEW3"
v3_ipv4: "ACL1"
v3_ipv6: "ACL2"
communities:
- community: "public"
view: "VIEW1"
ro: true
rw: false
sdrowner: false
systemowner: false
ipv4: "ACL1"
- community: "private"
view: "VIEW2"
ro: false
rw: true
sdrowner: false
systemowner: true
ipv4: "ACL2"
ipv6: "ACL3"
views:
- view_name: "VIEW1"
mib_view_families:
- name: "1.3.6.1.2.1.1"
included: true
- view_name: "VIEW2"
mib_view_families:
- name: "1.3.6.1.2.1"
included: true
- name: "1.3.6.1.2.1.11"
excluded: true