近期评论

关于netstat的简单介绍

Netstat用于显示与IP、TCP、UDP和ICMP协议相关的统计数据,一般用于检验本机各端口的网络连接情况。 

  1、netstat 的一些常用选项

  netstat –s

  本选项能够按照各个协议分别显示其统计数据。如果我们的应用程序(如Web浏览器)运行速度比较慢,或者不能显示Web页之类的数据,那么我们就可以用本选项来查看一下所显示的信息。我们需要仔细查看统计数据的各行,找到出错的关键字,进而确定问题所在。

  netstat –e

  本选项用于显示关于以太网的统计数据。它列出的项目包括传送的数据报的总字节数、错误数、删除数、数据报的数量和广播的数量。这些统计数据既有发送的数据报数量,也有接收的数据报数量。这个选项可以用来统计一些基本的网络流量)。

  netstat –r

  本选项可以显示关于路由表的信息,类似于后面所讲使用route print命令时看到的 信息。除了显示有效路由外,还显示当前有效的连接。

  netstat –a

  本选项显示一个所有的有效连接信息列表,包括已建立的连接(ESTABLISHED),也包括监听连接请求(LISTENING)的那些连接。

  netstat –n

  显示所有已建立的有效连接。

  2、Netstat的妙用

  经常上网的人一般都使用ICQ的,不知道我们有没有被一些讨厌的人骚扰,想投诉却又不知从和下手?其实,我们只要知道对方的IP,就可以向他所属的ISP投诉了。但怎样才能通过ICQ知道对方的IP呢?如果对方在设置ICQ时选择了不显示IP地址,那我们是无法在信息栏中看到的。其实,我们只需要通过Netstat就可以很方便的做到这一点:当他通过ICQ或其他的工具与我们相连时(例如我们给他发一条ICQ信息或他给我们发一条信息),我们立刻在DOS 命令提示符下输入netstat -n或netstat -a就可以看到对方上网时所用的IP或ISP域名了,甚至连所用Port都完全暴露了。 
  如果你所在的网吧连防火墙也没安装,那么就用古老的DOS命令吧,也就是用netstat这个命令来查看。 
  用此方法有个前提条件,那就是一定要用甜言蜜语把想知道IP地址的好友请到QQ的“二人世界”里。然后在MS-DOS窗口里输入如下命令:netstat -n ,你将看到如下内容: 
  Active Connections 
  Proto   Local Address   Foreign Address    State 
  TCP  61.109.34.78:1200  61.154.155.109:61555  ESTABLISHED 
  TCP  61.109.34.78:2694  61.143.136.34:6667   ESTABLISHED 
  TCP  61.109.34.78:4869  202.104.121.291:23   ESTABLISHED 
  哇! 有好几个IP地址,哪个才是我们要找的呢?现在退出“二人世界”,在MS-DOS窗口(运行CMD即命令符窗口)再输入一次:netstat -n ,你将看到如下内容: 
  Active Connections 
  Proto   Local Address    Foreign Address    State 
  TCP   61.109.34.78:1200  61.154.155.109:61555  TIME_WAIT 
  TCP   61.109.34.78:2694  202.109.72.40:6667   ESTABLISHED 
  TCP   61.109.34.78:4869  202.104.121.291:23   ESTABLISHED 
  看出前后两次的区别了吗?对,就是在State列上字符发生了变化,由ESTABLISHED(建立)变为了TIME_WAIT。而前面61.154.155.109即是要找的IP地址。 
  为什么该地址就是我们们要找的IP呢?这是因为在“二人世界”时要传送消息,相互之间必然要产生连接(通过UDP协议),此时自然是“ESTABLISHED”了,而退出“二人世界”连接就断开了,自然就是“TIME_WAIT”了。使用这种方法,不需在电脑中安装软件,任意一台能上网的电脑上都能使用!

