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
Section titled “Diagram”Classes
Section titled “Classes”configuration (iosxr.devices)
Section titled “configuration (iosxr.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| snmp_server | Class | [snmp_server] | No |
snmp_server (iosxr.devices.configuration)
Section titled “snmp_server (iosxr.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| communities | List | [communities] | No | |
| contact | String | No | ||
| groups | List | [groups] | No | |
| hosts | List | [hosts] | No | |
| location | String | No | ||
| chassis_id | String | No | ||
| packetsize | Integer | min: 484, max: 65500 | No | |
| trap_timeout | Integer | min: 1, max: 1000 | No | |
| queue_length | Integer | min: 1, max: 5000 | No | |
| throttle_time | Integer | min: 50, max: 1000 | No | |
| overload_control | Integer | min: 0, max: 300 | No | |
| overload_throttle_rate | Integer | min: 0, max: 1000 | No | |
| trap_source | String | No | ||
| trap_source_ipv4 | String | No | ||
| trap_source_ipv6 | String | No | ||
| trap_source_port | Integer | min: 1024, max: 65535 | No | |
| trap_throttle_time | Integer | min: 10, max: 500 | No | |
| trap_authentication_vrf_disable | Boolean | true, false | No | |
| trap_delay_timer | Integer | min: 30, max: 240 | No | |
| ipv4_dscp | String | No | ||
| ipv6_dscp | String | No | ||
| drop_unknown_user | Boolean | true, false | No | |
| drop_report_acl_ipv4 | String | No | ||
| drop_report_acl_ipv6 | String | No | ||
| engine_id_local | String | No | ||
| engine_id_remotes | List | [engine_id_remotes] | No | |
| oid_poll_stats | Boolean | true, false | No | |
| timeouts_subagent | Integer | min: 1, max: 20 | No | |
| timeouts_duplicate | Integer | min: 0, max: 20 | No | |
| timeouts_in_qdrop | Integer | min: 0, max: 20 | No | |
| timeouts_threshold | Integer | min: 0, max: 100000 | No | |
| timeouts_pdu_stats | Integer | min: 1, max: 10 | No | |
| logging_threshold_oid_processing | Integer | min: 0, max: 20000 | No | |
| logging_threshold_pdu_processing | Integer | min: 0, max: 20000 | No | |
| inform_retries | Integer | min: 0, max: 100 | No | |
| inform_timeout | Integer | min: 1, max: 42949671 | No | |
| inform_pending | Integer | min: 1, max: 4294967295 | No | |
| traps_snmp_authentication | Boolean | true, false | No | |
| traps_snmp_coldstart | Boolean | true, false | No | |
| traps_snmp_warmstart | Boolean | true, false | No | |
| traps_snmp_linkup | Boolean | true, false | No | |
| traps_snmp_linkdown | Boolean | true, false | No | |
| traps_snmp_all | Boolean | true, false | No | |
| traps_l2vpn_all | Boolean | true, false | No | |
| traps_l2vpn_vc_up | Boolean | true, false | No | |
| traps_l2vpn_vc_down | Boolean | true, false | No | |
| traps_l2vpn_cisco | Boolean | true, false | No | |
| traps_vpls_all | Boolean | true, false | No | |
| traps_vpls_status | Boolean | true, false | No | |
| traps_vpls_full_raise | Boolean | true, false | No | |
| traps_vpls_full_clear | Boolean | true, false | No | |
| traps_bfd | Boolean | true, false | No | |
| traps_config | Boolean | true, false | No | |
| traps_cfm | Boolean | true, false | No | |
| traps_ethernet_oam_events | Boolean | true, false | No | |
| traps_rf | Boolean | true, false | No | |
| traps_sensor | Boolean | true, false | No | |
| traps_mpls_l3vpn_all | Boolean | true, false | No | |
| traps_mpls_l3vpn_vrf_up | Boolean | true, false | No | |
| traps_mpls_l3vpn_vrf_down | Boolean | true, false | No | |
| traps_mpls_l3vpn_mid_threshold_exceeded | Boolean | true, false | No | |
| traps_mpls_l3vpn_max_threshold_exceeded | Boolean | true, false | No | |
| traps_mpls_l3vpn_max_threshold_cleared | Boolean | true, false | No | |
| traps_mpls_l3vpn_max_threshold_reissue_notif_time | Integer | min: 0, max: 2147483647 | No | |
| traps_mpls_traffic_eng_cisco | Boolean | true, false | No | |
| traps_mpls_traffic_eng_cisco_ext_bringup_fail | Boolean | true, false | No | |
| traps_mpls_traffic_eng_cisco_ext_insuff_bw | Boolean | true, false | No | |
| traps_mpls_traffic_eng_cisco_ext_preempt | Boolean | true, false | No | |
| traps_mpls_traffic_eng_cisco_ext_reroute_pending | Boolean | true, false | No | |
| traps_mpls_traffic_eng_cisco_ext_reroute_pending_clear | Boolean | true, false | No | |
| traps_mpls_traffic_eng_down | Boolean | true, false | No | |
| traps_mpls_traffic_eng_p2mp_down | Boolean | true, false | No | |
| traps_mpls_traffic_eng_p2mp_up | Boolean | true, false | No | |
| traps_mpls_traffic_eng_reoptimize | Boolean | true, false | No | |
| traps_mpls_traffic_eng_reroute | Boolean | true, false | No | |
| traps_mpls_traffic_eng_up | Boolean | true, false | No | |
| traps_ntp | Boolean | true, false | No | |
| traps_bgp_cbgp_two_enable | Boolean | true, false | No | |
| traps_bgp_cbgp_two_updown | Boolean | true, false | No | |
| traps_bgp_enable_cisco_bgp4_mib | Boolean | true, false | No | |
| traps_bgp_enable_updown | Boolean | true, false | No | |
| traps_hsrp | Boolean | true, false | No | |
| traps_isis_database_overload | Boolean | true, false | No | |
| traps_isis_manual_address_drops | Boolean | true, false | No | |
| traps_isis_corrupted_lsp_detected | Boolean | true, false | No | |
| traps_isis_attempt_to_exceed_max_sequence | Boolean | true, false | No | |
| traps_isis_id_len_mismatch | Boolean | true, false | No | |
| traps_isis_max_area_addresses_mismatch | Boolean | true, false | No | |
| traps_isis_own_lsp_purge | Boolean | true, false | No | |
| traps_isis_sequence_number_skip | Boolean | true, false | No | |
| traps_isis_authentication_type_failure | Boolean | true, false | No | |
| traps_isis_authentication_failure | Boolean | true, false | No | |
| traps_isis_version_skew | Boolean | true, false | No | |
| traps_isis_area_mismatch | Boolean | true, false | No | |
| traps_isis_rejected_adjacency | Boolean | true, false | No | |
| traps_isis_lsp_too_large_to_propagate | Boolean | true, false | No | |
| traps_isis_orig_lsp_buff_size_mismatch | Boolean | true, false | No | |
| traps_isis_protocols_supported_mismatch | Boolean | true, false | No | |
| traps_isis_adjacency_change | Boolean | true, false | No | |
| traps_isis_lsp_error_detected | Boolean | true, false | No | |
| traps_isis_all | Boolean | true, false | No | |
| traps_vrrp_events | Boolean | true, false | No | |
| traps_alarm | Boolean | true, false | No | |
| traps_bridgemib | Boolean | true, false | No | |
| traps_copy_complete | Boolean | true, false | No | |
| traps_entity | Boolean | true, false | No | |
| traps_cisco_entity_ext | Boolean | true, false | No | |
| traps_entity_redundancy_all | Boolean | true, false | No | |
| traps_entity_redundancy_switchover | Boolean | true, false | No | |
| traps_entity_redundancy_status | Boolean | true, false | No | |
| traps_entity_state_switchover | Boolean | true, false | No | |
| traps_entity_state_operstatus | Boolean | true, false | No | |
| traps_flash_insertion | Boolean | true, false | No | |
| traps_flash_removal | Boolean | true, false | No | |
| traps_fru_ctrl | Boolean | true, false | No | |
| traps_ipsla | Boolean | true, false | No | |
| traps_mpls_ldp_down | Boolean | true, false | No | |
| traps_mpls_ldp_up | Boolean | true, false | No | |
| traps_mpls_ldp_threshold | Boolean | true, false | No | |
| traps_pim_neighbor_change | Boolean | true, false | No | |
| traps_pim_interface_state_change | Boolean | true, false | No | |
| traps_pim_invalid_message_received | Boolean | true, false | No | |
| traps_pim_rp_mapping_change | Boolean | true, false | No | |
| traps_power | Boolean | true, false | No | |
| traps_syslog | Boolean | true, false | No | |
| traps_system | Boolean | true, false | No | |
| users | List | [users] | No | |
| views | List | [views] | No |
communities (iosxr.devices.configuration.snmp_server)
Section titled “communities (iosxr.devices.configuration.snmp_server)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| community | String | Yes | ||
| ipv4 | String | No | ||
| ipv6 | String | No | ||
| ro | Boolean | true, false | No | |
| rw | Boolean | true, false | No | |
| sdrowner | Boolean | true, false | No | |
| systemowner | Boolean | true, false | No | |
| view | String | No |
groups (iosxr.devices.configuration.snmp_server)
Section titled “groups (iosxr.devices.configuration.snmp_server)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| group_name | String | Yes | ||
| v1 | Boolean | true, false | No | |
| v1_read | String | No | ||
| v1_write | String | No | ||
| v1_context | String | No | ||
| v1_notify | String | No | ||
| v1_ipv4 | String | No | ||
| v1_ipv6 | String | No | ||
| v2c | Boolean | true, false | No | |
| v2c_read | String | No | ||
| v2c_write | String | No | ||
| v2c_context | String | No | ||
| v2c_notify | String | No | ||
| v2c_ipv4 | String | No | ||
| v2c_ipv6 | String | No | ||
| v3_priv | Boolean | true, false | No | |
| v3_read | String | No | ||
| v3_write | String | No | ||
| v3_context | String | No | ||
| v3_notify | String | No | ||
| v3_ipv4 | String | No | ||
| v3_ipv6 | String | No |
hosts (iosxr.devices.configuration.snmp_server)
Section titled “hosts (iosxr.devices.configuration.snmp_server)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | String | Yes | ||
| traps_unencrypted_strings | List | [traps_unencrypted_strings] | No | |
| informs_unencrypted_strings | List | [informs_unencrypted_strings] | No |
engine_id_remotes (iosxr.devices.configuration.snmp_server)
Section titled “engine_id_remotes (iosxr.devices.configuration.snmp_server)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | String | Yes | ||
| engine_id | String | Yes | ||
| udp_port | Integer | min: 1, max: 65535 | No |
users (iosxr.devices.configuration.snmp_server)
Section titled “users (iosxr.devices.configuration.snmp_server)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| group_name | String | Yes | ||
| user_name | String | Yes | ||
| v1 | Boolean | true, false | No | |
| v1_ipv4 | String | No | ||
| v1_ipv6 | String | No | ||
| v1_systemowner | Boolean | true, false | No | |
| v2c | Boolean | true, false | No | |
| v2c_ipv4 | String | No | ||
| v2c_ipv6 | String | No | ||
| v2c_systemowner | Boolean | true, false | No | |
| v3 | Boolean | true, false | No | |
| v3_auth_md5_encryption_aes | String | No | ||
| v3_auth_md5_encryption_default | String | No | ||
| v3_auth_sha_encryption_aes | String | No | ||
| v3_auth_sha_encryption_default | String | No | ||
| v3_auth_sha_256_encryption_aes | String | No | ||
| v3_auth_sha_256_encryption_default | String | No | ||
| v3_auth_sha_512_encryption_aes | String | No | ||
| v3_auth_sha_512_encryption_default | String | No | ||
| v3_ipv4 | String | No | ||
| v3_ipv6 | String | No | ||
| v3_priv_aes_aes_128_encryption_aes | String | No | ||
| v3_priv_aes_aes_128_encryption_default | String | No | ||
| v3_priv_aes_aes_192_encryption_aes | String | No | ||
| v3_priv_aes_aes_192_encryption_default | String | No | ||
| v3_priv_aes_aes_256_encryption_aes | String | No | ||
| v3_priv_aes_aes_256_encryption_default | String | No | ||
| v3_systemowner | Boolean | true, false | No |
views (iosxr.devices.configuration.snmp_server)
Section titled “views (iosxr.devices.configuration.snmp_server)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| view_name | String | Yes | ||
| mib_view_families | List | [mib_view_families] | No |
traps_unencrypted_strings (iosxr.devices.configuration.snmp_server.hosts)
Section titled “traps_unencrypted_strings (iosxr.devices.configuration.snmp_server.hosts)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| community_string | String | Yes | ||
| udp_port | Integer | min: 1, max: 65535 | No | |
| version_v2c | Boolean | true, false | No | |
| version_v3_security_level | Choice | auth, noauth, priv | No |
informs_unencrypted_strings (iosxr.devices.configuration.snmp_server.hosts)
Section titled “informs_unencrypted_strings (iosxr.devices.configuration.snmp_server.hosts)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| community_string | String | Yes | ||
| udp_port | Integer | min: 1, max: 65535 | No | |
| version_v2c | Boolean | true, false | No | |
| version_v3_security_level | Choice | auth, noauth, priv | No |
mib_view_families (iosxr.devices.configuration.snmp_server.views)
Section titled “mib_view_families (iosxr.devices.configuration.snmp_server.views)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| excluded | Boolean | true, false | No | |
| included | Boolean | true, false | No |
Sample Configuration:
Section titled “Sample Configuration:”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 Loopback10snmp-server traps rfsnmp-server traps bfdsnmp-server traps bgp cbgp-two enablesnmp-server traps bgp enable cisco-bgp4-mibsnmp-server traps ntpsnmp-server traps ethernet oam eventssnmp-server traps copy-completesnmp-server traps snmp linkupsnmp-server traps snmp linkdownsnmp-server traps powersnmp-server traps configsnmp-server traps entitysnmp-server traps systemsnmp-server traps bridgemibsnmp-server traps entity-state operstatussnmp-server traps entity-redundancy allsnmp-server traps sensorsnmp-server traps fru-ctrlsnmp-server traps isis database-overloadsnmp-server traps isis manual-address-dropssnmp-server traps isis corrupted-lsp-detectedsnmp-server traps isis adjacency-changesnmp-server traps l2vpn allsnmp-server traps l2vpn vc-upsnmp-server traps l2vpn vc-downsnmp-server user USER1 GROUP1 v3 auth md5 encrypted 073C05626E2A4841141D priv aes 128 encrypted 073C05626E2A4841141D IPv4 ACL1 systemownersnmp-server user USER2 GROUP1 v3 auth sha encrypted 080D7A1A10151A190B priv aes 128 encrypted 073C05626E2A4841141D IPv4 ACL2snmp-server group GROUP1 v3 priv read VIEW1 write VIEW2 context CONTEXT1 notify VIEW3 IPv4 ACL1 IPv6 ACL2snmp-server community public view VIEW1 RO IPv4 ACL1snmp-server community private view VIEW2 RW systemowner IPv4 ACL2 IPv6 ACL3snmp-server view VIEW1 1.3.6.1.2.1.1 includedsnmp-server view VIEW2 1.3.6.1.2.1 includedsnmp-server view VIEW2 1.3.6.1.2.1.11 excludedExample YAML Code:
Section titled “Example YAML Code:”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: trueExample-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