This is an old revision of the document!
Cisco : Dynamic routing - OSPF (single area)
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
Konfigurasi OSPF
| Command | Description |
|---|---|
R1(config)#router ospf [PID] | Process ID [PID] (1 - 65535) |
R1(config-router)#router-id [a.b.c.d] | menual mengatur router ID, dengan IPv4 format. |
R1(config-router)#network [network-address] [wildcard-mask] area [area id] | Untuk semua network yang terhubung langsung. Area ID 0 - 4294967295 |
area id dapat ditulis dengan format ip adress
ProTip: Begaimana cara mengetahui network yang terhubung langsung dengan router?
apat diketahu dengan R1(config)#do show ip route con command.
OSPF verification
| Command | Description |
|---|---|
R1#show ip protocols | PID, router ID, advertised networks, neighbors dan administrative distance. |
R1#show ip route | |
R1#show ip ospf neighbor | lis OSPF neighbor |
R1#show ip ospf | identify the PID, router ID, area information, dan waktu |
R1#show ip ospf interface brief | |
R1#show ip ospf interface | list ospf interfaces |
R1#show ip ospf interface [int-id] | Lebih detail |
Contoh:
router ospf 1 network X.X.X.0 0.0.0.255 area 0 network Y.Y.Y.0 0.0.0.3 area 0
Topologi
Hubungkan semua segment jaringan hanya dengan ospf dan hanya menggunakan single area
Konfigurasi
- R1 : Tambah static route ke 192.168.13.0/24,192.168.2.0/24
R1(config)#router ospf 1 R1(config-router)#network 192.168.1.0 0.0.0.255 area 0 R1(config-router)#network 10.0.0.0 0.0.0.3 area 0 R1(config-router)#network 10.0.1.0 0.0.0.3 area 0
- R1 : Tambah static route ke 192.168.1.0/24,192.168.2.0/24
R2(config)#router ospf 1 R2(config-router)#network 192.168.2.0 0.0.0.255 area 0 R2(config-router)#network 10.0.0.0 0.0.0.3 area 0 R2(config-router)#network 10.0.2.0 0.0.0.3 area 0
- R3 : Tambah static route ke 192.168.1.0/24,192.168.12.0/24
R3(config)#router ospf 1 R3(config-router)#network 192.168.3.0 0.0.0.255 area 0 R3(config-router)#network 10.0.1.0 0.0.0.3 area 0 R3(config-router)#network 10.0.2.0 0.0.0.3 area 0