1832645 Members
2417 Online
110043 Solutions
New Discussion

Re: SNMP

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

SNMP

I am trying to send very simple snmpd commands from 'a' to 'b'. 'b' is on the other side of the firewall, however, our network group told me they opened port 161 for snmp. Still no response. Is there a command I can use to test port 161 on system 'b'?
UNIX IS GOOD
14 REPLIES 14
harry d brown jr
Honored Contributor

Re: SNMP

yes, -->

telnet b 161

live free or die
harry
Live Free or Die
Sajid_1
Honored Contributor

Re: SNMP

hello,

you can use 'lsof' on the remote system and see if the port is configured to accept requests.

hth
learn unix ..
Jeff Schussele
Honored Contributor

Re: SNMP

Hi Robert,

Did the FW group open port 161 UDP?
SNMP uses UDP & not TCP, so have them doublecheck.
They'll also have to open 162/UDP for the traps.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Nobody's Hero
Valued Contributor

Re: SNMP

Harry,
I tried 'telnet b 161' on this 10.20 box and it returned 'b: Unknown Host'. Am I not understanding your command?
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: SNMP

I also noticed that the following sub agents are not running. When I try to start them, I get no error that I can see and it does not start.

/usr/sbin/hp_unixagt
/usr/sbin/mib2agt

the snmpd daemon is running though.
UNIX IS GOOD
Jeff Schussele
Honored Contributor

Re: SNMP

Hi Robert,

Harry meant
telnet hostname_of_b 161
i.e. telnet to the host on port 161.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: SNMP

But on reflection telnet is a TCP function.
If it connects OK that's eveidence that the FW group opened 161/TCP & you need 161/UDP and 162/UDP.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Nobody's Hero
Valued Contributor

Re: SNMP

Sorry harry, not enough coffee yet. I understand. My bag.
UNIX IS GOOD
Sajid_1
Honored Contributor

Re: SNMP

hello,

This will give you the explanation:
# man telnet

If you are not giving any telnet ports, it will try connecting to the default one. You can also check the /etc/services file and see if the port is defined there and which service is running.
learn unix ..
Nobody's Hero
Valued Contributor

Re: SNMP

Tried,
'telnet ihshp2 161'
Returns:

'telnet ihshp2 161
Trying...
telnet: Unable to connect to remote host: Connection refused'
UNIX IS GOOD
MANOJ SRIVASTAVA
Honored Contributor

Re: SNMP

Hi Robert


Can you do nslookup ihshp2 and see how the name is resolved , also you may try the nslookup IP adress , onc ethis get throght then you may be able to login or accces it using the port no.



Manoj Srivastava
Sajid_1
Honored Contributor

Re: SNMP

harry d brown jr
Honored Contributor
Solution

Re: SNMP

Robert,

Yea, sorry about that, telnet isn't going to work here. try loading this:

http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/tricklet-1.4/

then test it with this on HOSTA:

echo "sysDescr" | /opt/tricklet/bin/snmp-get HOSTNAMEB

live free or die
harry
Live Free or Die
Nobody's Hero
Valued Contributor

Re: SNMP

Bingo, thanks Harry. Peerrrffeecctt.
Exactly what I was looking for. Could you srdf your knowledge. I need an upgrade.
UNIX IS GOOD