Daftar Pertemuan
OSPF Tips
- Router ID = Highest IP atau manual
- Area 0 = Backbone area
- Hello Interval = 10s (Broadcast)
- Dead Interval = 40s (4x Hello)
OSPF Neighbor States
Pertemuan 5: OSPF Single-Area
Bobot: 10%Tujuan Pembelajaran
Setelah menyelesaikan praktikum ini, mahasiswa mampu:
- Memahami konsep dan arsitektur OSPF sebagai link-state routing protocol
- Mengkonfigurasi OSPF single-area pada router Cisco
- Memverifikasi OSPF neighbor adjacency dan routing table
- Melakukan optimasi dan troubleshooting OSPF operation
Materi Teori - OSPF Fundamentals
1. Konsep Dasar OSPF
Open Shortest Path First (OSPF) adalah link-state routing protocol yang menggunakan algoritma Dijkstra untuk menghitung shortest path tree. OSPF merupakan open standard (RFC 2328) dan widely deployed dalam enterprise networks.
- Classless: Mendukung VLSM dan CIDR
- Fast Convergence: Triggered updates
- Scalable: Hierarchical design dengan areas
- Secure: Mendukung authentication
- Efficient: Menggunakan multicast untuk updates
OSPF menggunakan cost sebagai metric yang dihitung berdasarkan bandwidth:
Default Reference Bandwidth: 100 Mbps
Ethernet (100Mbps): 100/100 = 1
FastEthernet (100Mbps): 100/100 = 1
Serial (1.544Mbps): 100/1.544 ≈ 64
2. OSPF Packet Types
OSPF menggunakan lima jenis packet untuk membentuk dan memelihara neighbor relationships:
Discover/maintain neighbors
Interval: 10/30s
Database Description
Master/Slave election
Link State Request
During loading state
Link State Update
Response to LSR
Link State Acknowledgment
Reliable flooding
3. OSPF Neighbor Formation Process
OSPF neighbors melewati beberapa state sebelum mencapai full adjacency:
Down
Init
2-Way
ExStart
Exchange
Loading
Full
DR/BDR Election Process:
- Priority: Higher priority wins (default: 1)
- Router ID: Higher Router ID breaks ties
- DR: Designated Router untuk segment
- BDR: Backup Designated Router
- DROTHER: Non-DR/BDR routers
Election Rules:
2. Highest Router ID
3. Tidak preempt (setelah terpilih)
Broadcast Networks:
- DR/BDR election required
Point-to-Point:
- No DR/BDR election
4. OSPF Network Types
OSPF berperilaku berbeda berdasarkan jenis network yang digunakan:
| Network Type | DR/BDR Election | Hello Interval | Adjacency | Example |
|---|---|---|---|---|
| Broadcast | Yes | 10 seconds | DR/BDR dengan semua | Ethernet, LAN |
| Point-to-Point | No | 10 seconds | Full dengan neighbor | Serial, PPP |
| Point-to-Multipoint | No | 30 seconds | Full dengan semua | Frame Relay |
| NBMA | Yes | 30 seconds | DR/BDR dengan semua | Frame Relay |
5. OSPF LSA Types
Link State Advertisements (LSA) adalah building blocks dari OSPF database:
| LSA Type | Name | Description | Generated By |
|---|---|---|---|
| Type 1 | Router LSA | Intra-area routes | All routers |
| Type 2 | Network LSA | DR's connected routers | DR only |
| Type 3 | Summary LSA | Inter-area routes | ABR |
| Type 4 | ASBR Summary | ASBR location | ABR |
| Type 5 | AS External | External routes | ASBR |
Job Sheet Praktikum
Informasi Job Sheet
Konfigurasi OSPF single-area
Cisco Packet Tracer
10%
Unjuk Kerja
Diagram Topologi OSPF Single-Area
LAN 1 - Router 1
OSPF Single-Area
LAN 2 - Router 2
Keterangan Topologi:
- 2 Router Cisco 2911 dengan koneksi serial
- Router 1: Terhubung ke 2 LAN segments
- Router 2: Terhubung ke 2 LAN segments
- WAN Link: Serial connection point-to-point
- Area 0: Single-area OSPF configuration
- Process ID 1: OSPF process number
- Router IDs: Manual configuration
- Network Types: Broadcast (LAN), Point-to-Point (WAN)
IP Addressing Plan
| Device | Interface | IP Address | Subnet Mask | Description |
|---|---|---|---|---|
| Router 1 | GigabitEthernet 0/0 | 192.168.10.1 | 255.255.255.0 | LAN 1 - VLAN 10 |
| GigabitEthernet 0/1 | 192.168.20.1 | 255.255.255.0 | LAN 2 - VLAN 20 | |
| Serial 0/0/0 | 10.0.0.1 | 255.255.255.252 | WAN Link to Router 2 | |
| Router 2 | GigabitEthernet 0/0 | 192.168.30.1 | 255.255.255.0 | LAN 3 - VLAN 30 |
| GigabitEthernet 0/1 | 192.168.40.1 | 255.255.255.0 | LAN 4 - VLAN 40 | |
| Serial 0/0/0 | 10.0.0.2 | 255.255.255.252 | WAN Link to Router 1 | |
| PC1 | Ethernet | 192.168.10.10 | 255.255.255.0 | Gateway: 192.168.10.1 |
| PC2 | Ethernet | 192.168.20.10 | 255.255.255.0 | Gateway: 192.168.20.1 |
| PC3 | Ethernet | 192.168.30.10 | 255.255.255.0 | Gateway: 192.168.30.1 |
| PC4 | Ethernet | 192.168.40.10 | 255.255.255.0 | Gateway: 192.168.40.1 |
OSPF Configuration Plan
| Parameter | Router 1 | Router 2 | Keterangan |
|---|---|---|---|
| OSPF Process ID | 1 | 1 | Harus sama untuk adjacency |
| Router ID | 1.1.1.1 | 2.2.2.2 | Manual configuration |
| Area | 0 | 0 | Single-area design |
| Networks | 192.168.10.0/24 192.168.20.0/24 10.0.0.0/30 |
192.168.30.0/24 192.168.40.0/24 10.0.0.0/30 |
Network statements dengan wildcard |
| Hello/Dead Timers | Default (10/40s) | Default (10/40s) | Point-to-point: 10/40s |
Langkah Kerja Detail
Buat topologi dan konfigurasi IP address pada semua devices:
Router 1 Configuration:
configure terminal
hostname R1-OSPF
interface gigabitethernet 0/0
ip address 192.168.10.1 255.255.255.0
no shutdown
exit
interface gigabitethernet 0/1
ip address 192.168.20.1 255.255.255.0
no shutdown
exit
interface serial 0/0/0
ip address 10.0.0.1 255.255.255.252
clock rate 64000 ! DCE side
no shutdown
exit
Router 2 Configuration:
configure terminal
hostname R2-OSPF
interface gigabitethernet 0/0
ip address 192.168.30.1 255.255.255.0
no shutdown
exit
interface gigabitethernet 0/1
ip address 192.168.40.1 255.255.255.0
no shutdown
exit
interface serial 0/0/0
ip address 10.0.0.2 255.255.255.252
no shutdown
exit
Pastikan:
- Semua interfaces dalam status up/up
- Clock rate dikonfigurasi pada DCE side
- Basic connectivity antara adjacent devices
- PCs memiliki default gateway yang benar
Konfigurasi OSPF process dan advertise networks di Router 1:
configure terminal
! Aktifkan OSPF dengan process ID 1
router ospf 1
! Konfigurasi Router ID manual
router-id 1.1.1.1
! Advertise networks ke OSPF
! Format: network [address] [wildcard] area [area-id]
network 10.0.0.0 0.0.0.3 area 0
network 192.168.10.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
! Keluar dari mode OSPF
exit
! Verifikasi konfigurasi
show ip protocols
show running-config | section router ospf
Wildcard Mask Explanation:
| Network | Subnet Mask | Wildcard Mask | Explanation |
|---|---|---|---|
| 10.0.0.0/30 | 255.255.255.252 | 0.0.0.3 | Inverse of subnet mask |
| 192.168.10.0/24 | 255.255.255.0 | 0.0.0.255 | Matches entire /24 network |
| 192.168.20.0/24 | 255.255.255.0 | 0.0.0.255 | Matches entire /24 network |
Konfigurasi OSPF process dan advertise networks di Router 2:
configure terminal
! Aktifkan OSPF dengan process ID 1
router ospf 1
! Konfigurasi Router ID manual
router-id 2.2.2.2
! Advertise networks ke OSPF
network 10.0.0.0 0.0.0.3 area 0
network 192.168.30.0 0.0.0.255 area 0
network 192.168.40.0 0.0.0.255 area 0
! Keluar dari mode OSPF
exit
! Verifikasi konfigurasi
show ip protocols
show running-config | section router ospf
OSPF Network Statements:
- Process ID: Hanya significant locally, tidak perlu sama antar router
- Area ID: Harus sama untuk membentuk adjacency
- Wildcard Mask: Inverse dari subnet mask (0=match, 1=ignore)
- Network Command: Mengaktifkan OSPF pada interfaces yang match
Lakukan verifikasi untuk memastikan OSPF beroperasi dengan benar:
OSPF Neighbor Verification:
show ip ospf neighbor
show ip ospf interface
show ip ospf interface brief
! Expected Output:
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/ - 00:00:39 10.0.0.2 Serial0/0/0
OSPF Routes Verification:
show ip route ospf
show ip route
! Expected Output:
Codes: O - OSPF
O 192.168.30.0/24 ...
O 192.168.40.0/24 ...
! O = OSPF routes
OSPF Database Verification:
show ip ospf database router
show ip ospf database network
! Perhatikan LSA types:
- Type 1: Router LSA
- Type 2: Network LSA
Interface Verification:
show ip ospf interface gigabitethernet 0/0
! Perhatikan:
- Network Type
- Cost
- Hello/Dead Timers
- Neighbor Count
Test konektivitas end-to-end untuk memverifikasi OSPF routing:
Testing dari PC1:
ping 192.168.20.10 ! Local LAN - Should SUCCESS
ping 192.168.30.10 ! Remote LAN - Should SUCCESS
ping 192.168.40.10 ! Remote LAN - Should SUCCESS
ping 10.0.0.2 ! Router 2 WAN - Should SUCCESS
! Trace route untuk path verification
tracert 192.168.30.10
tracert 192.168.40.10
Expected Results:
- Local LAN: Direct connectivity ✓
- Remote LANs: OSPF routing ✓
- WAN Link: Direct connectivity ✓
- Traceroute: Shows path melalui OSPF ✓
Routing Table Check:
O 192.168.30.0/24 ...
[110/65] via 10.0.0.2
O 192.168.40.0/24 ...
[110/65] via 10.0.0.2
Konfigurasi optimasi OSPF untuk performance dan management:
Router ID Modification:
router ospf 1
router-id 1.1.1.1 ! Pada Router1
exit
router ospf 1
router-id 2.2.2.2 ! Pada Router2
exit
! Restart OSPF process untuk apply changes
clear ip ospf process
Cost Adjustment:
interface gigabitethernet 0/0
ip ospf cost 10
exit
! Verifikasi perubahan cost
show ip ospf interface gigabitethernet 0/0
Passive Interface:
router ospf 1
passive-interface gigabitethernet 0/0
passive-interface gigabitethernet 0/1
exit
! Verifikasi
show ip ospf interface brief
Verification Commands:
show ip route ospf
show ip ospf interface
show ip protocols
Gunakan troubleshooting commands jika ada issues dengan OSPF:
Debug Commands:
debug ip ospf events
debug ip ospf packet
debug ip ospf adj
! Turn off debug
undebug all
! Show OSPF statistics
show ip ospf statistics
Common Issues:
- Adjacency tidak terbentuk: Cek area ID, hello/dead timers
- Routes tidak muncul: Verifikasi network statements
- Interface tidak aktif: Cek interface status dan IP addresses
- Authentication failed: Pastikan authentication configuration match
Troubleshooting Checklist:
2. Verifikasi IP addressing
3. Pastikan network statements correct
4. Cek area configuration match
5. Verifikasi interface OSPF enabled
6. Check for ACL blocking OSPF (224.0.0.5/6)
Kriteria Penilaian
| Kriteria | Indikator | Bobot | Status |
|---|---|---|---|
| IP Addressing | IP address terkofigurasi dengan benar pada semua interfaces | 2.0% | Check |
| OSPF Configuration | OSPF process, router ID, dan network statements benar | 3.0% | Check |
| OSPF Adjacency | Neighbor adjacency mencapai state FULL | 2.5% | Check |
| Routing Table | OSPF routes muncul di routing table dengan benar | 1.5% | Check |
| End-to-End Connectivity | Konektivitas berhasil antara semua networks | 1.0% | Check |
| Total | 10% | Complete | |
Tips dan Best Practices OSPF
- Gunakan OSPF authentication (plain text atau MD5) untuk mencegah routing attacks
- Implementasi passive interfaces untuk mencegah unnecessary OSPF hellos pada LAN segments
- Gunakan ACL untuk membatasi OSPF peer relationships
- Monitor OSPF adjacency changes dengan logging
- Selalu konfigurasi manual Router ID daripada mengandalkan automatic selection
- Gunakan wildcard masks yang tepat dalam network statements
- Documentasikan OSPF area design dan network summarization points
- Test OSPF convergence setelah perubahan configuration
Common OSPF Issues and Solutions:
- Adjacency stuck in INIT/2-Way: Cek MTU mismatch atau authentication
- Routes missing: Verifikasi network statements dan area configuration
- High CPU utilization: Cek untuk OSPF flooding atau large LSDB
- Network flapping: Monitor interface stability dan OSPF timers