Jumat, 16 Desember 2011

PERANA NETSTAT

The Windows Netstat command Windows netstat perintah , Displays protocol statistics and current TCP/IP network connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Menampilkan statistik protocol dan TCP / IP koneksi jaringan, port pada komputer yang mendengarkan, statistik Ethernet, tabel routing IP, statistik IPv4 (untuk IP, ICMP, TCP, dan UDP protokol), dan statistik IPv6 (untuk IPv6 , ICMPv6, TCP ke IPv6, dan UDP di IPv6 protokol). Used without parameters, netstat displays active TCP connections. Digunakan tanpa parameter, netstat menampilkan koneksi TCP yang aktif.
netstat [-a] [-b] [-e] [-f] [-n] [-o] [-p proto] [-r] [-s] [-t] [interval] netstat [-a] [-b] [-e] [-f] [-n] [-o] [-p proto] [-r] [-s] [-t] [interval]
-a Displays all connections and listening ports. -A Menampilkan semua koneksi dan port mendengarkan.
-b Displays the executable involved in creating each connection or -B Menampilkan dieksekusi terlibat dalam membuat sambungan masing-masing atau
listening port. mendengarkan port. In some cases well-known executables host Dalam beberapa kasus terkenal executable tuan
multiple independent components, and in these cases the beberapa komponen independen, dan dalam kasus ini
sequence of components involved in creating the connection urutan komponen yang terlibat dalam menciptakan sambungan
or listening port is displayed. atau port mendengarkan ditampilkan. In this case the executable Dalam hal ini dieksekusi
name is in [] at the bottom, on top is the component it called, nama dalam [] di bagian bawah, di atas adalah komponen itu disebut,
and so forth until TCP/IP was reached. dan demikian seterusnya sampai TCP / IP tercapai. Note that this option Catatan bahwa opsi ini
can be time-consuming and will fail unless you have sufficient dapat memakan waktu dan akan gagal kecuali jika Anda memiliki cukup
permissions. perizinan.
-e Displays Ethernet statistics. -E Menampilkan statistik Ethernet. This may be combined with the -s Hal ini dapat dikombinasikan dengan-s
option. pilihan.
-f Displays Fully Qualified Domain Names (FQDN) for foreign -F Menampilkan Nama Fully Qualified Domain (FQDN) untuk asing
addresses. alamat.
-n Displays addresses and port numbers in numerical form. -N Menampilkan alamat dan nomor port dalam bentuk numerik.
-o Displays the owning process ID associated with each connection. -O Menampilkan memiliki proses ID yang berhubungan dengan koneksi masing-masing.
-p proto Shows connections for the protocol specified by proto; proto -P proto Menampilkan koneksi untuk protocol yang ditentukan dengan proto; proto
may be any of: TCP, UDP, TCPv6, or UDPv6. mungkin salah satu dari: TCP, UDP, TCPv6, atau UDPv6. If used with the -s Jika digunakan dengan-s
option to display per-protocol statistics, proto may be any of: opsi untuk menampilkan statistik per-protocol, proto dapat berupa salah satu dari:
IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6. IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, atau UDPv6.
-r Displays the routing table. -R Menampilkan tabel routing.
-s Displays per-protocol statistics. -S Menampilkan statistik per-protocol. By default, statistics are Secara default, statistik yang
shown for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6; ditampilkan untuk IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, dan UDPv6;
the -p option may be used to specify a subset of the default. opsi-p dapat digunakan untuk menentukan subset dari default.
-t Displays the current connection offload state. -T Menampilkan sambungan negara offload saat ini.
interval Redisplays selected statistics, pausing interval seconds interval Menampilkan kembali statistik dengan sejumlah detik interval
between each display. antar tampilan. Press CTRL+C to stop redisplaying Tekan CTRL + C untuk menghentikan redisplaying
statistics. statistik. If omitted, netstat will print the current Jika diabaikan, netstat akan mencetak saat ini
configuration information once. informasi konfigurasi sekali.
/? /? Displays help at the command prompt. Menampilkan bantuan pada command prompt.
Most of the above works the same in Linux or Unix, except that –p displays the process…much like the -b does in Windows. The switches can be combined or listed separately, ex. Sebagian besar di atas bekerja sama di Linux atau Unix, kecuali bahwa-p menampilkan proses ... seperti-b tidak dalam Windows switch dapat dikombinasikan atau dicantumkan secara terpisah, mantan.. "–an: is equivalent to "–a –n". "-An: adalah setara dengan"-a-n ".
Here are some examples. Berikut adalah beberapa contoh. Work through these with me. Bekerja melalui dengan saya. If you are on Windows 7, use an administrative cmd prompt or some of these will fail. Jika Anda berada di Windows 7, menggunakan cmd prompt administratif atau beberapa akan gagal.
Say you want to see all the open ports that are connected on your system. Katakanlah Anda ingin melihat semua port terbuka yang terhubung pada sistem Anda.

