Kamis, 21 April 2022

Lab 4. Static Routing

Disini ana tinggal menambahkan Lo1,2,3 dan 4. Lo 1&2 terletak pada router 1 dan Lo 3&4 terletak pada router 2 

interface                   ip address           subnetmask  

Lo 1                         172.16.1.1         255.255.255.0

Lo 2                         172.16.2.2         255.255.255.0

Lo 3                         172.16.3.3         255.255.255.0

Lo 4                         172.16.4.4         255.255.255.0

  

* TUJUAN
    setting static routing 

* KONSEP DASAR
   Routing
   - forwading 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
     - memiliki administrative distance 0 atau 1

* KONFIGURASI 
   login console ke R1 atau R2  untuk memperaktikan  lab4-static routing

setting interface loopback di R1
ketikan command berikut :

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 mempersentasikan sebuah subnet. Manfaat lain interface 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.


NOTE: Ulangi langkah diatas untuk membuat interface loopback pda R2.

TAMPILKAN INTERFACE YANG SUDAH DI SETTING DI R1

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 destinationn : 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 R1,untuk menuju network Fa0/0 R2,yang menjadi exit-interface yaitu interface Fa1/0 R1

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 di bawah ini, Tes ping antara laptop 1 dan laptop 2 pastikan berhasil. lakukan tracert dari laptop 1 untuk melihat router mana saja yang dilewati ketika menuju ke laptop 2.

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 di atas, 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 Distence (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. Misalnya 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 protocol routing protocol. untuk RIP, metric terbaik di nilai 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.

Cisco default administrative distances


Routing protocol or source                                        Administrative distance


Connected interface                                                                   0

Static route                                                                                 1

EIGRP summary route                                                               5

External BGP                                                                             20

Internal EIGRP                                                                          90

IGRP                                                                                        100

OSPF                                                                                        110

IS-IS                                                                                         115

RIP                                                                                           120

EGP                                                                                          140

ODR                                                                                         160

External EIGRP                                                                        170

Internal BGP                                                                             200

Unknown                                                                                   255


ping dari laptop 1 ke laptop 2

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 laptop 1 ke laptop 2

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

R2#

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 laptop 1 ke laptop 2
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 hop3.


NOTE : ULANGI LANGKAH-LANGKAH YANG SAMA DI ATAS UNTUK TRACEROUTE DARI LAPTOP2 KE LAPTOP1.

Tidak ada komentar:

Posting Komentar

Lab 10. ACL Extended