Why is snmpd using random ports in Red Hat Enterprise Linux 5?
Issue
SNMP daemon is listening on random ports. As you can see in the below example, first it is listening on 32669, then 21364, then 38951.
Example
[root@XXX ~]# netstat -npul | grep snmpd
udp 0 0 0.0.0.0:32669 0.0.0.0 6799/snmpd
udp 0 0 127.0.0.1:25375 0.0.0.0 6799/snmpd
udp 0 0 0.0.0.0:161 0.0.0.0 6799/snmpd
[root@XXX ~]# service snmpd restart
Stopping snmpd: [ OK ]
Starting snmpd: [ OK ]
[root@XXX ~]# netstat -npul | grep snmpd
udp 0 0 127.0.0.1:25375 0.0.0.0 9706/snmpd
udp 0 0 0.0.0.0:161 0.0.0.0 9706/snmpd
udp 0 0 0.0.0.0:21364 0.0.0.0 9706/snmpd
Environment
- Red Hat Enterprise Linux 5
- net-snmp
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