netstat [enter] netstat [masukkan]

From this simple command, we can tell that my computer's name is kaos, the ip.addr assigned to my system is 192.168.198.89, that I have several established connections, as well as some that were recently established but have since closed. Dari perintah sederhana, kita dapat mengatakan bahwa nama komputer saya adalah kaos, yang ip.addr ditugaskan untuk sistem saya adalah 192.168.198.89, bahwa saya telah beberapa koneksi didirikan, serta beberapa yang baru dibentuk tetapi sejak ditutup. Let's look at these a bit closer before we move on. Mari kita melihat ini sedikit lebih dekat sebelum kita melanjutkan.
The column headers define the protocol, the local ip.addr and port, the remote host and port, and the connection state. Header kolom mendefinisikan protokol, ip.addr lokal dan port, host remote dan port, dan status koneksi.
Look at the first few lines, starting with this one. Lihatlah beberapa baris pertama, dimulai dengan yang satu ini.
TCP 127.0.0.1:1025 kaos:5354 ESTABLISHED TCP 127.0.0.1:1025 kaos: 5354 ESTABLISHED
Basically, this says that I have a service listening on TCP port 1025, and that I am talking to myself from TCP port 5354. Pada dasarnya, ini mengatakan bahwa saya memiliki layanan mendengarkan pada port TCP 1025, dan bahwa aku berbicara pada diriku sendiri dari port TCP 5354. Yes, it's true, I talk to myself. Ya, itu benar, saya berbicara pada diriku sendiri. Sometimes when writing this blog, there is no other choice. Terkadang saat menulis blog ini, tidak ada pilihan lain. But what is this? Tapi apa ini? Windows opens dynamic ports starting at 1025, and makes any number of Local Procedure Calls (LPC) to itself for various services. Jendela membuka port dinamis mulai 1025, dan membuat sejumlah Procedure Calls Lokal (LPC) untuk dirinya sendiri untuk berbagai layanan. This particular one is for the AirPort Base agent, but we'll have to go a little further into this before you'll see how I figured that out. Satu ini adalah untuk agen Basis AirPort, tapi kita harus pergi sedikit lebih jauh ke dalam sebelum Anda akan melihat bagaimana aku tahu bahwa. The next several which reference a listening ip.addr of 127.0.0.1 and a source of kaos are all like that…just more conversations with myself. Para berikutnya beberapa referensi yang ip.addr mendengarkan dari 127.0.0.1 dan sumber kaos semua seperti itu ... percakapan hanya lebih dengan diriku sendiri.
The first line that shows a conversations with someone other than myself is this one. Baris pertama yang menunjukkan percakapan dengan orang lain selain diriku yang satu ini.
TCP 192.168.198.89:1164 www:https CLOSE_WAIT TCP 192.168.198.89:1164 www: https CLOSE_WAIT
This means that I had a conversation where the source ip.addr was mine (192.168.198.89) and the TCP source port was 1164, the destination hostname started with www, and the destination port was TCP 443 (https) but the conversation is over, and was closed down gracefully (CLOSE_WAIT.) Ini berarti bahwa saya memiliki pembicaraan di mana sumber ip.addr adalah milikku (192.168.198.89) dan port TCP sumber adalah 1164, tujuan host dimulai dengan www, dan port tujuan adalah TCP 443 (https) tapi percakapan berakhir , dan ditutup dengan anggun (CLOSE_WAIT.)
You see, netstat is more interested in connections than full details. Anda lihat, netstat lebih tertarik pada sambungan dari rincian lengkap. If I wanted to know the destination ip.addr, or the FQDN of whoever I was talking to, I would have had to use some switches to tell netstat I wanted to know more. Jika saya ingin tahu ip.addr tujuan, atau FQDN dari siapa aku bicara, aku akan harus menggunakan beberapa switch untuk memberitahu netstat aku ingin tahu lebih banyak. We also see in this line another state that a TCP connection can be in, CLOSE_WAIT. Kita juga melihat di baris ini lain menyatakan bahwa sebuah koneksi TCP dapat di, CLOSE_WAIT.
There are twelve for TCP connections, but most of then are transient in nature, so you will seldom see them. Ada dua belas untuk koneksi TCP, tetapi sebagian besar kemudian bersifat sementara di alam, sehingga Anda akan jarang melihat mereka. Since there are no states in raw mode and usually no states used in UDP, this column may be left blank. Karena tidak ada negara dalam modus baku dan biasanya tidak ada negara yang digunakan dalam UDP, kolom ini boleh dibiarkan kosong. Here is a list of them all: Berikut adalah daftar mereka semua:
ESTABLISHED ESTABLISHED
The socket has an established connection. Soket memiliki koneksi didirikan.
SYN_SENT SYN_SENT
The socket is actively attempting to establish a Soket adalah aktif berusaha untuk mendirikan sebuah
connection. koneksi.
SYN_RECV SYN_RECV
A connection request has been received from the Sebuah permintaan koneksi telah diterima dari
network. jaringan.
FIN_WAIT1 FIN_WAIT1
The socket is closed, and the connection is shutting Soket ditutup, dan sambungan menutup
down. bawah.
FIN_WAIT2 FIN_WAIT2
Connection is closed, and the socket is waiting for Koneksi ditutup, dan soket menunggu
a shutdown from the remote end. shutdown dari ujung jauh.
TIME_WAIT TIME_WAIT
The socket is waiting after close to handle packets Soket menunggu setelah dekat untuk menangani paket
still in the network. masih dalam jaringan.
CLOSE TUTUP
The socket is not being used. Socket tidak digunakan.
CLOSE_WAIT CLOSE_WAIT
The remote end has shut down, waiting for the socket Akhir remote telah menutup, menunggu soket
to close. untuk menutup.
LAST_ACK LAST_ACK
The remote end has shut down, and the socket is closed. Akhir remote telah menutup, dan soket ditutup.
Waiting for acknowledgement. Menunggu pengakuan.
LISTEN DENGARKAN
The socket is listening for incoming connections. Soket adalah mendengarkan untuk koneksi masuk.
CLOSING PENUTUP
Both sockets are shut down but we still don't have Kedua soket ditutup tapi kami masih tidak memiliki
all our data sent. semua data kami dikirim.
UNKNOWN UNKNOWN
Dude, wait, whut? Dude, menunggu, whut?
Suppose you want to see not just the active and recent TCP connections, but all the TCP ports that are listening. Misalkan Anda ingin melihat koneksi TCP tidak hanya aktif dan terakhir, tetapi semua port TCP yang mendengarkan.

