跳转到内容
Ask AI

SNMP

此内容尚不支持你的语言。

Table 1 SNMP View

CommandPurpose
show snmp-agent trap-targetDisplay trap configuration of SNMP agent.
show snmp-agent sourceDisplay source of SNMP agent.
show snmp-agent userDisplay SNMPv3 user configuration.
show snmp-agent communityDisplay SNMP community configuration.
show snmp-agent controlDisplay SNMP control information for Asterfusion private nodes/BGP nodes/RIB nodes.

[Command] show snmp-agent trap-target

[Purpose] Display SNMP agent trap configuration.

[View] Privileged User View

[Use Cases]

sonic# show snmp-agent trap-target

[Command] show snmp-agent source

[Purpose] Display SNMP agent source.

[View] Privileged User View

[Use Cases]

sonic# show snmp-agent source

[Command] show snmp-agent user

[Purpose] Display SNMPv3 user configuration.

[View] Privileged User View

[Use Cases]

sonic# show snmp-agent user

[Command] show snmp-agent community

[Purpose] Display SNMP community configuration.

[View] Privileged User View

[Use Cases]

sonic# show snmp-agent community

[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

Table 2 SNMP Config

CommandPurpose
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.

[Command] **snmp-agent community ** [cipher] community_name [RO|RW]

[Purpose] Configure the community of SNMP agent.

[Parameters]

ParameterDescription
cipherConfiguration of cipher mode
community_nameCommunity name
RORead-Only, the default value is RO
RWRead-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

[Command] snmp-agent user user_name [authentication-mode authen-protocol authKey [privacy-mode privacy-protocol privKey]]

[Purpose] Configure the user of SNMP agent.

[Parameters]

ParameterDescription
user_nameName of the user.
authen-protocolAuthentication protocol, either md5 or sha.
authKeyAuthentication password, in string form, length 8-32 bits.
privacy-protocolPrivacy protocol, either des or aes.
privKeyPrivacy 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

[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]

ParameterDescription
ip-addressSNMP-Agent Trap Target IP address
portnumSpecify the port number, the default is 162.
vrf_nameSpecify the VRF name, the default VRF is default.
community_nameCommunity name.
user_nameName 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

[Command] snmp-agent source ip-address [udp-port portnum] [vrf vrf_name]

[Purpose] Configure the listening address of SNMP agent.

[Parameters]

ParameterDescription
ip-addressThe listening IP address.
portnumSpecify the port number, the default is 161.
vrf_nameSpecify 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}

Section titled “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]

ParameterDescription
roce running-configConfiguration information of RoCE related ports and queues
roce statsTraffic statistics of RoCE-related ports and queues
bgpBGP information
ribRIB 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...