Tentang Wireshark dan Pemakaiannya
Juli 9, 2009 at 10:53 am | In Wireshark Experience | 2 CommentsTags: jaringan lambat, tutorial, wireshark
Wireshark merupakan sebuah software sniffer freeware yang dapat didownload dengan mudah di www.wireshark.org. Walaupun termasuk kategori software gratis, software yang sebelumnya dinamakan Ethereal memiliki banyak fitur powerful yang tidak kalah dengan software sejenis. Program sniffer adalah program yang dapat digunakan apabila kita ingin ‘mengintip/mengendus/sniff’ sebuah jaringan, baik Ethernet maupun non-ethernet. Hanya saja, sehari-hari rasanya kita lebih sering berkutat dengan jaringan Ethernet.
Mengapa kita perlu ‘mengintip/mengendus’ jaringan ? Salah satu alasan kuat yang sering ditemui oleh penulis adalah “paket tidak pernah berbohong”. Yang dimaksud di sini, pada saat customer mengatakan bahwa jaringan nya pelan, atau jaringan nya tidak responsive, atau jaringan nya kadang cepat kadang tidak bisa connect, dsb., maka cara paling mudah adalah ‘mengendus’ jaringan dengan langsung melihat isi-isi paket yang lewat di jaringan tersebut. Pernah ada satu kasus yang penulis temukan, pada saat customer mengeluh network nya bermasalah (dan mereka langsung menyalahkan switchnya), setelah paket diintip, kejadian sebenarnya adalah, ada satu mesin gateway, yang apabila mesin tersebut mendengar adanya paket request, maka mesin tersebut selalu menjawab untuk drop paket tersebut, sehingga jaringan seolah-olah tidak connect. Dari sini bisa kita pelajari, bahwa jaringan yang tidak lancar, bisa disebabkan oleh banyak sekali faktor yang harus diselidiki lebih lanjut.
Dahulu kala, semasa jaringan masih menggunakan hub, para pemakai jaringan amat mudah ‘mengintip’ isi percakapan dari para pemakai jaringan lainnya, karena teknologi hub memang masih bersifat shared. Shared yang dimaksud di sini adalah, walaupun komputer A hanya berbicara dengan komputer B, percakapan mereka dapat didengar oleh komputer C yang dicolokkan ke hub yang sama dengan A dan B. Masih teringat jelas saat bekerja di sebuah perusahaan yang memakai hub, dan di pagi hari penulis dapat meng-crack semua user password pada saat login ke NT Domain(yang memang tidak secure, atau bisa dicrack dengan dictionary attack) memakai software l0pthcrack.
Untunglah, dengan adanya switch, hal tersebut di atas tidak mungkin terjadi ( walaupun masih mungkin dilakukan dengan teknik-teknik seperti ARP poisoning dsb. ), karena teknologi switch membuat jalur virtual untuk komunikasi antar pemakainya. Lalu, apabila memang ingin meng-sniff jaringan di lingkungan switch, bagaimana caranya ?
Salah satu cara yang bisa dilakukan adalah melakukan proses port mirroring dari switch tersebut ke salah satu port di mana kita memasang software sniffer kita. Cuma saja, biasanya hanya product switch yang manage-able yang bisa melakukan hal ini. Jika switch kita memakai unmanaged, maka prosesnya akan lebih rumit J

Gambar di atas dapat dijadikan contoh kebanyakan jaringan yang ada, di mana biasanya network administrator menginginkan memonitor koneksi jaringan ke Internet. Maka yang dilakukan adalah melakukan ‘port mirroring’ pada link yang merah, dengan target mirror port adalah port tempat di mana wireshark dipasang. Tetapi, tentu saja untuk melakukan hal tersebut, network administrator harus mengkonfigurasi switch. ( Hampir sebagian besar switch yang ada di Allied Telesis, tempat penulis bekerja sudah mendukung port mirroring )
Bagaimana apabila tidak bisa mengotak-atik switch, atau switch tidak mendukung mirroring ? Salah satu jalan keluarnya adalah memasang hub. Memang sayangnya, tidak mudah mendapatkan hub di saat-saat sekarang, karena di pasaran kebanyakan sudah tidak diproduksi lagi. Kelemahan lain dari penggunaan hub adalah jenis koneksi nya half duplex, bukan full duplex seperti pada switch.

