networking:cisco:static-routing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
networking:cisco:static-routing [2026/02/04 00:27] – created ilyasanetworking:cisco:static-routing [2026/02/04 15:05] (current) – [Topologi] ilyasa
Line 1: Line 1:
 {{indexmenu_n>050}} {{indexmenu_n>050}}
-====== Cisco : Static Routing [U] ====== +====== Cisco : Static Routing ====== 
-Desciption+Static routing ialah sebuah konsep jaringan yang penting yang melibatkan konfigurasi rute secara manual pada router. Rute ini mengarahkan perutean ke tujuan jaringan tertentu dan memiliki administrative distance (AD) 1, yang menjadikannya sangat tepercaya, nomor dua setelah rute yang terhubung secara langsung AD 0. 
 ===== Syntax ===== ===== Syntax =====
-==== Some acction ==== 
-^ Command ^ Description ^ 
-| ''S1(config)#vlan [vlan-ID]'' | Membuat VLAN baru dan menetapkan nomor VLAN | 
-| ''S1(config-vlan)#name [name]'' | Memberikan nama pada VLAN | 
-Contoh: 
 <code> <code>
-vlan 10 +R1(config)#ip route [network-address] [subnet-mask] ([next-hop-ip] [exit-int])
- name VLAN-10 +
-vlan 20 +
- name VLAN-20 +
-vlan 99 +
- name VLAN-Management+
 </code> </code>
 +  * network-address: Network Tujuan
 +  * subnet-mask: subnet mask network tujuan
 +  * next-hop-ip: IP address  dari next hop network tujuan.
 +  * exit-int: interface dari next hop network tujuan.
 +
 +==== Tipe static route ====
 +  * **Default Static Route**
 +<code>
 +R1(config)#ip route 0.0.0.0 0.0.0.0 ([next-hop-ip] [exit-int])
 +</code>
 +Default route statis digunakan ketika tidak ada route lain yang cocok dengan alamat IP tujuan. Ini akan menjadi rute pilihan terakhir.
 +
 +  * **Floating static route**
 +<code>
 +R1(config)#ip route [network-address] [subnet-mask] ([next-hop-ip] [exit-int]) [AD]
 +</code>
 +Floating static route adalah rute cadangan dengan administrative distance yang lebih tinggi, sehingga membuatnya jadi rute cadangan jika rute utama gagal.
 +
  
 ===== Topologi ===== ===== Topologi =====
-Gambar topology +{{ :networking:cisco:cisco_static-routing.png?nolink |}} 
-Goals Topology+ 
 +Hubungkan semua segment dengan hanya static routing
 ===== Konfigurasi ===== ===== Konfigurasi =====
-  * **Step 1 Pembuatan VLANs**+  * **R1 Tambah static route ke 192.168.13.0/24,192.168.2.0/24**
 <code> <code>
-Switch(config)#vlan 10 +R1(config)#ip route 192.168.13.0 255.255.255.0 192.168.12.2 
-Switch(config-vlan)#name BIRU +R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.12.2 
-Switch(config-vlan)#exit+</code> 
 +  * **R1 : Tambah static route ke 192.168.1.0/24,192.168.2.0/24** 
 +<code> 
 +R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.12.1 
 +R2(config)#ip route 192.168.2.0 255.255.255.0 192.168.13.1 
 +</code> 
 +  * **R3 : Tambah static route ke 192.168.1.0/24,192.168.12.0/24** 
 +<code> 
 +R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.13.2 
 +R3(config)#ip route 192.168.12.0 255.255.255.0 192.168.13.2 
 +</code> 
 +===== Testing ===== 
 +* **Route tables R1** 
 +<code> 
 +R1#show ip route 
 +Codes: L - local, C - connected, S - static, 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
  
-Switch(config)#vlan 20 +     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks 
-Switch(config-vlan)#name MAGENTA +C       192.168.1.0/24 is directly connected, GigabitEthernet0/1 
-Switch(config-vlan)#exit+L       192.168.1.1/32 is directly connected, GigabitEthernet0/
 +S    192.168.2.0/24 [1/0] via 192.168.12.2 
 +     192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks 
 +C       192.168.12.0/24 is directly connected, GigabitEthernet0/
 +L       192.168.12.1/32 is directly connected, GigabitEthernet0/
 +S    192.168.13.0/24 [1/0] via 192.168.12.2
 </code> </code>
-  * **Step 2 : Assign VLANs ke Ports**+ 
 +* **Route tables R2**
 <code> <code>
-Switch(config)#interface f0/+R1#show ip route 
-Switch(config-if)#switchport mode access  +Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP 
-Switch(config-if)#switchport access vlan 10 +       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
-Switch(config-if)#exit+       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
  
-Switch(config)#interface f0/2 +Gateway of last resort is not set 
-Switch(config-if)#switchport mode access  + 
-Switch(config-if)#switchport access vlan 10 +     192.168.1.0/24 is variably subnetted, subnets, 2 masks 
-Switch(config-if)#exit+C       192.168.1.0/24 is directly connected, GigabitEthernet0/1 
 +L       192.168.1.1/32 is directly connected, GigabitEthernet0/1 
 +S    192.168.2.0/24 [1/0] via 192.168.12.2 
 +     192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks 
 +C       192.168.12.0/24 is directly connected, GigabitEthernet0/
 +L       192.168.12.1/32 is directly connected, GigabitEthernet0/
 +S    192.168.13.0/24 [1/0] via 192.168.12.2
 </code> </code>
 +* **Route tables R3**
 +<code>
 +R3#show ip route
 +Codes: L - local, C - connected, S - static, 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
  
-===== Testing =====+Gateway of last resort is not set 
 + 
 +S    192.168.1.0/24 [1/0] via 192.168.13.2 
 +     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks 
 +C       192.168.2.0/24 is directly connected, GigabitEthernet0/
 +L       192.168.2.1/32 is directly connected, GigabitEthernet0/
 +S    192.168.12.0/24 [1/0] via 192.168.13.2 
 +     192.168.13.0/24 is variably subnetted, 2 subnets, 2 masks 
 +C       192.168.13.0/24 is directly connected, GigabitEthernet0/
 +L       192.168.13.1/32 is directly connected, GigabitEthernet0/
 +</code> 
 +* **Test Ping PC to PC** 
 + 
 +<code> 
 +C:\>ping 192.168.2.2 
 + 
 +Pinging 192.168.2.2 with 32 bytes of data: 
 + 
 +Reply from 192.168.2.2: bytes=32 time<1ms TTL=125 
 +Reply from 192.168.2.2: bytes=32 time<1ms TTL=125 
 +Reply from 192.168.2.2: bytes=32 time<1ms TTL=125 
 +Reply from 192.168.2.2: bytes=32 time<1ms TTL=125 
 + 
 +Ping statistics for 192.168.2.2: 
 +    Packets: Sent 4, Received 4, Lost = 0 (0% loss), 
 +Approximate round trip times in milli-seconds: 
 +    Minimum = 0ms, Maximum = 0ms, Average = 0ms 
 +</code>
  • networking/cisco/static-routing.1770139678.txt.gz
  • Last modified: 2026/02/04 00:27
  • by ilyasa