Command Line Reference
Visibility and Monitoring
SNMP
15 min
snmp view snmp view table 1 snmp view table 1 snmp view command purpose show snmp agent trap target display trap configuration of snmp agent show snmp agent source display source of snmp agent show snmp agent user display snmpv3 user configuration show snmp agent community display snmp community configuration show snmp agent control display snmp control information for asterfusion private nodes/bgp nodes/rib nodes show snmp agent trap target show snmp agent trap target \[command] show snmp agent trap target \[purpose] display snmp agent trap configuration \[view] privileged user view \[use cases] sonic# show snmp agent trap target show snmp agent source show snmp agent source \[command] show snmp agent source \[purpose] display snmp agent source \[view] privileged user view \[use cases] sonic# show snmp agent source show snmp agent user show snmp agent user \[command] show snmp agent user \[purpose] display snmpv3 user configuration \[view] privileged user view \[use cases] sonic# show snmp agent user show snmp agent community show snmp agent community \[command] show snmp agent community \[purpose] display snmp community configuration \[view] privileged user view \[use cases] sonic# show snmp agent community show snmp agent control show snmp agent control \[command] show snmp agent control \[purpose] display snmp control information for asterfusion private nodes \[view] privileged user view \[use cases] evpn leaf169# show snmp agent control switch string switch state \ bgp disable rib disable roce running config disable roce stats disable snmp config snmp config table 2 snmp config table 2 snmp config command purpose snmp agent community \[cipher] community name \[ro|rw] configure the community of snmp agent snmp agent user user name \[ authentication mode authen protocol authkey \[ privacy mode privacy protocol privkey ]] configure the user of snmp agent snmp agent trap target {v1|v2c|v3} ip address \[ udp port portnum ] \[ vrf vrf name ] \[ community community name | user user name ] configure the trap target of snmp agent snmp agent source ip address \[ udp port portnum ] \[ vrf vrf name ] configure the listening address of snmp agent snmp agent control enable { roce stats | roce running config | bgp | rib } allow snmp agent to access asterfusion private nodes/bgp nodes/rib nodes snmp agent community \[cipher] snmp agent community \[cipher] community name \[ro|rw] \[command] snmp agent community \[ cipher ] community name \[ ro | rw ] \[purpose] configure the community of snmp agent \[parameters] parameter description cipher configuration of cipher mode community name community name ro read only, the default value is ro rw read write \[view] global configuration view \[notes] run command no snmp agent \[ cipher ] community community name to delete snmp community configuration \[use cases] sonic# configure terminal sonic(config)# snmp agent community comm1 ro snmp agent user snmp agent user user name \[authentication mode authen protocol authkey \[privacy mode privacy protocol privkey ]] \[command] snmp agent user user name \[ authentication mode authen protocol authkey \[ privacy mode privacy protocol privkey ]] \[purpose] configure the user of snmp agent \[parameters] parameter description user name name of the user authen protocol authentication protocol, either md5 or sha authkey authentication password, in string form, length 8 32 bits privacy protocol privacy protocol, either des or aes privkey privacy key, in string form, length 8 32 bits \[view] global configuration view \[notes] run command no snmp agent user user name to delete snmpv3 agent user configuration \[use cases] sonic# configure terminal sonic(config)# snmp agent user user3 authentication mode md5 12345678 privacy mode des 87654321 sonic(config)# snmp agent user user4 sonic(config)# snmp agent user user5 authentication mode md5 12345678 snmp agent trap target {v1|v2c|v3} snmp agent trap target {v1|v2c|v3} ip address \[udp port portnum ] \[vrf vrf name ] \[community community name |user user name ] \[command] snmp agent trap target { v1 | v2c | v3 } ip address \[ udp port portnum ] \[ vrf vrf name ] \[ community community name | user user name ] \[purpose] configure the trap target of snmp agent \[parameters] parameter description ip address snmp agent trap target ip address portnum specify the port number, the default is 162 vrf name specify the vrf name, the default vrf is default community name community name user name name of the user \[view] global configuration view \[notes] run command no snmp agent trap target { v1 | v2c | v3 } to delete the trap target of snmp agent \[use cases] sonic# configure terminal sonic(config)# snmp agent trap target v1 10 250 0 221 sonic(config)# snmp agent trap target v2c 10 250 0 221 udp port 163 community comm1 snmp agent source snmp agent source ip address \[udp port portnum ] \[vrf vrf name ] \[command] snmp agent source ip address \[ udp port portnum ] \[ vrf vrf name ] \[purpose] configure the listening address of snmp agent \[parameters] parameter description ip address the listening ip address portnum specify the port number, the default is 161 vrf name specify the vrf name, the default vrf is default \[view] global configuration view \[notes] run command no snmp agent source ip address to delete the listening address of snmp agent \[use cases] sonic# configure terminal sonic(config)# snmp agent source 10 250 0 221 sonic(config)# snmp agent source 10 250 0 221 udp port 163 snmp agent control enable {roce stats| roce running config |bgp |rib} snmp agent control enable {roce stats| roce running config |bgp |rib} \[command] snmp agent control enable { roce stats|roce running config | bgp | rib } \[purpose] allow snmp agent to access asterfusion private nodes/bgp nodes/rib nodes \[parameters] parameter description roce running config configuration information of roce related ports and queues roce stats traffic statistics of roce related ports and queues bgp bgp information rib rib information, include arp, mac, route \[view] global configuration view \[notes] disabled by default, needs to be enabled manually run command no snmp agent control enable {roce stats| roce running config |bgp |rib} to disable this function \[use cases] sonic# configure terminal sonic(config)# snmp agent control enable roce stats restarting snmp service
