1

I am attempting to decipher the below output

bash-3.00$ netstat -a

UDP: IPv4
   Local Address        Remote Address      State
-------------------- -------------------- ----------
      *.sunrpc                            Idle
      *.*                                 Unbound
      *.32771                             Idle

TCP: IPv4
   Local Address        Remote Address    Swind Send-Q Rwind Recv-Q    State
-------------------- -------------------- ----- ------ ----- ------ -----------
      *.*                  *.*                0      0 49152      0 IDLE
      *.sunrpc             *.*                0      0 49152      0 LISTEN
      *.*                  *.*                0      0 49152      0 IDLE
localhost.5987             *.*                0      0 49152      0 LISTEN
localhost.898              *.*                0      0 49152      0 LISTEN
localhost.32771            *.*                0      0 49152      0 LISTEN
localhost.5988             *.*                0      0 49152      0 LISTEN
localhost.32772            *.*                0      0 49152      0 LISTEN
      *.ssh                *.*                0      0 49152      0 LISTEN
      *.32785              *.*                0      0 49152      0 BOUND
localhost.6788             *.*                0      0 49152      0 LISTEN
localhost.6789             *.*                0      0 49152      0 LISTEN
localhost.32782            *.*                0      0 49152      0 LISTEN
localhost.smtp             *.*                0      0 49152      0 LISTEN
localhost.submission       *.*                0      0 49152      0 LISTEN
server-host-name.ssh pc-host-name.51269   64868     51 49640      0 ESTABLISHED

TCP: IPv6
   Local Address                     Remote Address                 Swind Send-Q Rwind Recv-Q   State      If
--------------------------------- --------------------------------- ----- ------ ----- ------ ----------- -----
      *.*                               *.*                             0      0 49152      0 IDLE        
      *.ssh                             *.*                             0      0 49152      0 LISTEN      

SCTP:
        Local Address                   Remote Address          Swind  Send-Q Rwind  Recv-Q StrsI/O  State
------------------------------- ------------------------------- ------ ------ ------ ------ ------- -----------
0.0.0.0                         0.0.0.0                              0      0 102400      0  32/32  CLOSED

Active UNIX domain sockets
Address  Type          Vnode     Conn  Local Addr      Remote Addr
ffffffff84e25ab8 stream-ord ffffffff8569c740 00000000    /var/run/.inetd.uds 
bash-3.00$ 

It looks to me like we have the following items

  • UDP
    • IPv4
      • Open ports sunrpc, 32771
      • Question 1: What is *.* Unbound?
  • TCP
    • IPv4
      • Open ports sunrpc, ssh
      • 10 ports open only for localhost
      • The open ssh connection from my PC
      • Question 2: What is *.32785 *.* 0 0 49152 0 BOUND?
      • Question 3: What is *.* *.* 0 0 49152 0 IDLE? (shows up twice)
    • IPv6
      • Open port ssh
      • Question 3: What is *.* *.* 0 0 49152 0 IDLE?
  • Question 4: What is SCTP?
  • Question 5: What is Active UNIX domain sockets
700 Software
  • 2,233
  • 10
  • 49
  • 77

1 Answers1

1

Socket can be in various states (bound to an address/port, unbound, listening on a broadcast address, etc). The following article gives an in-depth view of how it works in Solaris.

http://www.itworld.com/swol-0202-insidesolaris

gtirloni
  • 5,746
  • 3
  • 25
  • 52
  • I read all 5 pages of article.. but I don't see that it explains the `*.*` notation or even the state names `BOUND` and `IDLE`. It does however seam to indicate that `Active UNIX domain sockets` are the sockets between processes on the same server instead of sockets that are over the network. – 700 Software Jan 03 '11 at 14:28
  • The netstat man page says BOUND is "Bound, ready to connect or listen." and IDLE is "Idle, opened but not bound.". You've to create the socket, bind it and connect/listen. – gtirloni Jan 03 '11 at 15:49