Click here to Skip to main content
16,017,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
The version of my Net-Snmp in my embedded system is v5.9.3, kind of new. It works fine except not listening to UDP6:161. The command to launch SNMP daemon is:
snmpd -c <path>/snmpd.conf -x /usr/builtin/var/agentx/master

, where master is the UDP socket file.

The content of snmpd.conf at the above command is:
Quote:

rocommunity xxxx localhost
rocommunity public
rocommunity6 public
agentaddress udp:161,udp6:161


I googled and found that it's said it is enough to make Net-Snmp listens to UDP6:161 in such way. But when I used command 'netstat -uln', I found only 'udp :::161', without the expected 'udp6 :::161'.

I traced its excution by turing on the debugging and found the following 4 lines of message:
Quote:
115895:snmp_agent: installing master agent on port udp:161
115953:snmp_agent: init_master_agent; "udp:161" registered as an agent NSAP
115955:snmp_agent: installing master agent on port udp6:161
116011:snmp_agent: init_master_agent; "udp6:161" registered as an agent NSAP


From them, it's obvious that the udp6 port has been listening and registered. But why is there no 'udp6: 161' was shown at output of 'netstat uln'?


So, what did I missed? What should I still need to do to make it's work for UDP6?

What I have tried:

I explored this issue at the web by googling lots of discussions but in vain.
Posted
Updated 29-Mar-23 16:53pm
v3
Comments
[no name] 24-Mar-23 8:53am    
:::161 is really IPv6 , it's the common mask for IPv6 addresses

read about feedback from 'netstat --uln'

1 solution

Actually it works. The UDP6 port is being listened to. The 'netstat' command I used is from BusyBox and it shows UDP6 as

"
udp        0      0 :::161                  :::*
".

I looked for the first token of 'udp6' and thought the UDP6 port was not listened. It's my mistake while seeing the display of BusyBox's netstat.

So, the both UDP port 161 of IPv4 and IPv6 are being listened.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900