UDP port
Port 161: SNMP
UDP port 161 is SNMP: a monitoring station asks a device's agent for its counters and settings. UDP port 162 is where the station listens for traps, the messages a device sends without being asked.
- Each value has a numbered name, an OID, in a tree the device's MIB describes.
Check port 161 on Linux
Put the server's name or address in place of HOST.
ss -ulnp 'sport = :161'- On the server: is a program listening on UDP port 161, and which? How to read ss.
tcpdump -ni any udp port 161- On either end: the datagrams to and from UDP port 161. With UDP this is the sure test, since nothing is acknowledged. How to read tcpdump.
nmap -sU -p 161 HOST- From outside: a UDP scan of port 161. No answer reads open|filtered: UDP does not say which. How to read nmap.
What runs on it
- SNMP
- A protocol for reading counters and settings from network devices, on UDP port 161.
- SNMP trap
- A message an agent sends on its own, to UDP port 162, when something changes, such as a link going down.
- MIB and OID
- The tree of numbered names every SNMP value lives at, and the files that put words on the numbers.
Use port 161 on real machines
Open SNMP: read a router's counters from across the room