13 Networking Command Line Di Gnu/Linux

Sudahkah teman mingrasi ke GNU/Linux ? bila sudah, untuk keperluan apa teman memakai distro linux ? bila teman memakai distro linux untuk keperluan networking berarti kita sama, di linux ada berbagai tools diagnostic untuk keperluan konfigurasi dan troubleshooting jaringan yang dapat kita pakai, sebagian dari tools itu ada yang sudah terinstall otomatis dikala menginstall distro linux, ada juga yang harus di install manual.
Tapi meskipun harus di install manual teman gak perlu kuatir sebab tool-tool tersebut biasanya sudah tersedia di repository jadi tinggal di install saja, gak usah panjang lebar yukh kita simak tool-tool networking berbasis command line di GNU/Linux yang dapat teman pelajari.

 untuk keperluan apa teman memakai distro linux  13 Networking Command Line di GNU/Linux

13 Networking command line di GNU/Linux

Di artikel ini aku akan share fungsi dan penggunaan tools diagnostic jaringan berbasis command line interface yang dapat teman pakai untuk keperluan konfigurasi dan troubleshooting permasalahan yang muncul di jaringan. 


1. Perintah IFCONFIG

ifconfig yaitu perintah yang digunakan untuk menampilkan gosip mengenai interface jaringan yang digunakan, IP address, MAC address, MTU (maximum transmission unit) dan lain-lain, pola penggunaan perintah ifconfig :

Syntax : ifconfig <spasi> network_interface_card

example : ifconfig wlan0

dodiventuraz@backbox: $ ifconfig wlan0  wlan0     Link encap:Ethernet  HWaddr f8:2f:a8:c7:4b:8b             inet addr:192.168.1.131  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::fa2f:a8ff:fec7:4b8b/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:3593132 errors:0 dropped:0 overruns:0 frame:1989041           TX packets:2234387 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:680468716 (680.4 MB)  TX bytes:175867469 (175.8 MB)           Interrupt:19  


2. Perintah PING

Perintah PING yaitu salah satu tool diagnostic yg digunakan untuk mengetahui kualitas koneksi dalam sebuah jaringan, baik itu koneksi dari end-user ke gateway maupun koneksi dari end-user ke internet, output dari perintah PING akan menampilkan gosip berupa icmp sequence, TTL (Time to live), packet transmitted and received, packet loss dan tentunya waktu yg diperlukan oleh sebuah paket data hingga ke tujuan.

Syntax : ping <spasi> ip_address_or_domain

dodiventuraz@backbox: $ ping www.google.com PING www.google.com (119.110.118.234) 56(84) bytes of data. 64 bytes from ip-118-234.mcs.internet.exchange (119.110.118.234): icmp_seq=1 ttl=58 time=54.1 ms 64 bytes from ip-118-234.mcs.internet.exchange (119.110.118.234): icmp_seq=2 ttl=58 time=78.6 ms 64 bytes from ip-118-234.mcs.internet.exchange (119.110.118.234): icmp_seq=3 ttl=58 time=49.2 ms 64 bytes from ip-118-234.mcs.internet.exchange (119.110.118.234): icmp_seq=4 ttl=58 time=48.3 ms ^C --- www.google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3002ms rtt min/avg/max/mdev = 48.343/57.576/78.637/12.359 ms 


3. Perintah ROUTE

Route yaitu perintah untuk mengetahui IP Gateway dalam satu network, pola penggunaan perintah route :

dodiventuraz@backbox: $ route  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface default         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0 192.168.1.0     *               255.255.255.0   U     9      0        0 wlan0 


4. Perintah TRACEROUTE

Traceroute akan menunjukkan rute dari sebuah paket yang dilalui, dengan perintah traceroute teman akan mengetahui jumlah hops yang dilalui oleh paket data hingga ke tujuan, pola penggunaan traceroute :

Syntax : traceroute <spasi> www.detik.com

dodiventuraz@backbox: $ traceroute www.detik.com  # ADDRESS                          LOSS SENT    LAST     AVG    BEST   WORST  1 192.168.1.1                 0%   26   1.1ms     1.1       1     1.7  2 192.168.250.1         0%   26   1.1ms     1.1       1     1.7  3 103.26.208.253                     0%   26   1.1ms     1.2       1     1.7  4 103.30.90.81                       0%   26   1.3ms     1.2     1.1     2.1  5 218.100.36.9                       0%   26   1.3ms     1.3     1.2     1.8  6 203.190.244.35                     0%   26   1.4ms     1.3     1.1     1.5  7 203.190.242.69                     0%   26   1.3ms     1.4     1.2       2 