Ada juga solusi lain, seperti menggunakan network tap. Hanya saja, tidak banyak perusahaan yang mau membeli network tap untuk keperluan monitoring sesaat.
Wireshark dapat diinstall di berbagai operating system, seperti Windows (32 bit atau 64 bit), OS X , Ubuntu,dsb. Penulis sendiri banyak memakai Wireshark pada Windows, dan pada saat proses instalasi, juga akan diinstal aplikasi WinPCap, yang merupakan driver-driver khusus yang akan dipakai pada Wireshark. Apabila kita tidak menginstall WinPCap, maka Wireshark tidak akan bisa berfungsi untuk capture packet melalui jaringan.
Bagaimana cara mengoperasikan wireshark ? Menangkap paket-paketnya, dsb. ? Tunggu di artikel-artikel berikutnya.
Tips Mengukur throughput link jaringan menggunakan IPERF
Juli 8, 2009 at 10:43 am | In Tutorial Jaringan | Leave a CommentTags: iperf, kecepatan jaringan, mengukur kecepatan, throughput
Pada saat kita selesai menginstall sebuah jaringan, tahap berikutnya adalah melakukan testing and commissioning terhadap jaringan yang dipasang. Apa saja yang terdapat pada testing and commissioning ? Selama ini tidak ada standardisasi terhadap hal ini, namun secara umum, yang harus dilaporkan di sisi jaringan adalah uji konektivitas dan uji throughput. Apabila jaringan yang terpasang memiliki komponen sekuriti seperti firewall, IDS, dsb, tentu saja harus ada lagi item-item yang harus diujicoba.
Artikel kali ini membahas sebuah utility tools freeware untuk menguji throughput, yaitu iperf, yang dapat di download dari http://dast.nlanr.net/Projects/Iperf/. Selain utility Iperf, ada juga utility canggih lainnya seperti NetIQ Chariot yang bisa melakukan simulasi paket yang akan lewat pada jaringan. Hanya saja, sepengetahuan penulis utility ini tidak gratis.
IPERF juga sering penulis gunakan untuk melakukan pengujian terhadap setting/script untuk konfigurasi quality of service switching/router.
Untuk mengukur link throughput dari sebuah jaringan, diperlukan dua buah titik(computer) di jaringan, di mana satu titik akan berfungsi sebagai server, dan titik yang lain berfungsi sebagai client. Pemilihan lokasi computer yang dipakai juga berpengaruh. Misalkan, pada jaringan yang akan diukur terdapat 4(empat) buah switch yang berjejer, maka uji throughput dapat dilakukan dari berbagai titik.
Contoh, untuk mengukur link throughput antara Switch A dan B, dapat memanfaatkan 2(dua) buah computer yaitu x1 dan x2. Untuk mengukur throughput dari Switch A ke Switch D, dapat memakai computer x1 dan x4.
Sebelum menguji throughput, pastikan dulu kedua buah computer dapat berhubungan satu sama lain (setting IP address sudah benar, firewall tidak dalam kondisi menyala, dsb ). Cara termudahnya tentu saja dengan saling meng-ping dari computer ke computer yang akan diujicoba.
Menjalankan iperf dengan mode server
Untuk menjalankan iperf dengan mode server, cukup mengetik iperf –s dari command prompt window, Dan akan tampil sbb. :
C:\Utility>iperf -s
————————————————————
Server listening on TCP port 5001
TCP window size: 8.00 KByte (default)
————————————————————
Setelah itu, computer sudah siap ‘mendengarkan’ paket pada port 5001, yang merupakan port default. Port ini dapat diganti apabila diinginkan dengan parameter “-p“. Penggantian parameter diperlukan apabila satu server akan diakses beramai-ramai oleh banyak client.
Menjalankan iperf dengan mode client
Iperf dengan mode client dapat diaktifkan dengan parameter –c, diikuti dengan ip address dari server. Contoh sederhana di bawah ini :
C:\Temp>iperf -c 10.20.80.200
————————————————————
Client connecting to 10.20.80.200, TCP port 5001
TCP window size: 8.0 KByte (default)
————————————————————
[928] local 10.20.80.2 port 1170 connected with 10.20.80.200 port 5001
[ ID] Interval Transfer Bandwidth
[928] 0.0-30.7 sec 1.1 MBytes 285 Kbits/sec
Hasil throughput dapat dilihat dari kolom Bandwidth, pada contoh di atas, bandwidth terukur adalah 285 Kbits/sec. Untuk pengukuran dengan Fast Ethernet, angka nya seringkali mencapai kisaran angka 88Mbps. Sedangkan untuk pengukuran dengan Gigabit Ethernet, apabila dilakukan dengan benar ( patch cord UTP Cat 6 digunakan pada 2 komputer ), bisa mencapai kisaran angka 700 Mbps.
Di sisi client maupun server, banyak sekali parameter-parameter yang bisa diubah untuk disesuaikan dengan kebutuhan kita. Contohnya, pada default parameter time, uji coba iperf hanya dijalankan untuk 10 detik saja. Kita bisa mengubahnya dengan parameter “-t seconds”.
Seluruh parameter lengkap dapat didapat dengan perintah “iperf –help”.
Memakai Iperf mode server dengan multiple port
Default port dari aplikasi iperf adalah menggunakan TCP Port 5001. Namun angka ini bisa diubah dengan parameter –p, sebagai contoh “iperf –s –p 5002″ akan mengubah TCP port ke 5002. Mengapa perlu diubah? Pengubahan terkadang perlu dilakukan, apabila ternyata ada ’sesuatu’ di tengah jaringan yang memblock port 5001 ( sesuatu = firewall, router,dsb ). Atau, bisa juga kita mengubah port karena 1 TCP port hanya bisa diakses oleh 1 client saja.
Seringkali penulis membuka lebih dari 1 iperf sebagai server karena alas an-alasan pengujian tertentu. Misalkan, satu PC akan ditest sebagai server terhadap 5 client. Maka, di satu PC server tersebut akan dibuka 5 iperf dengan 5 tcp port yang berbeda-beda.
Tips untuk mengukur throughput dengan banyak switch
Apabila link antara switch A dan Switch B memiliki kecepatan yang amat sangat tinggi, misalkan 1 Gigabit, maka tentu saja diperlukan beberapa PC untuk bisa mendapatkan hasil yang akurat. Kenapa demikian ? Biasanya throughput dari Gigabit Ethernet PC ‘hanya’ mencapai angka 600-700Mbps saja, sehingga untuk menguji kecepatan 1 Giga, dibutuhkan minimal 4(empat) buah PC dengan network card gigabit, dengan asumsi per PC bisa menghasilkan minimal 600Mbpsx4=2.4 Gigabit, di mana 2.4 Gigabit sudah melebihi 1 Gigabit. Dua dari PC (x1 dan x2) tersebut dipasang pada switch A dan dua yang lainnya (x3 dan x4) pada switch B. Contoh pada gambar berikut :
Setelah itu jalankan aplikasi iperf dengan mode server pada x1 dan x2, dan secara bersamaan (detik yang sama), jalankan iperf dengan mode client pada x3 dan x4. Iperf pada computer x3 diarahkan pada computer x1 sedangkan iperf pada computer x4 diarahkan pada computer x2. Throughput dari switch A ke B merupakan ‘jumlah’ dari throughput x3->x1 dan x4->x2.
Broadcast storm control – a network saviour for looping
Juli 8, 2009 at 10:40 am | In Tutorial Jaringan | Leave a CommentTags: broadcast, broadcast storm control, managed switch, prevent loop, storm control
How big… or how small is your network ? The bigger network you have, or the more switches you have in your network, you really must understand that a Layer 2 network is very easily attacked by looping the network.
Please take note the terminology “LAYER 2″… it means no router, no routing, no VLAN routing. So it’s just plain switching. Looping will not happen if you use a layer 3 technology.
How to loop the network ? It is very easy thing to do. Just use a UTP cable, plug it in one of the port, and plug the other end in the other port, of course in the same switch. Thanks to auto-MDI/X feature, so these ports are connected. And voila… you loop the network.
Of course, you will not do that in your LAN. But who knows ? If you are just running a LAN, it might be OK. But how if the L2 is spanned in the entire building, and some users from other department are just buying their own switches because they don’t want to be managed by the IT ? This kind of looping classic problem will always exists everywhere in every LAN.
How to overcome this situation ?
Well, one of the old technique was to disable ports those are not used in the switches. This might greatly help, but of course we never knew if someone is using the ‘already ON’ port and make the loop, right ?
Another popular technique in Layer 2 to prevent this loop is RSTP/STP(Spanning Tree Protocol). But as what I have experienced, implementing RSTP creates another headache such as, we must define where are the edge-ports so that the ports will automatically forwarding the packets. Another headache is we have to make sure the root switch is the ‘real’ root switch, which must be protected by BPDU guard, etc. It is not always bulletproof as well. Let’s say you have one switch A with RSTP activated, connecting to a switch B without RSTP activated, and you do the loop in the switch B, both switches will be down in few seconds.. AFTER there is packet broadcasting ( something like pinging to unknown IP address will create ARP broadcast, and a very good tool to create the loop ).
Luckily, there is one interesting feature that can be found in most of the advanced managed switches these days. The terminology “broadcast/multicast storm control” feature is a thing that I really like. What does this feature do ? Well, if we loop a network, it means where there is a broadcast packet generated by a computer, it will be broadcasted in these looped ports, and it will keep broadcasted until the whole switch is down. By utilising this broadcast storm control feature, we can limit all ’suspicious’ ports, or could be the whole ports inside a switch (it’s up to you
), with a specific number.
Some switches are using Kilobits/sec parameter, other model might use Packet/second, some I found also use percentage level (such as 50%). In some models, broadcast storm control are applied per VLAN, but majority right now this feature is implemented port by port levels.
What is the right number to fill in the parameter ? This is a difficult thing to answer. The best way to ‘predict’ this is by making a baseline of broadcast packet in your network. For example, you can use MRTG (or other similar product that can do snmp get for broadcast packet parameter), and observe what is the broadcast packet per second in a normal/peak time. After you get a number, let’s say you get broadcast packet for 100Kbps, then you can assume the maximum is twice of 100kbps, which is 200Kbps. This 100kbps number is just assumption. In one of my client, I just fill in something like 10Mbps, which is very unlikely to happen there is a broadcast with that amount.
Please take more attention when you are doing wireless LAN inside your network, and it is in the same VLAN(subnet) . Although 5Mbps of broadcast is relatively small for 100Mbps network, this 5mbps of broadcast will hammer your wireless easily. So, it might be safer if you can move your wireless implementation in other subnet (other broadcast domains). If you can’t move it, other way to do this is by implementing Quality of Service on the ports going to the wireless. For example, putting broadcast maximum to 1Mbps specifically to those ports.
How to test ? Of course… by looping it… If you are configuring it correctly, the loop might be there, but the ports might be disabled/locked, or perhaps some switches can be set to send SNMP trap to NMS, etc.
I know some switches don’t provide such feature. In this case, the only thing we can do is to do the broadcast storm control in the uplink side. But of course, looping might happen and kill that switch. It is still OK as long as it doesn’t impact on your uplink where you have bigger network, don’t you think ?
Understanding How Windows XP ‘Finds’ Other Windows XP using Wireshark
Juli 8, 2009 at 10:36 am | In Wireshark Experience | Leave a CommentTags: belajar packet, name resolution, tutorial wireshark, windows xp, wireshark
Most of us are Windows XP fans, and almost every day we communicate to other computer doing file sharing, printer sharing, etc. Of course, it works easily without knowing what are happening behind this. And some of us are just enough with this. But to be honest, if we know how it works behind the scene, it will give us a very good understanding on the ‘packet level’ in how it works. Especially, if we are planning to migrate our network from L2 to VLAN L3 routing.
Before I wrote this article, I turned on my Wireshark, and just easily did a ‘Start > Run’ and then typed \\serverkoe, where serverkoe is basically my server sitting on the LAN and in the same subnet with me. Hopefully this small packet walkthrough will add small knowledge for you.

