* Tujuan
- setting static default router
* Konsep Dasar
- static default route adalah static route dengan network address destination 0.0.0.0 dan subnet mask 0.0.0.0 dikenal sebagai "quad zero" route. Static default route melakukan indentifikasi gateway yang akan digunakan oleh routing table, sehingga akan di forward ke route 0.0.0.0/0.
untuk konfigurasi static default route dapat menggunakan next-hop ip address atau exit-interface.
Router(config)# ip route 0.0.0.0 0.0.0.0 {ip-address or exit-intf}
static default route:
- default route dapat digunakan ketika network destination tidak diketahui (internet)
- default route dapat digunakan ketika hanya ada satu jalur keluar untuk semua network destination
- dapat mengurangi ukuran routing table
- jika tidak menemukan entry network destination di routing table, maka router akan memforward paket ke default route.
- menjadi route pilihan terakhir di routing table.
* Konfigurasi
Login console ke R1 atau R2 untuk memperaktikan Lab-5 static default route.
Setelah mengerjakan lab 4, gunakan topologi lab 4 beserta solutionnya untuk memperaktikan lab 5
Untuk mensimulasikan default route di R1,hapus terlebih dahulu static route di R1 sedangkan R2 masih seperti semula. Setelah disetting static default route di R1 kemudian tes ping dari Laptop 1 ke 2. dan juga sebaliknya, untuk mencoba default route di R2, hapus static route di R2 dan setting ulang static route di R1 seperti di lab 4. Kemudian tes ping dari Laptop 2 ke 1.
Hapus Static Route di R1
R1(config)#
R1(config)#no ip route 192.168.2.0 255.255.255.0 12.12.12.2
R1(config)#no ip route 172.16.3.0 255.255.255.0 12.12.12.2
R1(config)#no ip route 172.16.4.0 255.255.255.0 12.12.12.2
R1(config)#
Setting Static Route Di R1
command untuk mensetting static default route menggunakan next-hop ip address
R1(config)#
R1(config)# ip route 0.0.0.0 0.0.0.0 12.12.12.2
R1(config)#
command untuk mensetting static default route menggunakan exit-interface
R1(config)#
R1(config)# ip route 0.0.0.0 0.0.0.0 fa1/0
R1(config)#
Pilih salah satu command diatas apakah ingin menggunakan next-hop ip address atau exit-interface
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 12.12.12.2 to network 0.0.0.0
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
S* 0.0.0.0/0 [1/0] via 12.12.12.2
Tanda S* menandakan static route.setiap network destination yang tidak diketahui dirouting table akan diforward ke 12.12.12.2. Lihat juga pada bagian Gateway of last resort yang menyatakan bahwa untuk menuju network 0.0.0.0 gunakan gatewaynya 12.12.12.2.
Tes 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=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
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
Traceroute dari laptop 1 ke laptop 2
Laptop1>tracert 192.168.2.1
Tracing route to 192.168.2.1 over a maximum of 30 hops:
1 1 ms 0 ms 0 ms 192.168.1.254
2 0 ms 0 ms 0 ms 12.12.12.2
3 0 ms 0 ms 0 ms 192.168.2.1
Trace complete.
Lab static default route R1 sudah berhasil. konfigurasi eksisting saat ini R1 menggunakan static default route dan R2 menggunakan static route.
Tampilan routing table di 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
dari tampilan diatas dapat dilihat bahwa R2 menggunakan static route dengan kode S.
sedangkan di R1 static route dengan kode S*. perhatikan perbedaannya ada * di R1
sekarang kita akan mencoba static default route di R2, berarto R1 harus disetting static route terlebih dahulu dan hapus konfigurasi static default route yang ada. Cek kembali solution Lab 4
Hapus Static Route Di R1
command untuk mengahpus setting static default route menggunakan next-hop ip address.
R1(config)#
R1(config)#no ip route 0.0.0.0 0.0.0.0 12.12.12.2
R1(config)#
command untuk menghapus settingan static default route menggunakan exit-interface
R1(config)#
R1(config)#no ip route 0.0.0.0 0.0.0.0 fa1/0
R1(config)#
Setting Static Default Route 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)#
Sebelum melanjutkan langkah berikutnya, hapus terlebih dahulu static route di R2. Dan tampilkan
hasilnya menggunakan show ip route, pastikan hanya C saja yang masih ada di routing table R2.
Setting static default route di R2
Command untuk mensetting static default route menggunakan next-hop ip address.
R2(config)#
R2(config)# ip route 0.0.0.0 0.0.0.0 12.12.12.1
R2(config)#
Command untuk mensetting static default route menggunakan exit-interface
R2(config)#
R2(config)# ip route 0.0.0.0 0.0.0.0 fa1/0
R2(config)#
Pilih salah satu command diatas apakah ingin menggunakan next-hop ip address atau exit-
interface.
Tampilkan routing table di 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 12.12.12.1 to network 0.0.0.0
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.3.0 is directly connected, Loopback0
C 172.16.4.0 is directly connected, Loopback1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 12.12.12.1
R2#
Tanda S* menandakan static default route. Setiap network destination yang tidak diketahui
dirouting table akan diforward ke 12.12.12.1. Lihat juga pada bagian Gateway of last resort yang
menyatakan bahwa untuk menuju network 0.0.0.0 gunakan gatewaynya 12.12.12.1.
Tes 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=0ms TTL=126
Reply from 192.168.1.1: bytes=32 time=1ms TTL=126
Reply from 192.168.1.1: bytes=32 time=11ms TTL=126
Reply from 192.168.1.1: bytes=32 time=0ms 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 = 11ms, Average = 3ms
Traceroute dari Laptop2 ke Laptop1
Laptop2>tracert 192.168.1.1
Tracing route to 192.168.1.1 over a maximum of 30 hops:
1 1 ms 0 ms 0 ms 192.168.2.254
2 0 ms 0 ms 0 ms 12.12.12.1
3 1 ms 11 ms 11 ms 192.168.1.1
Trace complete.
Note: langkah diatas harus dijalankan secara bergantian agar bisa mensimulasikan static
default route di R1 maupun R2.
Verifikasi
Proses konfigurasi diatas sekaligus dilakukan proses verifikasi. Untuk melihat hasil settinggan,
gunakan command show running-config.
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 12.12.12.1 to network 0.0.0.0
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.3.0 is directly connected, Loopback3
C 172.16.4.0 is directly connected, Loopback4
C 192.168.2.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 12.12.12.1
Dari output diatas ditampilkan full routing table di R2. Jika ingin menampilkan misalnya yang
connected atau static saja, gunakan tambahan sub-command connected atau static.
Tampilkan routing table static R2
R2#show ip route static
S* 0.0.0.0/0 [1/0] via 12.12.12.1
R2#
Tampilkan routing table connected R2
R2#show ip route connected
C 12.12.12.0/24 is directly connected, FastEthernet1/0
C 172.16.3.0/24 is directly connected, Loopback3
C 172.16.4.0/24 is directly connected, Loopback4
C 192.168.2.0/24 is directly connected, FastEthernet0/0
R2#
Opsi menampilkan routing table
Ada beberapa pilihan untuk menampilkan routing table, apakah ingin menampilkan static saja atau
yang lainnya. Gunakan tanda ? untuk melihat opsi yang tersedia.
R2#show ip route ?
WORD Network to display information about or hostname
bgp Border Gateway Protocol (BGP)
connected Connected
eigrp Enhanced Interior Routing Protocol (EIGRP)
ospf Open Shortest Path First (OSPF)
rip Routing Information Protocol (RIP)
static Static routes
summary Summary of all routes
<cr>
R2#
selesai, sampai ketemu lagi di lab selanjutnya:)