netstat –ap tcp [enter] netstat-ap tcp [masukkan]
 
We use the – a to show all connections, and the – p to specify a protocol. Kami menggunakan - untuk menampilkan semua koneksi, dan - p untuk menentukan protokol. The switches –a and –p are combined as –ap , and then I specify TCP. Switch-a-dan p digabungkan sebagai-ap, dan kemudian saya tetapkan TCP. Since I am using Windows 7, I see that my computer is listening on RPC, CIFS, MSTSC, NetBIOS, and a bunch of others yet to be identified, and has an established connection to itself on a few ports (Windows talks to itself more than even I do) and also has an established connection to Zeus, which is my domain controller. Karena saya menggunakan Windows 7, saya melihat bahwa komputer saya adalah mendengarkan pada RPC, CIFS, MSTSC, NetBIOS, dan sekelompok orang lain belum diidentifikasi, dan memiliki koneksi yang didirikan pada dirinya sendiri pada beberapa port (Windows pembicaraan untuk dirinya lebih daripada saya lakukan) dan juga memiliki koneksi didirikan untuk Zeus, yang adalah kontroler domain saya. You could omit the –p to see all the UDP ports you're listening on, but that would make for a really long screenshot, and not add much to our example. Anda bisa menghilangkan-p untuk melihat semua port UDP Anda mendengarkan, tapi itu akan membuat untuk screenshot yang sangat panjang, dan tidak menambahkan banyak contoh kita. Want to see only the UDP, change your switch to – p udp to get that. Ingin melihat hanya UDP, mengubah switch Anda ke - p udp untuk mendapatkan itu.
Same thing, but this time, but you just want ip.addrs, not names. This will be very useful later… Hal yang sama, tapi kali ini, tapi Anda hanya ingin ip.addrs, bukan nama. Ini akan sangat berguna nantinya ...
netstat –anp tcp [enter] netstat-ANP tcp [masukkan]
The –n switch means to show only numeric addresses, not names. -N beralih berarti hanya menampilkan alamat numerik, bukan nama.
Wondering what the heck process has some of those ports open, and to where they are connecting? Bertanya-tanya apa sih proses memiliki beberapa port tersebut terbuka, dan ke mana mereka terhubung?

