Archive

Archive for October, 2016

Windows SNMP

October 25th, 2016 Comments off

Utilities

FilenameDescription
eventcmd.execommand line tool to configure the SNMP event translator
eventwin.exeapplication / user interface for configuring SNMP event translator
mibcc.exeSNMP MIB Compiler
snmputil.exeSample SNMP Manager console application

Essential  SNMP Files

FilenameDescription
dhcpmib.dllDCHP MIB. Only used on DHCP servers
eventagnt.dllSNMP Event Translator. Translates event logs into SNMP traps.
hostmib.dllImplements the Host Resources MIB
lmmib2.dllImplements LAN Manger MIB-II
mgmtapi.dllMicrosoft SNMP manager library. API allows snmp manager applications to listen for snmp manager requests, send requests, and receive responses from SNMP agents.
mib.bincompiled MIB information for mgmtapi.dll
snmp.exeA Service. The master agent that receives SNMP requests and delivers to the appropirate DLL.
snmpapi.dllsnmp utilities used by snmp extension agents and manager applications. Contains framework for developing extension agent DLLs.
snmpsnap.dllSNMP trap services. Receives SNMP traps and forwards them to SNMP managers
winsmib.dllMicrosoft-defined WINS mib. Installed only on WINS servers.
wsnmp32.dllThis API allows SNMP manager applications to "listen" for SNMP manager requests, and send requests to and receive responses from SNMP agents.

Related Links

Configure SNMP

Categories: Networking Tags: , ,

Example Unix and Windows/Powershell Network Socket Table Commands

October 7th, 2016 Comments off

1. What tcp sockets are open?

Unix
netstat -an | egrep -I “^tcp.*LISTEN”
netstat -an | egrep -I “^tcp.*LISTEN” | awk ‘{split($4,a,”:”);print a[2]}’

Powershell
netstat -an | select-string “LISTEN”
netstat -an | select-string “LISTEN” | %{$i=%{$_.Line.Split(“:”)};$j=$i[1] -replace ‘\s+’,’ ‘;$k=$j.Split(” “);$k[0]} | where {$_ -ne “”}

2. What TCP ports are in an ESTABLISHED/LISTEN state

Unix
netstat -an | egrep ESTABLISH
netstat -an | egrep ESTABLISH | awk ‘{split($4,a,”:”);print a[2]}’

Powershell
netstat -an | select-string “ESTABLISHED”
netstat -an | select-string “ESTABLISHED” | %{$i=%{$_.Line.Split(“:”)};$j=$i[1] -replace ‘\s+’,’ ‘;$k=$j.Split(” “);$k[0]} | where {$_ -ne “”}

3. What connections are in some sort of Wait State?

Unix
netstat -an | egrep WAIT
Powershell
netstat -an | select-string “WAIT”

4. How many connections are in some sort of WAIT state?

Unix

netstat –an | egrep WAIT | wc –l
Powershell
netstat -an | select-string “WAIT” | where {$_ -ne “”} | Measure-Object –Line

5. What are the IP address and ports of the remote machines that are in some sort of WAIT state to this machine?

Unix

nestat -an | egrep WAIT | awk ‘{print $4}’
Powershell
netstat -an | select-string “WAIT” | %{$_ -replace ‘\s+’,’ ‘ } | %{$i=$_.Split(” “);$i[3]}

6. What are the IP address (no ports) of the remote machines that are in some sort of WAIT state to this machine?

Unix

netstat -an | egrep WAIT | awk ‘{print($4,a,”:”);print a[1]}’
Powershell
netstat -an | select-string “WAIT” | %{$_ -replace ‘\s+’,’ ‘ } | %{$i=$_.Split(” “);$i[3]} | %{$i=$_.Split(“:”);$i[0]}

7. What are the unique IP address of remote connections in some sort of WAIT state?

Unix
netstat -an | egrep WAIT | awk ‘{split($4,a,”:”);print a[1]}’ | sort -u
Powershell
netstat -an | select-string “WAIT” | %{$_ -replace ‘\s+’,’ ‘ } | %{$i=$_.Split(” “);$i[3]} | %{$i=$_.Split(“:”);$i[0]} | Sort-Object | Get-Unique