Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| networking:cisco:ospf-1a [2026/02/04 00:30] – created ilyasa | networking:cisco:ospf-1a [2026/02/04 16:25] (current) – [Konfigurasi] ilyasa | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{indexmenu_n> | + | {{indexmenu_n> |
| - | ====== Cisco : Dynamic routing - OSPF (single area) [U] ====== | + | ====== Cisco : Dynamic routing - OSPF (single area) ====== |
| - | Desciption | + | Open Shortest Path First (OSPF) adalah protokol gateway interior (IGP) yang digunakan secara luas untuk melakukan routing paket-paket IP dalam satu sistem otonom (AS) dalam jaringan IP. OSPF dirancang untuk menghitung jalur terpendek secara efisien untuk paket data yang bergerak dari sumber ke tujuan. |
| ===== Syntax ===== | ===== Syntax ===== | ||
| - | ==== Some acction | + | |
| - | ^ Command ^ Description ^ | + | ==== Konfigurasi OSPF ==== |
| - | | '' | + | |
| - | | '' | + | ^Command |
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| + | <WRAP center round tip 90%> | ||
| + | | ||
| + | ProTip: Begaimana cara mengetahui network yang terhubung langsung dengan router?\\ | ||
| + | apat diketahu dengan '' | ||
| + | </ | ||
| + | |||
| + | ==== OSPF verification ==== | ||
| + | |||
| + | ^Command | ||
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| Contoh: | Contoh: | ||
| < | < | ||
| - | vlan 10 | + | router ospf 1 |
| - | name VLAN-10 | + | network X.X.X.0 0.0.0.255 area 0 |
| - | vlan 20 | + | network Y.Y.Y.0 0.0.0.3 area 0 |
| - | name VLAN-20 | + | |
| - | vlan 99 | + | |
| - | name VLAN-Management | + | |
| </ | </ | ||
| + | |||
| ===== Topologi ===== | ===== Topologi ===== | ||
| - | Gambar topology | + | {{ : |
| - | Goals Topology | + | <hidden Konfigurasi IP> |
| + | * **R1 : Konfigurasi IP** | ||
| + | <code js> | ||
| + | R1(config)# | ||
| + | R1(config-if)# | ||
| + | R1(config-if)# | ||
| + | R1(config-if)# | ||
| + | R1(config)# | ||
| + | R1(config-if)# | ||
| + | R1(config-if)# | ||
| + | R1(config-if)# | ||
| + | R1(config)# | ||
| + | R1(config-if)# | ||
| + | R1(config-if)# | ||
| + | R1(config-if)# | ||
| + | </ | ||
| + | * **R2 : Konfigurasi IP** | ||
| + | <code js> | ||
| + | R2(config)# | ||
| + | R2(config-if)# | ||
| + | R2(config-if)# | ||
| + | R2(config-if)# | ||
| + | R2(config)# | ||
| + | R2(config-if)# | ||
| + | R2(config-if)# | ||
| + | R2(config-if)# | ||
| + | R2(config)# | ||
| + | R2(config-if)# | ||
| + | R2(config-if)# | ||
| + | </ | ||
| + | * **R3 : Konfigurasi IP** | ||
| + | <code js> | ||
| + | R3(config)# | ||
| + | R3(config-if)# | ||
| + | R3(config-if)# | ||
| + | R3(config-if)# | ||
| + | R3(config)# | ||
| + | R3(config-if)# | ||
| + | R3(config-if)# | ||
| + | R3(config-if)# | ||
| + | R3(config)# | ||
| + | R3(config-if)# | ||
| + | R3(config-if)# | ||
| + | </ | ||
| + | * **PCs : Konfigurasi IP** | ||
| + | {{ : | ||
| + | ^PC ^IP Address ^Subnet Mask ^Gateway | ||
| + | | PC1 | 192.168.1.2 | 255.255.255.0 | 192.168.1.1 | | ||
| + | | PC2 | 192.168.2.2 | 255.255.255.0 | 192.168.2.1 | | ||
| + | | PC3 | 192.168.3.2 | 255.255.255.0 | 192.168.3.1 | | ||
| + | </ | ||
| + | |||
| + | Hubungkan semua segment jaringan hanya dengan ospf dan hanya menggunakan single area | ||
| ===== Konfigurasi ===== | ===== Konfigurasi ===== | ||
| - | * **Step 1 : Pembuatan VLANs** | + | * **R1 : Konfigurasi OSFP** |
| < | < | ||
| - | Switch(config)#vlan 10 | + | R1(config)#router ospf 1 |
| - | Switch(config-vlan)#name BIRU | + | R1(config-router)# |
| - | Switch(config-vlan)#exit | + | R1(config-router)# |
| + | R1(config-router)#network 10.0.1.0 0.0.0.3 area 0 | ||
| + | </ | ||
| + | * **R2 : Konfigurasi OSFP** | ||
| + | < | ||
| + | R2(config)# | ||
| + | R2(config-router)#network 192.168.2.0 0.0.0.255 area 0 | ||
| + | R2(config-router)# | ||
| + | R2(config-router)# | ||
| + | </ | ||
| + | * **R3 : Konfigurasi OSFP** | ||
| + | < | ||
| + | R3(config)# | ||
| + | R3(config-router)# | ||
| + | R3(config-router)# | ||
| + | R3(config-router)# | ||
| + | </ | ||
| + | ===== Testing ===== | ||
| + | ===== Testing ===== | ||
| + | * **Route tables 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 | ||
| - | Switch(config)# | + | |
| - | Switch(config-vlan)# | + | C |
| - | Switch(config-vlan)# | + | C |
| + | O | ||
| + | | ||
| + | C 192.168.1.0/ | ||
| + | O 192.168.2.0/ | ||
| + | O 192.168.3.0/ | ||
| </ | </ | ||
| - | | + | |
| + | * **Route tables R2** | ||
| < | < | ||
| - | Switch(config)#interface f0/1 | + | R2#show ip route |
| - | Switch(config-if)# | + | Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP |
| - | Switch(config-if)# | + | 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)# | + | Gateway of last resort is not set |
| - | Switch(config-if)# | + | |
| - | Switch(config-if)# | + | |
| - | Switch(config-if)# | + | C |
| + | O | ||
| + | | ||
| + | C | ||
| + | O 192.168.1.0/ | ||
| + | C 192.168.2.0/ | ||
| + | O 192.168.3.0/ | ||
| </ | </ | ||
| + | * **Route tables R3** | ||
| + | < | ||
| + | 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 | ||
| - | ===== Testing | + | Gateway of last resort is not set |
| + | |||
| + | | ||
| + | O | ||
| + | | ||
| + | C | ||
| + | C | ||
| + | O 192.168.1.0/ | ||
| + | O 192.168.2.0/ | ||
| + | C 192.168.3.0/ | ||
| + | </ | ||
| + | * **Test Ping PC to PC** | ||
| + | |||
| + | < | ||
| + | C:\>ping 192.168.2.2 | ||
| + | |||
| + | Pinging 192.168.2.2 with 32 bytes of data: | ||
| + | |||
| + | Reply from 192.168.2.2: | ||
| + | Reply from 192.168.2.2: | ||
| + | Reply from 192.168.2.2: | ||
| + | Reply from 192.168.2.2: | ||
| + | |||
| + | Ping statistics for 192.168.2.2: | ||
| + | Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), | ||
| + | Approximate round trip times in milli-seconds: | ||
| + | Minimum = 22ms, Maximum = 32ms, Average = 27ms | ||
| + | |||
| + | C:\>ping 192.168.3.2 | ||
| + | |||
| + | Pinging 192.168.3.2 with 32 bytes of data: | ||
| + | |||
| + | Reply from 192.168.3.2: | ||
| + | Reply from 192.168.3.2: | ||
| + | Reply from 192.168.3.2: | ||
| + | Reply from 192.168.3.2: | ||
| + | |||
| + | Ping statistics for 192.168.3.2: | ||
| + | Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), | ||
| + | Approximate round trip times in milli-seconds: | ||
| + | Minimum = 13ms, Maximum = 22ms, Average = 15ms | ||
| + | </ | ||