#compsci 

The Protocol Data Unit (PDU) is the message format that managers and agents use to send and receive information. Each of the following [[SNMP]] operations has a standard PDU format:
![[Pasted image 20250709141256.png]]
## get
![[Pasted image 20250709141757.png]]
![[Pasted image 20250709141805.png]]

>[!Example]
>![[Pasted image 20250709141849.png]]
>![[Pasted image 20250709141926.png]]

NB: the order of the commands in the example is wrong, consult the man pages instead
## getnext
The getnext operation lets you issue a sequence of commands to retreieve a group of values from a MIB. For each MIB object, a separate getnext request and getresponse are generated
![[Pasted image 20250709144602.png]]

Notice that we didn't provide the exact OID path for this one. The getnext operation lexicographically searches for it on its own:
![[Pasted image 20250709144636.png]]

## getbulk
![[Pasted image 20250709144807.png]]![[Pasted image 20250709144922.png]]
![[Pasted image 20250709144931.png]]

## walk
![[Pasted image 20250726010922.png]]

## set
Used to change the value of a managed object or to create a new row in a table
![[Pasted image 20250709145020.png]]
![[Pasted image 20250709145043.png]]

![[Pasted image 20250726011015.png]]
## Error responses
![[Pasted image 20250709145149.png]]
![[Pasted image 20250709145209.png]]
![[Pasted image 20250709145222.png]]


## Traps
![[Pasted image 20250709145912.png]]

![[Pasted image 20250727002510.png]]

enterpriseSpecific traps are defined by:
- enterprise ID of the organization
- specific trap number assigned by that organization

![[Pasted image 20250727003040.png]]

![[Pasted image 20250727003405.png]]

![[Pasted image 20250727005210.png]]
![[Pasted image 20250727005244.png]]
![[Pasted image 20250727005536.png]]
-e specifies this application's engine ID. The corresponding trap receiver should be configured with this value
## SNMP Notification
In an effort to standardize the PDU format of SNMPv1 traps, SNMPv2 defines a `NOTICIATION-TYPE`:
![[Pasted image 20250709150512.png]]

## SNMP Inform and SNMP Report
![[Pasted image 20250709150616.png]]
![[Pasted image 20250709150622.png]]