5. Perintah TRACEPATH


Tracepath merupakan opsi lain dari perintah traceroute fungsinya sama yaitu untuk mengetahui jumlah hops yang di lewati oleh paket data hingga tujuan, yg membedakan keduanya yaitu output dari perintah tracepath lebih simple sebab yg ditampilkan hanya jumlah hops dan waktu yg diperlukan oleh sebuah paket data untuk hingga ke tujuan.

Syntax : tracepath <spasi> www.detik.com

dodiventuraz@backbox: $ tracepath www.detik.com  1?: [LOCALHOST]                                         pmtu 1500  1:  192.168.1.1                                           4.550ms   1:  192.168.1.1                                           5.958ms   2:  192.168.250.1                                         4.684ms   3:  ip-208-253.neuviz.net.id                              6.781ms   4:  ip-90-81.neuviz.net.id                                5.528ms   5:  detik.openixp.net                                    15.144ms   6:  203.190.244.34                                       17.421ms   7:  203.190.241.43                                       20.543ms reached      Resume: pmtu 1500 hops 7 back 7  


6. Perintah MTR

MTR (My traceroute) yaitu perintah yang menggabungkan fungsi perintah PING dan Traceroute, output dari perintah ini akan menampilkan jumlah hops yg dilalui oleh sebuah paket data dan juga waktu yang diperlukan oleh paket data untuk hingga ke tujuan secara realtime.

Syntax : mtr <spasi> www.detik.com

                              My traceroute  [v0.85] backbox (0.0.0.0)                                     Wed Aug 17 19:28:50 2016 Keys:  Help   Display mode   Restart statistics   Order of fields   quit                                                    Packets               Pings  Host                               Loss%   Snt   Last   Avg  Best  Wrst StDev  1. 192.168.1.1                      0.0%   800    1.3   3.2   1.0  75.4   4.8  2. 192.168.250.1                    0.0%   800    3.3   3.5   1.1  89.9   5.4  3. ip-208-253.neuviz.net.id         0.0%   800    4.8   7.1   2.0 116.4   8.2  4. ip-90-81.neuviz.net.id           0.0%   800    2.8   7.0   2.2 113.9   7.6  5. detik.openixp.net                0.0%   800    2.9   7.4   2.3 405.1  15.5  6. 203.190.244.35                   0.0%   799    3.3   7.6   2.3 260.6  14.0  7. 203.190.242.69                   0.0%   799    4.0   7.9   2.2 125.7  10.6 


7. Perintah NMAP

Nmap (Network mapper) yaitu tool wajib yang harus dimiliki oleh seorang network engineer, tool ini biasa digunakan untuk memetakan jaringan dan memverifikasi keamanan jaringan atau server, aku sering memakai tool ini untuk mengetahui port yang terbuka di dalam sebuah router dan server, bahkan tool ini dapat digunakan untuk mendiscovery user yang sedang terkoneksi (host up) dalam sebuah jaringan. Untuk panduan penggunaan nmap teman dapat lihat di dokumentasi nmap.

Example : nmap -sn 192.168.1.0/24

dodiventuraz@backbox: $ nmap -sn 192.168.1.0/24  Starting Nmap 7.01 ( https://nmap.org ) at 2016-08-17 20:26 WIB Nmap scan report for 192.168.1.1 Host is up (0.0021s latency). Nmap scan report for 192.168.1.2 Host is up (0.0049s latency). Nmap scan report for 192.168.1.25 Host is up (0.020s latency). Nmap scan report for 192.168.1.27 Host is up (0.030s latency). Nmap done: 256 IP addresses (4 hosts up) scanned in 2.93 seconds 


8. Perintah NETSTAT

Netstat (Network Statistic) yaitu perintah yang digunakan untuk menampilkan statistic koneksi jaringan dari dan ke komputer yang sedang kita gunakan, perintah netstat akan menampilkan proses yang sedang berjalan berupa protocol yang dipakai, IP address tujuan, Port dan status koneksi yang terjadi.

dodiventuraz@backbox: $ netstat  Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address           Foreign Address         State       tcp        0      0 192.168.1.131:46524     edge-star-shv-01-:https ESTABLISHED tcp        0      0 192.168.1.131:34588     edge-star-mini-sh:https ESTABLISHED tcp        0      0 192.168.1.131:44142     ip-118-249.mcs.in:https ESTABLISHED tcp        0      0 192.168.1.131:57228     sa-in-f95.1e100.ne:http ESTABLISHED tcp        0      0 192.168.1.131:35682     ec2-52-32-153-92.:https ESTABLISHED 


9. Perintah DIG

Perintah DIG (Domain information groper) berfungsi untuk menampilkan gosip record dari sebuah DNS (Domain name server) menyerupai A Record, CNAME, MX Record dan lain-lain. Contoh untuk menampilkan gosip A Record dari sebuah website teman tinggal mengetikkan perintah sbb :

Syntax : dig <spasi> nama_website.com

Example : dig <spasi> ubuntu.com

dodiventuraz@backbox: $ dig ubuntu.com  ; <<>> DiG 9.9.5-3ubuntu0.8-Ubuntu <<>> ubuntu.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- 0="" 17="" 192.168.1.1="" 1="" 2016="" 22:38:24="" 44="" 58471="" 600="" 83="" 91.189.94.40="" a="" additional:="" answer:="" answer="" aug="" authority:="" code="" flags:="" id:="" in="" msec="" msg="" noerror="" opcode:="" qr="" query:="" query="" question="" ra="" rcvd:="" rd="" section:="" server:="" size="" status:="" time:="" ubuntu.com.="" wed="" when:="" wib="">


10. Perintah NSLOOKUP

Perintah nslookup juga mempunyai kegunaan untuk mengetahui Query DNS, pola untuk mengetahui A Record (atau IP Address) dari website www.ubuntu.com :

Syntax : nslookup <spasi> www.ubuntu.com

dodiventuraz@backbox: $ nslookup www.ubuntu.com Server:  192.168.1.1 Address: 192.168.1.1#53  Non-authoritative answer: Name: www.ubuntu.com Address: 91.189.89.110 


11. Perintah HOST

Perintah host digunakan untuk mengetahui IP dari sebuah domain dan juga sebaliknya, perintah ini juga dapat digunakan untuk mengetahui gosip Query DNS Record dari sebuah website.

Syntax : host <spasi> Domain_or_IP_Address

Example : host <spasi> www.detik.com

dodiventuraz@backbox: $ host www.detik.com www.detik.com is an alias for detik.com. detik.com has address 203.190.242.69 detik.com has address 203.190.241.43 detik.com mail is handled by 20 alt2.aspmx.l.google.com. detik.com mail is handled by 30 aspmx2.googlemail.com. detik.com mail is handled by 30 aspmx3.googlemail.com. detik.com mail is handled by 30 aspmx4.googlemail.com. detik.com mail is handled by 30 aspmx5.googlemail.com. detik.com mail is handled by 10 aspmx.l.google.com. detik.com mail is handled by 20 alt1.aspmx.l.google.com. 


12. Perintah IPCALC

IPCALC (IP Calculator) yaitu aplikasi berbasis CLI pada GNU/Linux yang digunakan untuk menghitung subnetting suatu IP Address, apabila di linux teman belum tersedia aplikasi ini dapat di install dengan mengetikkan perintah sudo apt-get install ipcalc.

Example : ipcalc <spasi> 172.20.10.0/22

dodiventuraz@backbox: $ ipcalc 172.20.10.0/22 Address:   172.20.10.0          10101100.00010100.000010 10.00000000 Netmask:   255.255.252.0 = 22   11111111.11111111.111111 00.00000000 Wildcard:  0.0.3.255            00000000.00000000.000000 11.11111111 => Network:   172.20.8.0/22        10101100.00010100.000010 00.00000000 HostMin:   172.20.8.1           10101100.00010100.000010 00.00000001 HostMax:   172.20.11.254        10101100.00010100.000010 11.11111110 Broadcast: 172.20.11.255        10101100.00010100.000010 11.11111111 Hosts/Net: 1022                  Class B, Private Internet 


13. Perintah WHOIS

Perintah whois dapat digunakan untuk mengetahui gosip atau deskripsi dari sebuah IP address, gosip yang ditampilkan yaitu berupa deskripsi alamat asal IP address, negara, pemilik IP address dan lain-lain.

Syntax : whois <spasi> IP_Address

Example : whois 58.98.153.83

dodiventuraz@backbox: $ whois 58.98.153.83 % [whois.apnic.net] % Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html  % Information related to '58.98.0.0 - 58.98.255.255'  inetnum:        58.98.0.0 - 58.98.255.255 netname:        XePhion descr:          NTT-ME Corporation descr:          NTT-Shin-Ikebukuro BLDG 3-21-14,Higashi-ikebukuro,Toshima-ku, descr:          Tokyo 170-0013 Japan country:        JP admin-c:        JNIC1-AP tech-c:         JNIC1-AP status:         ALLOCATED PORTABLE remarks:        Email address for spam or abuse complaints : abuse@xephion.ad.jp mnt-by:         MAINT-JPNIC mnt-irt:        IRT-JPNIC-JP mnt-lower:      MAINT-JPNIC changed:        hm-changed@apnic.net 20050413 changed:        ip-apnic@nic.ad.jp 20080526 changed:        hm-changed@apnic.net 20151202 source:         APNIC  irt:            IRT-JPNIC-JP address:        Urbannet-Kanda Bldg 4F, 3-6-2 Uchi-Kanda address:        Chiyoda-ku, Tokyo 101-0047, Japan e-mail:         hostmaster@nic.ad.jp abuse-mailbox:  hostmaster@nic.ad.jp admin-c:        JNIC1-AP tech-c:         JNIC1-AP auth:           # Filtered mnt-by:         MAINT-JPNIC changed:        abuse@apnic.net 20101108 changed:        hm-changed@apnic.net 20101111 changed:        ip-apnic@nic.ad.jp 20140702 source:         APNIC  role:           Japan Network Information Center address:        Urbannet-Kanda Bldg 4F address:        3-6-2 Uchi-Kanda address:        Chiyoda-ku, Tokyo 101-0047,Japan country:        JP phone:          +81-3-5297-2311 fax-no:         +81-3-5297-2312 e-mail:         hostmaster@nic.ad.jp admin-c:        JI13-AP tech-c:         JE53-AP nic-hdl:        JNIC1-AP mnt-by:         MAINT-JPNIC changed:        hm-changed@apnic.net 20041222 changed:        hm-changed@apnic.net 20050324 changed:        ip-apnic@nic.ad.jp 20051027 changed:        ip-apnic@nic.ad.jp 20120828 source:         APNIC  % Information related to '58.98.128.0 - 58.98.255.255'  inetnum:        58.98.128.0 - 58.98.255.255 netname:        XEPHION descr:          XePhion(NTT-ME Corporation) country:        JP admin-c:        JP00016904 tech-c:         JP00016904 remarks:        This information has been partially mirrored by APNIC from remarks:        JPNIC. To obtain more specific information, please use the remarks:        JPNIC WHOIS Gateway at remarks:        http://www.nic.ad.jp/en/db/whois/en-gateway.html or remarks:        whois.nic.ad.jp for WHOIS client. (The WHOIS client remarks:        defaults to Japanese output, use the /e switch for English remarks:        output) changed:        apnic-ftp@nic.ad.jp 20050721 changed:        apnic-ftp@nic.ad.jp 20060706 source:         JPNIC  % This query was served by the APNIC Whois Service version 1.69.1-APNICv1r7-SNAPSHOT (WHOIS3) 

Kesimpulan

Tools diatas sangat penting sekali bagi teman yang berprofesi sebagai Network Engineer atau Network Administrator untuk keperluan troubleshooting jaringan, sebenarnya masih berbagai networking command line di sistem operasi berbasis GNU/Linux. Namun, tools diatas lah yang sering sekali aku gunakan. Akhir kata semoga goresan pena sederhana ini dapat bermanfaat untuk menambah pengetahuan sobat, mohon saran dan kritikan nya di kolom komentar semoga tulisan-tulisan selanjutnya dapat lebih baik lagi.

:
Cara install dan konfigurasi ZSH Shell di linux
Cara install bash powerline di linux

0 Response to "13 Networking Command Line Di Gnu/Linux"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel