Elegant Rose - Working In Background

Jumat, 26 Agustus 2016

Static Routing || Dewi Aisyah Blog

Assalamualaikum wr wb kali ini saya akan share lab selanjutnya yaitu Lab Static Routing
Topologi

Tujuan
 Setting static routing

Konsep Dasar
Routing
 Forwarding paket dari satu network ke network lainnya dengan memilih jalur yang terbaik
dari routing table
 Routing memungkinkan dua network atau lebih dapat berkomunikasi dengan network
lainnya
 Routing table hanya terdiri dari jalur terbaik untuk masing-masing network destination
Static routing
 Konfigurasi routing dilakukan secara manual
 Membutuhkan informasi network destination
 Setiap network destination disetting manual
 Digunakan oleh organisasi kecil
 Memiliki administrative distance 0 atau 1
Konfigurasi
Login console ke R1 atau R2 untuk mempraktikkan Lab 4-Static Routing.
Setting interface loopback di R1
Ketikkan command berikut di R1
R1>enable
R1#configure terminal
R1(config)#interface lo1
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#
R1(config-if)#interface lo2
R1(config-if)#ip address 172.16.2.2 255.255.255.0
R1(config-if)#
R1(config-if)#end
Interface loopback secara default tidak ada, untuk membuat interface loopback gunakan command
diatas. Fungsi interface loopback ini seperti logical interface untuk merepresentasikan sebuah
subnet. Manfaat lain interface loopback untuk testing. Jika memiliki keterbatasan resources untuk
membuat LAN saat ngelab, gunakan interface loopback sebagai LAN. Interface loopback sudah UP
secara otomatis, sehingga tidak perlu memberikan sub-command no shutdown.
Note: ulangi langkah yang sama diatas untuk pembuatan interface loopback di R2.
Tampilkan interface yang sudah disetting di R1
Untuk melakukan verifikasi apakah IP address yang sudah kita setting apakah sudah sesuai atau
belum. Gunakan command dibawah ini.
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.254 YES manual up up
FastEthernet1/0 12.12.12.1 YES manual up up
Loopback1 172.16.1.1 YES manual up up
Loopback2 172.16.2.2 YES manual up up
R1#
Tampilkan interface yang sudah disetting di R2
R2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.2.254 YES manual up up
FastEthernet1/0 12.12.12.2 YES manual up up
Loopback0 172.16.3.3 YES manual up up
Loopback1 172.16.4.4 YES manual up up
R2#
Pastikan status interface UP UP semua.
Tampilkan routing table di R1
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet1/0
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Loopback1
C 172.16.2.0 is directly connected, Loopback2
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R1#
Dari output routing table R1 dapat dilihat :
 Routing table diatas yang ditampilkan hanya network directly connected (jaringan yang
terhubung langsung) ditandai dengan kode C (Connected).
 Secara default, router tidak mengetahui network yang tidak terhubung langsung dan itulah
alasan mengapa Network A dan Network B tidak bisa berkomunikasi (Jawaban Review Lab
1. Basic Router Configuration)
 Untuk mengatasi hal tersebut, maka dibutuhkanlah routing protocol dengan berbagai tipe
contohnya static routing atau dynamic routing.
Setting static routing di R1
Untuk mensetting static routing dapat dilakukan dengan dua cara:
1. Next-hop IP address
2. Exit-interface
Istilah lain static routing :
1. Recursive static route = menggunakan next-hop ip address
2. Directly static route = menggunakan exit-interface
Konfigurasi static routing:
R1(config)#ip route <network-destination> <subnet-mask network-destination>
<next-hop ip address>
R1(config)#ip route <network-destination> <subnet-mask network-destination>
<exit-interface>
network destination: network tujuan yang tidak terhubung langsung (remotely connected network)
next-hop ip address: ip address yang terletak didepan router lokal menuju network destination
exit-interface: interface yang ada di router lokal untuk menuju network destination
Dari R1, untuk menuju network Fa0/0 R2, yang menjadi next-hop ip address yaitu IP address
Fa1/0 R2.
Dari
Setting static routing di R1
R1(config)#
R1(config)#ip route 192.168.2.0 255.255.255.0 12.12.12.2
R1(config)#ip route 172.16.3.0 255.255.255.0 12.12.12.2
R1(config)#ip route 172.16.4.0 255.255.255.0 12.12.12.2
R1(config)#
Setting static routing di R2
R2(config)#
R2(config)#ip route 192.168.1.0 255.255.255.0 12.12.12.1
R2(config)#ip route 172.16.1.0 255.255.255.0 12.12.12.1
R2(config)#ip route 172.16.2.0 255.255.255.0 12.12.12.1
R2(config)#
Verifikasi
Setelah melakukan setting static routing, lakukan verifikasi dengan beberapa command dibawah
ini. Tes Ping antara Laptop1 dan Laptop2 pastikan berhasil. Lakukan tracert dari Laptop1 untuk
melihat router mana saja yang dilewati ketika menuju ke Laptop2.
Tampilkan routing table R1
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet1/0
172.16.0.0/24 is subnetted, 4 subnets
C 172.16.1.0 is directly connected, Loopback1
C 172.16.2.0 is directly connected, Loopback2
S 172.16.3.0 [1/0] via 12.12.12.2
S 172.16.4.0 [1/0] via 12.12.12.2
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S 192.168.2.0/24 [1/0] via 12.12.12.2
R1#
Dari output command static routing yang kita inputkan diatas, akan tampil kode S di routing table,
artinya routing yang aktif yaitu static routing.
S 192.168.2.0/24 [1/0] via 12.12.12.2
Penjelasan baris routing table diatas:
Dari output routing table diatas, dibagi menjadi 4 kolom :
 Kolom 1 = S : kode static routing, untuk menuju network destination digunakan static
routing, atau routing protocol yang aktif di routing table adalah static routing.
 Kolom 2 = 192.168.2.0/24 : network destination, alamat network destination yang akan
dituju oleh router. Network destination tampil di routing table setelah kita mengaktifkan
routing protocol.
 Kolom 3 = [1/0] : 1 menyatakan nilai Administrative Distance (AD), 0 menyatakan nilai
metric.
 Kolom 4 = via 12.12.12.2 : next-hop ip address yang akan digunakan oleh router local untuk
memforward paket ke network destination
Administrative Distance (AD) menyatakan tingkat prioritas routing protocol ketika router
menjalankan lebih dari satu routing protocol secara bersamaan. AD dengan nilai terkecil yang akan
di pilih oleh router. Misalkan kita mengaktifkan protocol routing dynamic OSPF dan RIP, maka yang
akan dipilih oleh router yaitu OSPF karena memiliki nilai AD lebih kecil (110), sedangkan RIP
memiliki nilai AD lebih besar (120).
Metric menyatakan nilai dari hasil perhitungan routing protocol. Untuk RIP, metric terbaik dinilai
dari hop terkecil, sehingga path (jalur) terbaik menurut RIP yaitu route dengan jumlah hop terkecil.
AD untuk membandingkan prioritas routing protocol yang satu dengan yang lainnya, sedangkan
Metric untuk membandingkan value (nilai perhitungan) di dalam routing protocol tertentu.
Ping dari Laptop1 ke Laptop2
Laptop1>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time=1ms TTL=126
Reply from 192.168.2.1: bytes=32 time=0ms TTL=126
Reply from 192.168.2.1: bytes=32 time=0ms TTL=126
Reply from 192.168.2.1: bytes=32 time=1ms TTL=126
Ping statistics for 192.168.2.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
Ping berhasil dari Laptop1 ke Laptop2.
Tampilkan routing table R2
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet1/0
172.16.0.0/24 is subnetted, 4 subnets
S 172.16.1.0 [1/0] via 12.12.12.1
S 172.16.2.0 [1/0] via 12.12.12.1
C 172.16.3.0 is directly connected, Loopback0
C 172.16.4.0 is directly connected, Loopback1
S 192.168.1.0/24 [1/0] via 12.12.12.1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
Ping dari Laptop2 ke Laptop1
Laptop2>ping 192.168.1.1
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=1ms TTL=126
Reply from 192.168.1.1: bytes=32 time=0ms TTL=126
Reply from 192.168.1.1: bytes=32 time=12ms TTL=126
Reply from 192.168.1.1: bytes=32 time=10ms TTL=126
Ping statistics for 192.168.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 12ms, Average = 5ms
Lakukan trace route dari Laptop1 ke Laptop2
Untuk mengetahui jalur mana yang dilewati, bisa kita cek dengan command tracert di Laptop.
Laptop1>tracert 192.168.2.1
Tracing route to 192.168.2.1 over a maximum of 30 hops:
1 7 ms 1 ms 0 ms 192.168.1.254
2 0 ms 0 ms 0 ms 12.12.12.2
3 1 ms 0 ms 0 ms 192.168.2.1
Trace complete.
Dari output diatas, untuk menuju Laptop2 dari Laptop1 melewati 3 hop.
Note: ulangi langkah yang sama diatas untuk traceroute dari Laptop2 ke Laptop1.
192.168.1.254 12.12.12.2
Note: ulangi langkah yang sama diatas untuk traceroute dari Laptop2 ke Laptop1.

Semoga Bermanfaat :)

Tidak ada komentar:

Posting Komentar