LINUX NETWORKING TOOLS

Linux Networking Tools
Untuk menunjang kelancaran jaringan diperlukan linux networking tools, sehingga pengguna dapat melihat status jaringannya dengan bantuan beberapa perangkat lunak.
Untuk itu kita membutukan:
  1. Satu buah PC dengan system operasi Linux
  2. Siapkan kabel LAN, Switch.
    Caranya dapat Anda ikuti proses dibawah ini:

  1. Lepaskan kabel lakukan perintah mii-tool
Perintah mii-tool berfungsi untuk mengecek link sudah terhubung atau belum. Mii-tool (Media Independent Interface).
  1. Pasang kabel dan lakukan perintah mii-tool
Apabila sudah keluar eth0 artinya perangkat jaringan kita menggunakan eth0. 100base-TX-FD artinya kita menggunakan kecepatan 100Mbps dan FD adalah Full-Duplex. dan Link ok menandakan perangkat kita sudah siap. Apabila hasilnya bukan link ok artinya ada masalah dengan perangkat kita.
  1. Catat hasil perintah diatas menggunakan perintah #lspci
Apabila ditemukan Network controller atau Ethernet controller, artinya perangkat jaringan sudah siap digunakan.
4.      Rubah IP sesuai dengan DHCP. Jalankan 2 buah konsole (terminal), dimana terminal pertama melakukan ping terhadap alamat broadcast, sedangkan terminal yang satu lagi mencatat jenis koneksi dengan perintah “arp” .
root@lab3-laptop22:/home/lab3# gedit /etc/network/interfaces
gedit1.png
Simpan file diatas, Lalu restart dengan perintah dibawah ini:

root@lab3-laptop22:/home/lab3# /etc/init.d/networking restart

 * Reconfiguring network interfaces...                                                                          RTNETLINK answers: No such process

There is already a pid file /var/run/dhclient.eth0.pid with pid 2900

killed old client process, removed PID file

Internet Systems Consortium DHCP Client V3.1.3

Copyright 2004-2009 Internet Systems Consortium.

All rights reserved.

For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:26:22:15:cf:6f

Sending on   LPF/eth0/00:26:22:15:cf:6f

Sending on   Socket/fallback

DHCPRELEASE on eth0 to 172.22.22.1 port 67

Internet Systems Consortium DHCP Client V3.1.3

Copyright 2004-2009 Internet Systems Consortium.

All rights reserved.

For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:26:22:15:cf:6f

Sending on   LPF/eth0/00:26:22:15:cf:6f

Sending on   Socket/fallback

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3

DHCPOFFER of 172.22.22.109 from 172.22.22.1

DHCPREQUEST of 172.22.22.109 on eth0 to 255.255.255.255 port 67

DHCPACK of 172.22.22.109 from 172.22.22.1

bound to 172.22.22.109 -- renewal in 237728 seconds.
                                                                                                         [ OK ]
Coba lihat hasil pengubahan IP Address menggunakan perintah ifconfig:
root@lab3-laptop22:/home/lab3# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:26:22:15:cf:6f 

          inet addr:172.22.22.109  Bcast:172.22.22.255  Mask:255.255.255.0

          inet6 addr: fe80::226:22ff:fe15:cf6f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:16 errors:0 dropped:0 overruns:0 frame:0

          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:3521 (3.5 KB)  TX bytes:5280 (5.2 KB)

          Interrupt:18

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:46 errors:0 dropped:0 overruns:0 frame:0

          TX packets:46 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:3996 (3.9 KB)  TX bytes:3996 (3.9 KB)

wlan0     Link encap:Ethernet  HWaddr 00:1e:65:73:ce:4e 

          inet6 addr: fec0::b:21e:65ff:fe73:ce4e/64 Scope:Site

          inet6 addr: 2002:ac0a:71:b:21e:65ff:fe73:ce4e/64 Scope:Global

          inet6 addr: fe80::21e:65ff:fe73:ce4e/64 Scope:Link

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:61360 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2470 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:11110347 (11.1 MB)  TX bytes:251797 (251.7 KB)

Coba ping alamat broadcast yang tertampil pada ifconfig, caranya ketik perintah ping –b <alamat broadcast> :
root@lab3-laptop22:/home/lab3# ping -b 172.22.22.255

WARNING: pinging broadcast address

PING 172.22.22.255 (172.22.22.255) 56(84) bytes of data.

64 bytes from 172.22.22.1: icmp_seq=1 ttl=64 time=2.42 ms

64 bytes from 172.22.22.1: icmp_seq=2 ttl=64 time=1.17 ms

64 bytes from 172.22.22.1: icmp_seq=3 ttl=64 time=1.20 ms

64 bytes from 172.22.22.1: icmp_seq=4 ttl=64 time=1.24 ms

64 bytes from 172.22.22.1: icmp_seq=5 ttl=64 time=1.29 ms

64 bytes from 172.22.22.1: icmp_seq=6 ttl=64 time=1.21 ms

64 bytes from 172.22.22.1: icmp_seq=7 ttl=64 time=1.18 ms

64 bytes from 172.22.22.1: icmp_seq=8 ttl=64 time=1.16 ms

64 bytes from 172.22.22.1: icmp_seq=9 ttl=64 time=1.34 ms

64 bytes from 172.22.22.1: icmp_seq=10 ttl=64 time=1.19 ms

64 bytes from 172.22.22.1: icmp_seq=11 ttl=64 time=1.20 ms

64 bytes from 172.22.22.1: icmp_seq=12 ttl=64 time=1.20 ms

64 bytes from 172.22.22.1: icmp_seq=13 ttl=64 time=1.21 ms

64 bytes from 172.22.22.1: icmp_seq=14 ttl=64 time=1.24 ms

64 bytes from 172.22.22.1: icmp_seq=15 ttl=64 time=1.06 ms

64 bytes from 172.22.22.1: icmp_seq=16 ttl=64 time=1.25 ms

64 bytes from 172.22.22.1: icmp_seq=17 ttl=64 time=1.14 ms

64 bytes from 172.22.22.1: icmp_seq=18 ttl=64 time=1.11 ms

64 bytes from 172.22.22.1: icmp_seq=19 ttl=64 time=1.13 ms

64 bytes from 172.22.22.1: icmp_seq=20 ttl=64 time=1.15 ms

64 bytes from 172.22.22.1: icmp_seq=21 ttl=64 time=1.25 ms

64 bytes from 172.22.22.1: icmp_seq=22 ttl=64 time=1.11 ms

64 bytes from 172.22.22.1: icmp_seq=23 ttl=64 time=1.32 ms

64 bytes from 172.22.22.1: icmp_seq=24 ttl=64 time=1.14 ms
Ini hasilnya jika Anda ketik perintah arp:
lab3@lab3-laptop22:~$ arp

Address                  HWtype  HWaddress           Flags Mask            Iface

192.168.1.1             ether   00:18:f8:4a:4d:49   C                     wlan0

  1. Ganti IP PC menjadi 192.168.0.*/24, kemudian catat hasil dari perintah “ifconfig” dan “route”.
Pada praktek kali ini saya menggunakan IP Address 192.168.0.15
Coba ubah IP menggunakan perintah dibawah ini:
root@lab3-laptop22:/home/lab3# ifconfig eth0 192.168.0.15 netmask 255.255.255.0
Lalu catat hasil pada dari perintah ifconfig dibawah ini:
root@lab3-laptop22:/home/lab3# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:26:22:15:cf:6f 

          inet addr:192.168.0.15  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::226:22ff:fe15:cf6f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:455 errors:0 dropped:0 overruns:0 frame:0

          TX packets:92 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:98495 (98.4 KB)  TX bytes:12862 (12.8 KB)

          Interrupt:18

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:47 errors:0 dropped:0 overruns:0 frame:0

          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:4075 (4.0 KB)  TX bytes:4075 (4.0 KB)

wlan0     Link encap:Ethernet  HWaddr 00:1e:65:73:ce:4e 

          inet addr:192.168.1.122  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fec0::b:21e:65ff:fe73:ce4e/64 Scope:Site

          inet6 addr: 2002:ac0a:71:b:21e:65ff:fe73:ce4e/64 Scope:Global

          inet6 addr: fe80::21e:65ff:fe73:ce4e/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:64619 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2517 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:11463573 (11.4 MB)  TX bytes:259904 (259.9 KB)

Catat hasil pengubahan IP menggunakan perintah route:
root@lab3-laptop22:/home/lab3# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.1.0     *               255.255.255.0   U     2      0        0 wlan0

192.168.0.0    *               255.255.255.0   U     0      0        0 eth0


6.      Ganti IP PC menjadi DHCP, kemudian catat hasil dari perintah “ifconfig” dan “route”
Untuk mengubah IP PC menjadi DHCP Anda dapat langsung melakukan perintah restart atau mengubahnya pada /etc/network/interfaces.
 Pada praktek ini langsung menggunakan perintah restart seperti dibawah ini:
root@lab3-laptop22:/home/lab3# /etc/init.d/networking restart

 * Reconfiguring network interfaces...                                                                          RTNETLINK answers: No such process

There is already a pid file /var/run/dhclient.eth0.pid with pid 3288

killed old client process, removed PID file

Internet Systems Consortium DHCP Client V3.1.3

Copyright 2004-2009 Internet Systems Consortium.

All rights reserved.

For info, please visit https://www.isc.org/software/dhcp/



Listening on LPF/eth0/00:26:22:15:cf:6f

Sending on   LPF/eth0/00:26:22:15:cf:6f

Sending on   Socket/fallback

DHCPRELEASE on eth0 to 172.22.22.1 port 67

Ignoring unknown interface wlan0=wlan0.

Internet Systems Consortium DHCP Client V3.1.3

Copyright 2004-2009 Internet Systems Consortium.

All rights reserved.

For info, please visit https://www.isc.org/software/dhcp/



Listening on LPF/eth0/00:26:22:15:cf:6f

Sending on   LPF/eth0/00:26:22:15:cf:6f

Sending on   Socket/fallback

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3

DHCPOFFER of 172.22.22.109 from 172.22.22.1

DHCPREQUEST of 172.22.22.109 on eth0 to 255.255.255.255 port 67

DHCPACK of 172.22.22.109 from 172.22.22.1

bound to 172.22.22.109 -- renewal in 263636 seconds.
Gunakan ifconfig untuk melihat hasil dan IP PC telah berganti menjadi DHCP:
root@lab3-laptop22:/home/lab3# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:26:22:15:cf:6f 

          inet addr:172.22.22.109  Bcast:172.22.22.255  Mask:255.255.255.0

          inet6 addr: fe80::226:22ff:fe15:cf6f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:144 errors:0 dropped:0 overruns:0 frame:0

          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:26492 (26.4 KB)  TX bytes:5162 (5.1 KB)

          Interrupt:18

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:48 errors:0 dropped:0 overruns:0 frame:0

          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:4173 (4.1 KB)  TX bytes:4173 (4.1 KB)

wlan0     Link encap:Ethernet  HWaddr 00:1e:65:73:ce:4e 

          inet addr:192.168.1.122  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fec0::b:21e:65ff:fe73:ce4e/64 Scope:Site

          inet6 addr: 2002:ac0a:71:b:21e:65ff:fe73:ce4e/64 Scope:Global

          inet6 addr: fe80::21e:65ff:fe73:ce4e/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:66597 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2531 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:11702154 (11.7 MB)  TX bytes:261258 (261.2 KB)
Gunakan perintah route untuk melihat hasilnya:
root@lab3-laptop22:/home/lab3# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

172.22.22.0          *               255.255.255.0   U     0      0        0 eth0

192.168.1.0          *               255.255.255.0   U     2      0        0 wlan0

link-local             *               255.255.0.0     U     1000   0        0 eth0

default         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0

default         172.22.22.1     0.0.0.0         UG    100    0        0 eth0

7.      Pastikan PC menggunakan IP DHCP, kemudian catat hasil dari ping, traceroute dan mtr pada target berikut
1. 10.252.13.90
2. 202.154.187.7
3. www.eepis-its.edu
4. www.yahoo.com

root@lab3-laptop22:/home/lab3# ping 10.252.13.90

PING 10.252.13.90 (10.252.13.90) 56(84) bytes of data.
Target diatas tidak berhasil di Ping karena tidak ada koneksi ke internet.

8.      Catat kondisi PC dengan perintah “netstat -nlptu”

root@lab3-laptop22:/home/lab3# netstat -nlptu

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1052/cupsd     

tcp6       0      0 ::1:631                 :::*                    LISTEN      1052/cupsd     

udp        0      0 0.0.0.0:68              0.0.0.0:*                           3540/dhclient3 

udp        0      0 0.0.0.0:68              0.0.0.0:*                           3331/dhclient  

udp        0      0 0.0.0.0:5353            0.0.0.0:*                           527/avahi-daemon: r

udp        0      0 0.0.0.0:59882           0.0.0.0:*                           527/avahi-daemon: r

9.      Buka halaman http://www.eepis-its.edu dengan web browser, kemudian sebelum koneksi selesai, buka terminal dan catat hasil koneksi dengan perintah “netstat -natu”

root@lab3-laptop22:/home/lab3# netstat -natu

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address           Foreign Address         State     

tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN    

tcp6       0      0 ::1:631                 :::*                    LISTEN    

udp        0      0 0.0.0.0:68              0.0.0.0:*                         

udp        0      0 0.0.0.0:68              0.0.0.0:*                          

udp        0      0 0.0.0.0:5353            0.0.0.0:*                         

udp        0      0 0.0.0.0:59882           0.0.0.0:*  

Hasil diatas merupakan perintah dari netstat-natu, namun tidak ada koneksi internet.

  1. ping ke komputer lain yang masih terdapat dalam 1 jaringan.
root@lab3-laptop22:/home/lab3# ping 172.22.22.101
PING 172.22.22.101 (172.22.22.101) 56(84) bytes of data.
64 bytes from 172.22.22.101: icmp_seq=1 ttl=64 time=2.68 ms
64 bytes from 172.22.22.101: icmp_seq=2 ttl=64 time=0.372 ms
64 bytes from 172.22.22.101: icmp_seq=3 ttl=64 time=0.364 ms
64 bytes from 172.22.22.101: icmp_seq=4 ttl=64 time=0.247 ms
64 bytes from 172.22.22.101: icmp_seq=5 ttl=64 time=0.285 ms
64 bytes from 172.22.22.101: icmp_seq=6 ttl=64 time=0.343 ms
64 bytes from 172.22.22.101: icmp_seq=7 ttl=64 time=0.356 ms
64 bytes from 172.22.22.101: icmp_seq=8 ttl=64 time=0.230 ms
64 bytes from 172.22.22.101: icmp_seq=9 ttl=64 time=0.253 ms
64 bytes from 172.22.22.101: icmp_seq=10 ttl=64 time=0.366 ms
64 bytes from 172.22.22.101: icmp_seq=11 ttl=64 time=0.363 ms
64 bytes from 172.22.22.101: icmp_seq=12 ttl=64 time=0.366 ms
64 bytes from 172.22.22.101: icmp_seq=13 ttl=64 time=0.296 ms
64 bytes from 172.22.22.101: icmp_seq=14 ttl=64 time=0.366 ms
64 bytes from 172.22.22.101: icmp_seq=15 ttl=64 time=0.244 ms
64 bytes from 172.22.22.101: icmp_seq=16 ttl=64 time=0.259 ms
^C
--- 172.22.22.101 ping statistics ---
16 packets transmitted, 16 received, 0% packet loss, time 15002ms
rtt min/avg/max/mdev = 0.230/0.461/2.681/0.576 ms
     
Tugas
1.    Lampirkan manual dari perintah: lscpi
root@lab3-laptop22:/home/lab3# lspci

00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)

00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)

00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)

00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)

00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)

00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)

00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)

00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)

00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)

00:1f.2 IDE interface: Intel Corporation ICH9M/M-E 2 port SATA IDE Controller (rev 03)

00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)

00:1f.5 IDE interface: Intel Corporation ICH9M/M-E 2 port SATA IDE Controller (rev 03)

00:1f.6 Signal processing controller: Intel Corporation 82801I (ICH9 Family) Thermal Subsystem (rev 03)

04:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100

05:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5764M Gigabit Ethernet PCIe (rev 10)

07:00.0 System peripheral: JMicron Technology Corp. SD/MMC Host Controller

07:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller

07:00.3 System peripheral: JMicron Technology Corp. MS Host Controller

07:00.4 System peripheral: JMicron Technology Corp. xD Host Controller

08:00.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0 CardBus/SmartCardBus Controller (rev 40)

2.    Lampirkan manual dari :mii-tool
root@lab3-laptop22:/home/lab3# mii-tool

eth0: negotiated 100baseTx-FD flow-control, link ok

3.    Lampirkan manual dari: arp

lab3@lab3-laptop22:~$ arp

Address                  HWtype  HWaddress           Flags Mask            Iface

192.168.1.2             ether   00:18:f8:4a:4d:49   C                     wlan0

4.    Lampirkan manual dari: ifconfig
root@lab3-laptop22:/home/lab3# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:26:22:15:cf:6f 

          inet addr:172.22.22.109  Bcast:172.22.22.255  Mask:255.255.255.0

          inet6 addr: fe80::226:22ff:fe15:cf6f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1039 errors:0 dropped:0 overruns:0 frame:0

          TX packets:130 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:159828 (159.8 KB)  TX bytes:24922 (24.9 KB)

          Interrupt:18

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:71 errors:0 dropped:0 overruns:0 frame:0

          TX packets:71 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:6517 (6.5 KB)  TX bytes:6517 (6.5 KB)

wlan0     Link encap:Ethernet  HWaddr 00:1e:65:73:ce:4e 

          inet6 addr: fec0::b:21e:65ff:fe73:ce4e/64 Scope:Site

          inet6 addr: 2002:ac0a:71:b:21e:65ff:fe73:ce4e/64 Scope:Global

          inet6 addr: fe80::21e:65ff:fe73:ce4e/64 Scope:Link

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:71498 errors:0 dropped:0 overruns:0 frame:0

          TX packets:3283 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:12380341 (12.3 MB)  TX bytes:340885 (340.8 KB)

5.    Lampirkan manual dari : route
root@lab3-laptop22:/home/lab3# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

172.22.22.0     *               255.255.255.0   U     0      0        0 eth0

link-local      *               255.255.0.0     U     1000   0        0 eth0

default         172.22.22.1     0.0.0.0         UG    100    0        0 eth0
6.    Lampirkan manual dari :ping
root@lab3-laptop22:/home/lab3# ping

Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]

            [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]

            [-M mtu discovery hint] [-S sndbuf]

            [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination

7.    Lampirkan manual dari : traceroute
root@lab3-laptop22:/home/lab3# traceroute

The program 'traceroute' can be found in the following packages:

 * traceroute

 * traceroute-nanog

Try: apt-get install <selected package>

8.    Lampirkan manual dari: mtr
root@lab3-laptop22:/home/lab3# mtr

                               My traceroute  [v0.75]

lab3-laptop22 (::)                                                              Thu Apr 21 12:59:46 2011

Keys:  Help   Display mode   Restart statistics   Order of fields   quit

                                                                Packets               Pings

 Host                                                         Loss%   Snt   Last   Avg  Best  Wrst StDev

  1. ::1                                                        0.0%    35    0.1   0.1   0.1   0.1   0.0

9.    Lampirkan manula dari netstat
root@lab3-laptop22:/home/lab3# netstat

unix  3      [ ]         STREAM     CONNECTED     7179     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     7178    

unix  2      [ ]         DGRAM                    7177    

unix  3      [ ]         STREAM     CONNECTED     7135     @/tmp/gdm-session-kJvlYvqN

unix  3      [ ]         STREAM     CONNECTED     7134    

unix  3      [ ]         STREAM     CONNECTED     7131     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     7130    

unix  2      [ ]         DGRAM                    7129    

unix  3      [ ]         STREAM     CONNECTED     6601     @/tmp/.X11-unix/X0

unix  3      [ ]         STREAM     CONNECTED     6600    

unix  3      [ ]         STREAM     CONNECTED     6587     @/tmp/.X11-unix/X0

unix  3      [ ]         STREAM     CONNECTED     6586    

unix  3      [ ]         STREAM     CONNECTED     6484     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     6483    

unix  3      [ ]         STREAM     CONNECTED     6411     @/tmp/.X11-unix/X0

unix  3      [ ]         STREAM     CONNECTED     6410    

unix  3      [ ]         STREAM     CONNECTED     5805     /var/run/acpid.socket

unix  3      [ ]         STREAM     CONNECTED     5804    

unix  2      [ ]         DGRAM                    4921    

unix  3      [ ]         STREAM     CONNECTED     4910     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     4909    

unix  3      [ ]         STREAM     CONNECTED     4868     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     4867    

unix  3      [ ]         STREAM     CONNECTED     4842     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     4841    

unix  2      [ ]         DGRAM                    4830    

unix  3      [ ]         STREAM     CONNECTED     4827     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     4826    

unix  2      [ ]         DGRAM                    4633    

unix  2      [ ]         DGRAM                    4620    

unix  3      [ ]         STREAM     CONNECTED     4354     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     4353    

unix  2      [ ]         DGRAM                    4351    

unix  2      [ ]         DGRAM                    3215    

unix  3      [ ]         STREAM     CONNECTED     3210     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     3209    

unix  3      [ ]         STREAM     CONNECTED     3202     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     3201    

unix  3      [ ]         STREAM     CONNECTED     3195     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     3194    

unix  2      [ ]         DGRAM                    3191    

unix  3      [ ]         STREAM     CONNECTED     3184     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     3183    

unix  3      [ ]         STREAM     CONNECTED     3178    

unix  3      [ ]         STREAM     CONNECTED     3177    

unix  2      [ ]         DGRAM                    3174    

unix  3      [ ]         STREAM     CONNECTED     3134     /var/run/dbus/system_bus_socket

unix  3      [ ]         STREAM     CONNECTED     3133    

unix  3      [ ]         STREAM     CONNECTED     3132    

unix  3      [ ]         STREAM     CONNECTED     3131    

unix  3      [ ]         DGRAM                    2960    

unix  3      [ ]         DGRAM                    2959    

unix  3      [ ]         STREAM     CONNECTED     2909     @/com/ubuntu/upstart
 
 

Read more...

Linux Networking


Internet Protocol
==============
Untuk terhubung pada suatu jaringan diperlukan penomoran dari Internet Protocol yang ada pada PC tersebut. Teknik penomoran IP ada 2 yaitu manual dan otomatis (DHCP). Pada suatu jaringan diperlukan IP dan netmask, contoh:
192.168.0.1/255.255.255.0
192.168.0.1 adalah penomoran IP, sedangkan 255.255.255.0 adalah netmask dari jaringan tersebut.

IP memiliki beberapa class yang terbagi menurut jumlah IP tersebut. Class yang ada antara lain:
A. 10.x.x.x dengan netmask 255.0.0.0
B. 172.16.x.x s/d 172.31.x.x dengan netmask 255.255.0.0
C. 192.168.0.x s/d 192.168.255.x dengan netmask 255.255.255.0
D dan E tidak digunakan, karena diperuntukan untuk penelitian Penomoran netmask dapat disingkat, misalkan 255.255.255.0 dapat disingkat menjadi/24


Setting IP di Linux
================

a. Perintah “ifconfig”


Dengan menggunakan perintah ifconfig, root dapat mengganti setting IP untuk jaringan. Contoh :
highway:~#ifconfig

Untuk mengganti IP dapat dilakukan dengan cara :
# ifconfig eth0 192.168.0.1 netmask 255.255.25.0

b. Dengan menyimpan konfigurasi jaringan
    Pada Debian GNU/Linux, file konfigurasi jaringan terdapat pada /etc/network/interfaces, dapat dilakukan
    dengan menggunakan editor vim, nano, atau mcedit.

# vim /etc/network/interfaces
pada file tersebut ketikkan syntax berikut:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.252.108.143 netmask 255.255.255.0

kemudian jalankan perintah “/etc/init.d/networking restart”
apabila ingin menggunakan DHCP ganti “iface eth0 inet static” menjadi “iface eth0 inet dhcp”

Tools Networik
a. ping, tools mengirimkan text ke client
b. mtr, aplikasi traceroute dan ping

II. PERALATAN
==============
1. Personal Computer (OS Linux)
2. Kabel UTP, switch, hub, router

III. LANGKAH PERCOBAAN
========================

  1. Percobaan menggunakan "ifconfig"

  2.  Percobaan "Ping" pada PC lain di jaringan

3. Percobaan merubah setting IP tersebut menjadi DHCP
     dengan mengetik #sudo nano /etc/network/interface pada terminal. lalu tekan enter.

Kemudian lakukan restart. caranya dengan mengetikkan # /etc/init.d/networking restart pada terminal.lalu tekan enter. seperti dibawah ini

4. Kemudian percobaan dengan menggunakan perintah-perintah jaringan sbb, yang sebelumnya setting 
    jaringan ke DHCP
  • #ping -b <ip_broadcast> 
    • cara untuk mencari ip broadcast adalah dengan menggunakan perintah #ifconfig
    • Bcast adalah IP Broadcast. Alamat Broadcast, merupakan alamat IPv4 yang didesain agar diproses oleh setiap node IP dalam segmen jaringan yang sama. Alamat broadcast digunakan dalam komunikasi one-to-everyone.
  • #mtr <firewall | proxy | www>
    • Merupakan gabungan ping dan traceroute.Traceroute (Tracert) adalah perintah untuk menunjukkan rute yang dilewati paket untuk mencapai tujuan. Ini dilakukan dengan mengirim pesan Internet Control Massage Protokokl (ICMP) Echo Request Ke tujuan dengan nilai Time to Live yang semakin meningkat. Rute yang ditampilkan adalah daftar interface router (yang paling dekat dengan host) yang terdapat pada jalur antara host dan tujuan. berikut contonya :

Read more...

Classless Inter-Domain Routing (CIDR)

CIDR (Classless Inter-Domain Routing) adalah metodologi pengalokasian IP address dan routing paket-paket Internet. CIDR diperkenalkan pada tahun 1993 untuk menggantikan arsitektur pengalamatan sebelumnya dari desain classful network di internet dengan tujuan untuk memperlambat pertumbuhan tabel routing pada router di Internet, dan membantu memperlambat cepatnyaexhausting dari IPv4 address.
IP Address dapat digambarkan terdiri dari dua kelompok bit pada address: bagian paling penting adalah network address yang mengidentifikasi seluruh jaringan atau subnet dan bagian yang paling signifikan adalah host identifier, yang menyatakan sebuah interface host tertentu pada jaringan. Divisi ini digunakan sebagai dasar lalu lintas routing antar jaringan IP dan untuk kebijakan alokasi alamat. Desain classful network untuk IPv4 berukur network address sebagai satu atau lebih kelompok 8-bit, menghasilkan blok Kelas A, B, atau C alamat. Classless Inter-Domain Routing mengalokasikan ruang alamat untuk penyedia layanan Internet dan end user pada bit batas alamat apapun, bukannya pada segmen 8-bit. Dalam IPv6, bagaimanapun, host identifier memiliki ukuran tetap yaitu 64-bit oleh konvensi, dan subnet yang lebih kecil tidak pernah dialokasikan kepada pengguna akhir.

Notasi CIDR menggunakan sintaks yang menentukan alamat IP untuk IPv4 dan IPv6, menggunakan alamat dasar jaringan diikuti dengan garis miring dan ukuran routing prefix, misalnya, 192.168.1.2/24 (IPv4), dan 2001: db8:: / 32 (IPv6).
Maksud dari 192.168.1.2/24 diatas adalah bahwa IP address 192.168.1.2 dengan subnet mask 255.255.255.0. CIDR /24 diambil dari penghitungan bahwa 24 bit subnet mask diselubung dengan binari 1. Atau dengan kata lain, subnet masknya adalah: 11111111.11111111.11111111.00000000 (255.255.255.0).
Tabel di bawah ini menerangkan tentang subnet mask dan nilai CIDR nya:
Subnet MaskNilai CIDR
255.128.0.0/9
255.192.0.0/10
255.224.0.0/11
255.240.0.0/12
255.248.0.0/13
255.252.0.0/14
255.254.0.0/15
255.255.0.0/16
255.255.128.0/17
255.255.192.0/18
255.255.224.0/19
Subnet MaskNilai CIDR
255.255.240.0/20
255.255.248.0/21
255.255.252.0/22
255.255.254.0/23
255.255.255.0/24
255.255.255.128/25
255.255.255.192/26
255.255.255.224/27
255.255.255.240/28
255.255.255.248/29
255.255.255.252/30
Sebelum notasi CIDR, jaringan IPv4 biasanya menggunakan notasi dot-desimal, representasi alternatif yang menggunakan network address diikuti oleh subnet mask. Dengan demikian, notasi CIDR 192.168.0.0/24 yang akan ditulis sebagai 192.168.0.0/255.255.255.0
Studi Kasus
Studi kasus ini sebenarnya studi kasus pada subnetting, namun karena subnetting yang digunakan menggunakan CIDR maka saya studi kasus tentang subnetting saya gabungkan dengan CIDR. Persoalan terhadapa subnetting akan berpusat pada 4 permasalahan yaitu jumlah subnet, jumlah host per subnet, blok-blok subnet, alamat host dan broadcast yang valid. Langsung saja pada pembahasan studi kasus.
  1. Subnetting pada IP address kelas C
    Subnetting pada IP Address kelas C berjarak pada interval CIDR /25 sampai CIDR /30.
    Subnetting seperti apa yang terjadi dengan sebuah network address/network identifier 192.168.1.0/28 ?
    Jawab:
    Network Address 192.168.1.0/28 berarti kelas C pada subnet mask /28 berarti 11111111.11111111.11111111.11110000 / 255.255.255.240.
    Ket: Subnet mask /28 berarti ada bit 1 sebanyak 28, seperti pada penjelasan di atas.
    1. Jumlah Subnet = 2 x, dimana x adalah jumlah bit 1 pada oktet terakhir(oktet keempat) subnet mask. Jadi jumlah subnet adalah 2 4 = 16 subnet
    2. Jumlah host per subnet = 2 – 2, dimana y adalah jumlah bit 0 pada oktet terakhir(oktet keempat) subnet. Jadi jumlah subnet adalah 2 4 – 2 = 14
    3. Blok subnet = 256 – z, dimana z adalah nilai desimal dari oktet terakhir(oktet keempat). Jadi blok subnet adalah 256-240 = 16. Jadi subnet lengkapnya adalah 0, 16, ….., 240
    4. Subnet192.168.1.0192.168.1.16…….192.168.1.240
      Host Address Pertama192.168.1.1192.168.1.17…….192.168.1.241
      Host Address Terakhir192.168.1.14192.168.1.30…….192.168.1.244
      Broadcast Address192.168.1.15192.168.1.31…….192.168.1.255
      Catatan: Host Address pertama adalah 1 angka setelah subnet dan broadcast address adalah 1 angka sebelum subnet berikutnya.
      Tabel di atas menerangkan tentang host address dan broadcast address yang valid.
  2. Subnetting pada IP Address Kelas B
    Subnetting pada IP Address kelas B berjarak pada interval CIDR /17 sampai CIDR /30.
    Subnetting seperti apa yang terjadi dengan sebuah network address 172.16.0.0/20 dan network address 172.16.0.0/29?
    Jawab:
    1. Network Address 172.16.0.0/20 berarti kelas B pada subnet mask /20 berarti 11111111.11111111.11110000.00000000 / 255.255.240.0
    1. Jumlah Subnet=2x, dimana x adalah bit 1 pada 2 oktet terakhir(oktet keempat dan oktet ketiga). Jadi jumlah subnet adalah 24=16 subnet
    2. Jumlah host per subnet = 2y – 2, dimana y adalah bit 0 pada 2 oktet terakhir(oktet keempat dan oktet ketiga). Jadi jumlah host per subnet adalah 212-2=4096 host
    3. Blok subnet = 256-z, dimana z adalah nilai oktet terakhir pada subnet. Jadi blok subnet adalah 256-240 = 16. Jadi subnet lengkapnya adalah 0, 16, ….., 240
    4. Subnet172.16.0.0172.16.16.0…….172.16.240.0
      Host Address Pertama172.16.0.1172.16.16.1…….172.16.240.1
      Host Address Terakhir172.16.15.14172.16.31.30…….172.16.255.254
      Broadcast Address172.16.15.15172.16.31.31…….172.16.255.255
    2. Network Address 172.16.0.0/29 berarti kelas B pada subnet mask /20 berarti 11111111.11111111.11111111.11111000 / 255.255.255.248
    1. Jumlah subnet = 213 = 8192
    2. Jumlah host per subnet = 2 3-2 = 6
    3. Blok subnet = 256-248 = 8. Jadi subnet lengkapnya adalah 0,8,16,…248
    4. Subnet172.16.0.0172.16.0.8…….172.16.255.248
      Host Address Pertama172.16.0.1172.16.0.9…….172.16.255.249
      Host Address Terakhir172.16.0.6172.16.0.14…….172.16.255.254
      Broadcast Address172.16.0.7172.16.0.15…….172.16.255.255
  3. Subnetting pada IP Address Kelas A
    Subnetting pada IP Address kelas A dapat dilakukan pada interval berapapun.
    Subnetting seperti apa yang terjadi dengan sebuah network address 10.0.0.0/15
    Jawab:
    10.0.0.0 berarti kelas A, dengan Subnet Mask /15 berarti 11111111.11111110.00000000.00000000 (255.254.0.0)
    1. Jumlah subnet=2x, dimana x adalah bit 1 pada 3 oktet terakhir(oktet keempat, oktet ketiga, dan oktet kedua). Jadi jumlah subnet adalah 27=128 subnet
    2. Jumlah host per subnet = 2y – 2, dimana y adalah bit 0 pada 3 oktet terakhir(oktet keempat, oktet ketiga, dan kedua). Jadi jumlah host per subnet adalah 217-2=131070 host
    3. Blok subnet = 256-z, dimana z adalah nilai oktet terakhir pada subnet. Jadi blok subnet adalah 256-254 = 2. Jadi subnet lengkapnya adalah 2, 4, ….., 254
    4. Subnet10.0.0.010.2.0.0…….10.254.0.0
      Host Address Pertama10.0.0.110.2.0.1…….10.254.0.1
      Host Address Terakhir10.1.255.25410.3.255.254…….10.255.255.254
      Broadcast Address10.1.255.25510.3.255.255…….10.255.255.255

Read more...

About This Blog

  © Blogger template Shush by Ourblogtemplates.com 2009

Back to TOP