Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
netstat -inet
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Gijsbrecht
n00b
n00b


Joined: 20 Jan 2006
Posts: 3
Location: Delft, the Netherlands

PostPosted: Tue May 30, 2006 1:41 pm    Post subject: netstat -inet Reply with quote

When I erronously ran "netstat -inet" on my machine instead of "netstat --inet", it seemed to output the same information as ifconfig. I can't find any information about this behavior in the man pages or anywhere on the internet. Is this a bug, an undocumented feature or a surprise?
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 622
Location: Yeovil, Somerset, UK

PostPosted: Tue May 30, 2006 2:41 pm    Post subject: Re: netstat -inet Reply with quote

Gijsbrecht wrote:
When I erronously ran "netstat -inet" on my machine instead of "netstat --inet", it seemed to output the same information as ifconfig. I can't find any information about this behavior in the man pages or anywhere on the internet. Is this a bug, an undocumented feature or a surprise?


netstat -ie is enough to give that output.

man netstat:

--interface , -i
Display a table of all network interfaces.

--numeric , -n
Show numerical addresses instead of trying to determine symbolic host, port or user names.

-e, --extend
Display additional information. Use this option twice for maximum detail.

Can't find "t" though. If you look at the footnotes to the man page you get the feeling it has been hacked around a bit ...
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Tue May 30, 2006 3:24 pm    Post subject: Reply with quote

Perhaps this will give you what you desire:
Code:
netstat -anA inet

-a = all, listening and non-listening
-n = numeric hosts
-A = --protocol=family , -A
Specifies the address families (perhaps better described as low level
protocols) for which connections are to be shown. family is a comma
(',') separated list of address family keywords like inet, unix, ipx,
ax25, netrom, and ddp. This has the same effect as using the --inet,
--unix (-x), --ipx, --ax25, --netrom, and --ddp options.

The address family inet includes raw, udp and tcp protocol sockets.

inet = self explanitory

Example:
Code:
polly mythtv # netstat -anA inet
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:46150           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:6543            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:42511           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:6544            0.0.0.0:*               LISTEN
tcp        0      0 10.0.0.100:53           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:1020            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:638           0.0.0.0:*               LISTEN
tcp        0      0 10.0.0.100:56120        10.0.0.10:22            ESTABLISHED
udp        0      0 0.0.0.0:32768           0.0.0.0:*
udp        0      0 0.0.0.0:2049            0.0.0.0:*
udp        0      0 0.0.0.0:32769           0.0.0.0:*
udp        0      0 0.0.0.0:32770           0.0.0.0:*
udp        0      0 10.0.0.100:53           0.0.0.0:*
udp        0      0 127.0.0.1:53            0.0.0.0:*
udp        0      0 0.0.0.0:987             0.0.0.0:*
udp        0      0 0.0.0.0:111             0.0.0.0:*
udp        0      0 0.0.0.0:631             0.0.0.0:*
udp        0      0 0.0.0.0:1017            0.0.0.0:*
udp        0      0 10.0.0.100:123          0.0.0.0:*
udp        0      0 127.0.0.1:123           0.0.0.0:*
udp        0      0 0.0.0.0:123             0.0.0.0:*

Hope this helps
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum