Pages

Sunday, December 2, 2012

beberapa perintah cmd untuk jaringan

Beberapa perintah yang akan dibahas antara lain adalah ping, tracert, nslookup dan telnet.
  • Ping
Ping berguna untuk melakukan pengetesan koneksi kearah IP tujuan dengan mengirimkan paket-paket data. Ping ini menggunakan protokol ICMP (Internet Control Message Protocol), dan pada OSI berada dilayer 3 (Datalink Layer). Perintah pada ping dapat dilihat dibawah ini.
pertama : perintah dasar, hanya ping saja. command : ping [spasi] alamat tujuan (dalam hal ini ping ke IP Address)
C:\documents and settings\saptadihandoko>cd\
C:\>ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
contoh kedua : perintah dasar, hanya ping saja. command : ping [spasi] alamat tujuan (dalam hal ini ping ke website)
C:\>ping www.yahoo.com
Pinging www-real.wa1.b.yahoo.com [209.131.36.158] with 32 bytes of data:

Reply from 209.131.36.158: bytes=32 time=201ms TTL=51
Reply from 209.131.36.158: bytes=32 time=198ms TTL=51
Reply from 209.131.36.158: bytes=32 time=202ms TTL=51
Reply from 209.131.36.158: bytes=32 time=204ms TTL=51

Ping statistics for 209.131.36.158:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 198ms, Maximum = 204ms, Average = 201ms
contoh ketiga : ping dengan diakhiri “-t”. command : ping [spasi] alamat tujuan [spasi] -t. bertujuan untuk melakukan pengetesan koneksi secara terus menerus. Apabila ingin diakhiri tekan ctrl+C.
C:\>ping 127.0.0.1 -t
Pinging 127.0.0.1 with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
contoh keempat : ping diakhiri dengan “-l”. command : ping [spasi] alamat tujuan [spasi] -l [spasi] ukuran byte. Bertujuan untuk melakukan koneksi ke alamat tujuan dengan mengganti jumlah paket data yg dikirimkan. paket bisa diubah antara 0-65500 byte. perubahannya biasa terjadi pada time hasil ping.
C:\>ping www.yahoo.com -l 1024
Pinging www-real.wa1.b.yahoo.com [209.131.36.158] with 1024 bytes of data:

Reply from 209.131.36.158: bytes=1024 time=295ms TTL=51
Reply from 209.131.36.158: bytes=1024 time=202ms TTL=51
Reply from 209.131.36.158: bytes=1024 time=201ms TTL=51
Reply from 209.131.36.158: bytes=1024 time=230ms TTL=51

Ping statistics for 209.131.36.158:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 201ms, Maximum = 295ms, Average = 232ms

contoh kelima : ping diakhiri dengan “-n”. Bertujuan untuk melakukan pengetesan koneksi ke alamat tujuan sebanyak yang kita ketikkan, berbeda dengan akhiran “-t” yang tidak terbatas.
C:\>ping www.yahoo.com -n 7
Pinging www-real.wa1.b.yahoo.com [209.131.36.158] with 32 bytes of data:

Reply from 209.131.36.158: bytes=32 time=198ms TTL=51
Reply from 209.131.36.158: bytes=32 time=198ms TTL=51
Reply from 209.131.36.158: bytes=32 time=198ms TTL=51
Reply from 209.131.36.158: bytes=32 time=198ms TTL=51
Reply from 209.131.36.158: bytes=32 time=199ms TTL=51
Reply from 209.131.36.158: bytes=32 time=201ms TTL=51
Reply from 209.131.36.158: bytes=32 time=198ms TTL=51

Ping statistics for 209.131.36.158:
Packets: Sent = 7, Received = 7, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 198ms, Maximum = 201ms, Average = 198ms
  • Tracert
Tracert atau pada linux disebut trace route berguna untuk melihat routingan jaringan kita. dari hasil tracert bisa dilihat dari PC kita ke alamat tujuan melewati mana saja. Hasil tracert bisa dilihat dari hasil dibawah ini.
C:\>tracert www.yahoo.com

Tracing route to www-real.wa1.b.yahoo.com [209.131.36.158]
over a maximum of 30 hops:

1 1 ms 1 ms 1 ms 172.17.18.254
2 2 ms 1 ms 1 ms 210-79-216-1.triplegate.net.id [210.79.216.1]
3 2 ms 2 ms 2 ms ip-226-194.csmnap.net [202.123.226.194]
4 14 ms 14 ms 14 ms hssi3-0-singapore-core-router.csmnap.net [202.12
3.226.2]
5 197 ms 197 ms 199 ms gi10-0-407.gw2.sin1.asianetcom.net [202.147.33.1
85]
6 197 ms 197 ms 198 ms gi9-3.gw2.sin1.asianetcom.net [202.147.48.105]
7 200 ms 197 ms 199 ms po15-0-1.cr1.nrt1.asianetcom.net [202.147.32.90]

8 200 ms 198 ms 199 ms po7-0-0.gw1.sjc1.asianetcom.net [202.147.0.34]
9 199 ms 201 ms 198 ms PAT2.SJC.yahoo.com [206.223.116.16]
10 199 ms 199 ms 198 ms ae1-p161.msr1.sp1.yahoo.com [216.115.107.63]
11 198 ms 198 ms 203 ms te-9-1.bas-a1.sp1.yahoo.com [209.131.32.21]
12 199 ms 198 ms 200 ms f1.www.vip.sp1.yahoo.com [209.131.36.158]
Trace complete.
  • Nslookup
Nslookup adalah singkatan dari Name Server lookup. kegunaannya untuk mengetahui berbagai macam hal teknis mengenai domain. Nslookup sendiri bisa divariasikan cara penggunaannya. contohnya adalah sebagai berikut :
pertama : nslookup [spasi] nama domain. berguna untuk mengetahui nama domain dan nama alias pada domain.

C:\>nslookup www.yahoo.com
Server: ns1.csmnap.net
Address: 202.123.224.21

Non-authoritative answer:
Name: www-real.wa1.b.yahoo.com
Address: 209.131.36.158
Aliases: www.yahoo.com, www.wa1.b.yahoo.com
kedua : nslookup dengan set type=all. bertujuan untuk melihat name server pada suatu domain.

C:\>nslookup
Default Server: ns1.csmnap.net
Address: 202.123.224.21

> set type=all
> www.yahoo.com
Server: ns1.csmnap.net
Address: 202.123.224.21

Non-authoritative answer:
www.yahoo.com canonical name = www.wa1.b.yahoo.com

yahoo.com nameserver = ns8.yahoo.com
yahoo.com nameserver = ns6.yahoo.com
yahoo.com nameserver = ns3.yahoo.com
yahoo.com nameserver = ns1.yahoo.com
yahoo.com nameserver = ns4.yahoo.com
yahoo.com nameserver = ns5.yahoo.com
yahoo.com nameserver = ns2.yahoo.com
ns1.yahoo.com internet address = 68.180.131.16
ns2.yahoo.com internet address = 68.142.255.16
ns3.yahoo.com internet address = 121.101.152.99
ns4.yahoo.com internet address = 68.142.196.63
ns5.yahoo.com internet address = 119.160.247.124
ns6.yahoo.com internet address = 202.43.223.170
ns8.yahoo.com internet address = 202.165.104.22
ketiga : nslookup dengan set type=mx. Bertujuan untuk mengetahui Mail eXchangernya.

C:\>nslookup
Default Server: ns1.csmnap.net
Address: 202.123.224.21

> set type=mx
> yahoo.com
Server: ns1.csmnap.net
Address: 202.123.224.21

Non-authoritative answer:
yahoo.com MX preference = 1, mail exchanger = c.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = e.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = f.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = g.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = a.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = b.mx.mail.yahoo.com

yahoo.com nameserver = ns2.yahoo.com
yahoo.com nameserver = ns5.yahoo.com
yahoo.com nameserver = ns1.yahoo.com
yahoo.com nameserver = ns6.yahoo.com
yahoo.com nameserver = ns4.yahoo.com
yahoo.com nameserver = ns3.yahoo.com
yahoo.com nameserver = ns8.yahoo.com
c.mx.mail.yahoo.com internet address = 68.142.202.247
c.mx.mail.yahoo.com internet address = 209.191.88.247
c.mx.mail.yahoo.com internet address = 216.39.53.2
c.mx.mail.yahoo.com internet address = 216.39.53.3
g.mx.mail.yahoo.com internet address = 98.137.54.238
ns1.yahoo.com internet address = 68.180.131.16
ns2.yahoo.com internet address = 68.142.255.16
ns3.yahoo.com internet address = 121.101.152.99
ns4.yahoo.com internet address = 68.142.196.63
ns5.yahoo.com internet address = 119.160.247.124
ns6.yahoo.com internet address = 202.43.223.170
ns8.yahoo.com internet address = 202.165.104.22
keempat : nslookup dengan set type=soa. Bertujuan untuk mengetahui Start Of Authority nya.

C:\>nslookup
Default Server: ns1.csmnap.net
Address: 202.123.224.21

> set type=soa
> www.yahoo.com
Server: ns1.csmnap.net
Address: 202.123.224.21

Non-authoritative answer:
www.yahoo.com canonical name = www.wa1.b.yahoo.com
www.wa1.b.yahoo.com canonical name = www-real.wa1.b.yahoo.com

wa1.b.yahoo.com
primary name server = yf1.yahoo.com
responsible mail addr = hostmaster.yahoo-inc.com
serial = 1257137006
refresh = 30 (30 secs)
retry = 30 (30 secs)
expire = 86400 (1 day)
default TTL = 1800 (30 mins)
  • Telnet

Berguna untuk masuk ke alamat yg dituju. Biasanya digunakan oleh para hacker untuk masuk ke alamat sasaran. Tapi perintah ini banyak juga kegunaan disisi positifnya. Antara lain untuk memantau jaringan disaat kita sedang tidak berada ditempat.