netstat –afbop tcp [enter] netstat-afbop tcp [masukkan] 


Here, we add the –f switch to show FQDNs, the –b switch to show the binary, and –o switch to show the PID of the owning process. Di sini, kami menambahkan opsi-f beralih untuk menunjukkan FQDNs, switch-b untuk menunjukkan biner, dan-o beralih untuk menunjukkan PID dari proses memiliki. You could have chosen to leave out either the b or o switches, but I like to see the binary so I get an idea of what the process is, and the PID in case I need to use Task Manager to kill it. Anda bisa memilih untuk meninggalkan baik switch b atau o, tapi saya ingin melihat biner jadi saya mendapatkan ide dari apa proses itu, dan PID dalam kasus saya perlu menggunakan Task Manager untuk membunuhnya.
Want to see some error stats? Ingin melihat beberapa statistik kesalahan? Try these… Coba ini ...

netstat –s –p tcp | more [enter] netstat-s-p tcp | more [masukkan] 


621 fails and 5799 resets aren't great stats. 621 5799 gagal dan tidak me-reset statistik besar. Since I know I've been running a port scanner from this machine, I'm not worried, but if you don't have a reasonable explanation for a high count, you need to look deeper at your network. Karena aku tahu aku sudah berjalan scanner port dari mesin ini, aku tidak khawatir, tapi jika Anda tidak memiliki penjelasan yang masuk akal untuk hitungan tinggi, Anda perlu melihat lebih dalam pada jaringan Anda. The " | more " is just to keep the output from scrolling off the screen, since after the statistics, it will list all of the TCP connections. Para "| lebih" hanya untuk menjaga output dari bergulir dari layar, karena setelah statistik, maka akan daftar semua koneksi TCP. You can do the same thing with UDP. Anda dapat melakukan hal yang sama dengan UDP.
netstat –s –p udp [enter] netstat-s-p udp [masukkan]