In this packet capture, my PC is 10.20.80.241 and SERVERKOE is 10.20.80.4, both in subnet 255.255.255.0.
The first packet shown above is my PC, issuing an “NetBios Name Service Query” to 10.20.80.255 (which is my broadcast address), asking the whole network about ‘who is SERVERKOE’ ?
The second packet, is also from my PC, asking to my DNS Server ( I removed the IP address ), with also the same question, but this time adding my domain. So in human language : “Hey My DNS, do you know what is the IP address of serverkoe.xxx.xxx ?”
The third packet, is coming from the ’serverkoe’ side. SERVERKOE is asking back to the network, using ARP, who is 10.20.80.241. Until this third packet, basically my PC and SERVERKOE doesn’t know each other.
The fourth packet, my PC is responding to the third packet, where my PC is replying the ARP request, answering “Hey host 10.20.80.4, I am 10.20.80.241 with mac address of 00:1c:bf:6c:28:9a”. And after SERVERKOE understand who is 10.20.80.241, SERVERKOE is answering the “Netbios Name Query” with the packet in packet number 5 :

All above packets are UDP based packet.
The next packet will be the communication starting point between my PC and SERVERKOE. And as usual, my PC is using the TCP handshaking which is SYN, SYN+ACK and ACK. The rest packet is just showing us on the SMB(Server Message Block) process, which are outside the scope of this article.

If we look at packet 15 to 17, these are the reply from my DNS server, who is saying that my DNS server doesn’t know who is SERVERKOE.
The interesting thing that I was not aware before that my PC is also giving one ICMP ping to SERVERKOE, in packet 20 and packet 21.
In this case, where my PC and SERVERKOE is sitting in the same LAN, the successful method of my pc to search SERVERKOE ( name resolution process ) is using broadcast, which is the first packet, and answered in the 5th packet. But, we must remember, if we are in a routing environment, all broadcast packet are dropped. So, we must use other method so that this name resolution process is successful. We can do it via WINS service(old method prior to Windows 2k) or DNS Service, which is the most popular method nowadays.
So, that’s it…..
Blog pada WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.