SNMP default port communication using UDP 161, in the process of installing some monitoring software, often prompted the port is occupied, and so on how to modify the system's default SNMP port
Windows modifies SNMP ports
1 Opening a Services file
Path: C:\Windows\System32\drivers\etc
2 modifying ports
Modified before: SNMP 161/udp #SNMP
Modified: SNMP 1161/udp #SNMP
3 Service to restart SNMP
Linux modifies SNMP ports
1 Modifying the Linux/etc/snmp/snmpd.conf file
Command: VI etc/snmp/snmpd.conf
2 Modify the SNMP monitored port to 1161 to add the following line
Command: Agentaddress 1161
Save, exit
3 Alternatively, you can modify the name of the service
Modify the name of the SNMP monitor to monitor
The revised content is as follows: Com2sec notconfiguser default Monitor
4 Restart SNMP Service
Command: Service snmpd restart
or use the following command to start
Command:/ETC/RC.D/INIT.D/SNMPD start on the line.
Unix I haven't verified yet
CENTOS5.3,SNMP version 5.3,rpm package.
By default, SNMPD listens for SNMP requests on UDP161, and we may want to change the ports by giving SNMPD the ability to specify the listening address and port in the following form:[<transport-specifier>:]< Transport-address>
<transport-specifier> <transport-address> Format
UDP (default) hostname[:p ort] or ipv4-address[:p ORT]
TCP hostname[:p ort] or ipv4-address[:p ORT]
UNIX pathname
IPX [Network]:node[/port]
AAL5PVC or PVC [interface.] [VPI.] VCI
UDP6 or Udpv6 or Udpipv6 hostname[:p ort] or ipv6-address[:p ORT]
TCP6 or Tcpv6 or Tcpipv6 hostname[:p ort] or ipv6-address[:p ORT]
Note:<transport-specifier> case insensitive.
The simplest implementation is as follows:
/USR/SBIN/SNMPD tcp: Port or/USR/SBIN/SNMPD UDP: Port
Or
Vi/etc/rc.d/init.d/snmpd
Modified before options= "-lsd-lf/dev/null-p/var/run/snmpd.pid-a"
options= "Tcp:9999-lsd-lf/dev/null-p/var/run/snmpd.pid-a" after modification
/ETC/RC.D/INIT.D/SNMPD start on the line.
Linux or window is the default port for modifying SNMP