And finally, for ICMP. Dan akhirnya, untuk ICMP.


Switching gears, here is how to check your routing table with a little more flair than route print . Switching gigi, di sini adalah bagaimana untuk memeriksa tabel routing dengan bakat sedikit lebih dari cetak rute.

netstat -r [enter] netstat-r [masukkan] 


Notice that we have a routing table for both IPv4 and IPv6. Perhatikan bahwa kita memiliki tabel routing untuk IPv4 dan IPv6. And do you see that line about persistent connections? Dan apakah Anda melihat bahwa garis tentang koneksi persisten? That means someone added an IPv4 route that will survive a reboot, probably by using the route add command. Itu berarti seseorang menambahkan rute IPv4 yang akan bertahan reboot, mungkin dengan menggunakan rute menambahkan perintah.
How's your error count and congestion looking, and do you have anything like IPX still on your LAN? Bagaimana menghitung kesalahan Anda dan kemacetan mencari, dan apakah Anda memiliki sesuatu seperti IPX masih pada LAN Anda?

netstat -e [enter] netstat-e [masukkan] 


This shows us bytes and packets in and out, and if there were any discards, errors or unknown protocols. Ini menunjukkan kita byte dan paket masuk dan keluar, dan jika ada membuang, kesalahan atau protokol yang tidak diketahui.
•    Unicast packets are exactly what they sound like…packets sent directly to your machine, or sent by your machine to a specific host. Paket Unicast adalah persis apa yang mereka terdengar seperti ... paket yang dikirim langsung ke mesin Anda, atau dikirim dengan mesin Anda ke host tertentu.
•    Non-unicast packets are broadcasts and multicasts. Non-unicast paket siaran dan multicast.
•    Discards should never show any…if they do, it means the network is so busy your computer cannot keep up with the incoming traffic and is dumping frames, or the network is so busy that it cannot transmit frames on the wire and is timing them out. Membuang pernah harus menunjukkan ... jika mereka melakukannya, itu berarti jaringan begitu sibuk komputer Anda tidak dapat bersaing dengan lalu lintas masuk dan pembuangan frame, atau jaringan begitu sibuk sehingga tidak dapat mengirimkan frame pada kawat dan waktu mereka keluar .
•    An occasional error is nothing for concern, especially if you are on a wireless network, but keep an eye on it. Sebuah kesalahan sesekali ada yang perhatian, terutama jika Anda berada di jaringan nirkabel, tetapi mengawasi di atasnya. A double-digit number in under a day, or a rapidly climbing number, is a sure sign that there are problems at the physical layer. Sejumlah dua digit di bawah hari, atau nomor cepat memanjat, merupakan tanda pasti bahwa ada masalah pada layer fisik. That could be interference, a bad Ethernet cable, a faulty switch port, or something along those lines. Itu bisa menjadi gangguan, kabel Ethernet yang buruk, port switch yang rusak, atau sesuatu sepanjang garis. The key here is that they are physical layer….don't go looking at routing, or other VLANs…this problem is local. Kuncinya di sini adalah bahwa mereka lapisan fisik ... jangan melihat routing, atau VLAN lainnya .... Masalah ini adalah lokal.
•    Unknown protocols indicates that there is a protocol suite on the wire that you computer doesn't understand. Protokol yang tidak diketahui menunjukkan bahwa ada suite protokol pada kawat yang Anda tidak mengerti komputer. This is common if you still have some HP JetDirect cards SAP'ing IPX on the wire, but is otherwise harmless. Hal ini biasa terjadi jika Anda masih memiliki beberapa kartu HP JetDirect SAP'ing IPX pada kawat, tetapi sebaliknya tidak berbahaya.

Tidak ada komentar:

Posting Komentar

ads