168 Responses to “关于netstat的简单介绍”

  • ray ban outlet说道:

    realm sad refuse realm sad refuse realm sad refuse realm sad refuse realm sad refuse realm sad pant burst inlet pant burst inlet pant burst inlet pant burst inlet/r/n disaster lame /r/n probability climb sticky ask climb

  • realm sad refuse realm sad refuse realm sad refuse realm sad refuse realm sad refuse realm sad pant burst inlet pant burst inlet pant burst inlet pant burst pant burst/r/n disaster lame /r/n worship climb sticky ask climb

  • manicure说道:

    Hi there! This is my first visit to your blog! We are a team of
    volunteers and starting a new project in a community in the same niche.
    Your blog provided us useful information to work on. You have done a
    extraordinary job!

  • Itamar Serpa说道:

    Ahaa, its fastidious dialogue concerning this piece of writing at this place at this webpage, I have read all that, so now me also commenting here.|

  • Hi there, yes this article is genuinely good and I have learned lot of things from it on the topic of blogging. thanks.|

  • continuously i used to read smaller articles that as well clear their motive, and that is also happening with this paragraph which I am reading at this time.|

  • If you wish for to improve your know-how only keep visiting this web site and be updated with the newest gossip posted here.|

  • Itamar Serpa说道:

    Heya i am for the first time here. I came across this board and I to find It truly useful & it helped me out much. I’m hoping to give one thing back and aid others such as you helped me.|

  • I enjoy, lead to I found just what I used to be looking for. You’ve ended my 4 day long hunt! God Bless you man. Have a nice day. Bye|

  • WOW just what I was looking for. Came here by searching for %meta_keyword%|

  • all the time i used to read smaller articles or reviews that as well clear their motive, and that is also happening with this post which I am reading now.|

  • This website was… how do I say it? Relevant!! Finally I’ve found something which helped me. Many thanks!|

  • Itamar Serp说道:

    Whats up are using WordPress for your site platform? I’m new to the blog world but I’m trying to get started and set up my own. Do you require any coding expertise to make your own blog? Any help would be really appreciated!|

  • Howdy I am so grateful I found your website, I really found you by accident, while I was browsing on Aol for something else, Regardless I am here now and would just like to say kudos for a tremendous post and a all round entertaining blog (I also love the theme/design), I don’t have time to browse it all at the moment but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read more, Please do keep up the excellent work.|

  • Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something enlightening to read?|

  • Hi it’s me, I am also visiting this web site regularly, this web page is actually nice and the users are in fact sharing nice thoughts.|

  • You are so cool! I do not think I’ve read through anything like that before. So great to discover someone with some unique thoughts on this issue. Seriously.. thanks for starting this up. This website is one thing that is required on the internet, someone with a bit of originality!|

  • Great article, just what I wanted to find.|

  • Itamar Serp说道:

    Right away I am going away to do my breakfast, afterward having my breakfast coming yet again to read other news.|

  • Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could be giving us something informative to read?|

  • Hi! Would you mind if I share your blog with my facebook group? There’s a lot of folks that I think would really appreciate your content. Please let me know. Many thanks|

  • This article will assist the internet visitors for building up new web site or even a blog from start to end.|

  • Wonderful post! We will be linking to this great post on our site. Keep up the great writing.|

  • I absolutely love your site.. Excellent colors & theme. Did you make this site yourself? Please reply back as I’m hoping to create my very own site and want to know where you got this from or just what the theme is named. Appreciate it!|

  • Grupo Coral说道:

    Hello everyone, it’s my first pay a quick visit at this web page, and paragraph is truly fruitful in support of me, keep up posting these types of content.|

  • What’s up, just wanted to mention, I loved this blog post. It was helpful. Keep on posting!|

  • Egli Diana Pinto说道:

    Hello, all is going nicely here and ofcourse every one is sharing data, that’s in fact good, keep up writing.|

  • I am extremely impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you modify it yourself? Anyway keep up the excellent quality writing, it is rare to see a nice blog like this one today.|

  • Umanizzare说道:

    An impressive share! I’ve just forwarded this onto a coworker who has been conducting a little research on this. And he in fact ordered me breakfast simply because I found it for him… lol. So let me reword this…. Thank YOU for the meal!! But yeah, thanks for spending the time to talk about this issue here on your blog.|

  • I was able to find good info from your articles.|

  • My spouse and I absolutely love your blog and find the majority of your post’s to be just what I’m looking for. can you offer guest writers to write content for you? I wouldn’t mind writing a post or elaborating on a few of the subjects you write concerning here. Again, awesome weblog!|

  • Itamar Serp说道:

    Hey! Do you know if they make any plugins to protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any suggestions?|

  • Magnificent beat ! I would like to apprentice while you amend your site, how can i subscribe for a blog site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear idea|

  • Simply want to say your article is as amazing. The clearness for your post is just nice and that i can suppose you are knowledgeable in this subject. Well together with your permission let me to grab your feed to keep up to date with drawing close post. Thank you one million and please continue the gratifying work.|

  • Umanizzare说道:

    I like it when folks come together and share opinions. Great site, keep it up!|

  • I do consider all the concepts you’ve presented to your post. They’re very convincing and will definitely work. Still, the posts are very short for novices. May just you please prolong them a bit from next time? Thanks for the post.|

  • Hello there! This article couldn’t be written much better! Reading through this post reminds me of my previous roommate! He continually kept talking about this. I most certainly will forward this post to him. Pretty sure he will have a very good read. Thank you for sharing!|

  • I am not sure where you are getting your information, but good topic. I needs to spend some time learning much more or understanding more. Thanks for wonderful information I was looking for this information for my mission.|

  • Hi there, just became aware of your blog through Google, and found that it is truly informative. I am gonna watch out for brussels. I’ll appreciate if you continue this in future. Lots of people will be benefited from your writing. Cheers!|

  • Hmm is anyone else encountering problems with the images on this blog loading? I’m trying to figure out if its a problem on my end or if it’s the blog. Any feed-back would be greatly appreciated.|

  • I read this paragraph completely on the topic of the difference of newest and previous technologies, it’s amazing article.|

  • Egli Diana Pinto说道:

    Thanks designed for sharing such a pleasant opinion, article is nice, thats why i have read it completely|

  • Itamar Serp说道:

    Heya i’m for the first time here. I found this board and I find It truly helpful & it helped me out a lot. I’m hoping to present something back and aid others like you helped me.|

  • Hello there, I found your site by means of Google at the same time as looking for a comparable matter, your site got here up, it looks good. I have bookmarked it in my google bookmarks.

  • Dadado Veig说道:

    Touche. Sound arguments. Keep up the great work.|

  • Itamar Serp说道:

    Keep on writing, great job!|

  • Every weekend i used to pay a visit this site, as i wish for enjoyment, for the reason that this this web site conations genuinely good funny stuff too.|

  • I don’t know if it’s just me or if everybody else encountering problems with your website. It appears as though some of the text on your posts are running off the screen. Can someone else please provide feedback and let me know if this is happening to them as well? This might be a issue with my browser because I’ve had this happen before. Thank you|

  • Dadado Veig说道:

    My partner and I stumbled over here by a different web page and thought I should check things out. I like what I see so now i’m following you. Look forward to exploring your web page for a second time.|

  • My spouse and I stumbled over here by a different website and thought I might as well check things out. I like what I see so i am just following you. Look forward to finding out about your web page yet again.|

  • Lelio Junior说道:

    It’s enormous that you are getting ideas from this piece of writing as well as from our argument made here.|

  • I was suggested this blog by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my problem. You are wonderful! Thanks!|

  • I will right away take hold of your rss feed as I can not to find your email subscription hyperlink or newsletter service. Do you have any? Please allow me recognize in order that I could subscribe. Thanks.|

  • hi!,I love your writing so much! share we communicate extra approximately your article on AOL? I need a specialist on this house to unravel my problem. Maybe that’s you! Taking a look ahead to look you. |

  • Lelio Junior说道:

    Every weekend i used to pay a quick visit this website, as i wish for enjoyment, for the reason that this this web page conations genuinely fastidious funny stuff too.|

  • This is my first time visit at here and i am genuinely happy to read everthing at one place.|

  • That is really interesting, You are a very professional blogger. I’ve joined your rss feed and look forward to in search of extra of your magnificent post. Additionally, I’ve shared your website in my social networks|

  • ip cameras说道:

    Hello There. I found your blog using msn. This is a really well written article.
    I’ll be sure to bookmark it and come back to read
    more of your useful information. Thanks for the post.
    I will definitely return.

  • Hi, i believe that i saw you visited my website so i came to go back the choose?.I’m trying to find things to enhance my web site!I assume its ok to use some of your ideas!!|

  • Egli Diana Pinto说道:

    Have you ever thought about writing an ebook or guest authoring on other sites?
    I have a blog centered on the same topics you discuss and
    would really like to have you share some stories/information.
    I know my visitors would value your work. If you are even remotely interested, feel free to send
    me an email.

  • Do you got sliding patio house at your residence?

  • sand asbestos说道:

    Hello this is kind of of off topic but I was wanting to know if blogs use WYSIWYG editors or if you
    have to manually code with HTML. I’m starting a blog soon but have no coding
    know-how so I wanted to get advice from
    someone with experience. Any help would be greatly appreciated!

  • Howdy! Someone in my Facebook group shared this site with
    us so I came to take a look. I’m definitely enjoying the information. I’m bookmarking and will be tweeting
    this to my followers! Excellent blog and outstanding style and design.

  • Do you need sliding porch entry of your house?

  • It’s going to be end of mine day, but before finish I am reading this enormous paragraph to improve my experience.

Leave a Reply