RBJ
|
Title
|
:
|
Konfigurasi Routing OSPF Single Area
|
Issue Date
|
:
|
27 Oktober 2016
|
Prepare by
|
:
|
Agung
Ma’ruf
|
Teacher
|
:
|
Suyatno,
S.Kom
|
|
|
|
SMK AL-BAHRI KOTA BEKASI
|
Untuk mengkonfigurasikan OSPF pada router, langkah yang harus dilakukan relatif sama dengan routing protocol yang lain. Administrator jaringan hanya perlu mengaktfikan OSPF, kemudian meng-advertise network yang ingin diperkenalkan kepada router lain. Namun network yang di-advertise harus dimasukan ke dalam salah satu area OSPF. Jika hanya menerapkan Single Area OSPF, maka harus dibuat minimal satu Area yang dinamakan Backbone Area, atau Area 0.
Bila pada routing protocol lain, saat akan meng-advertise sebuah network address harus disertakan subnetmask atau prefix, maka pada Router Cisco advertise dilakukan dengan menyertakan wildcard (kebalikan dari bit subnetmask).
Topologi routing OSPF single area :
Berikut ini adalah cara konfigurasi OSPF single area :
R1 :
Router>en
Router#conf t
Enter configuration commands, one
per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int gi0/0
R1(config-if)#ip add 10.10.10.1
255.255.255.0
R1(config-if)#no sh
R1(config-if)#ex
R1(config)#int gi0/1
R1(config-if)#ip add 30.30.30.1
255.255.255.0
R1(config-if)#no sh
R1(config)#do wr
Building configuration...
[OK]
Konfigurasi
routing ospf single area R1 :
R1(config)#router ospf 1
R1(config-router)#network 10.10.10.0
0.0.0.255 area 0
R1(config-router)#network 30.30.30.0
0.0.0.255 area 0
R1(config-router)#do wr
Building configuration...
[OK]
R2 :
Router>en
Router#conf t
Enter configuration commands, one
per line. End with CNTL/Z.
Router(config)#int gi0/0
Router(config-if)#ip add 10.10.10.2 255.255.255.0
Router(config-if)#no sh
Router(config-if)#ex
Router(config)#int gi0/1
Router(config-if)#ip add 20.20.20.1
255.255.255.0
Router(config-if)#no sh
Router(config-if)#ex
Router(config)#int gi0/2
Router(config-if)#ip add 40.40.40.1
255.255.255.0
Router(config-if)#no sh
Router(config-if)#do wr
Building configuration...
[OK]
Konfigurasi
routing ospf single area R2 :
Router(config-if)#router ospf 1
Router(config-router)#network
40.40.40.0 0.0.0.255 area 0
Router(config-router)#network
10.10.10.0 0.0.0.255 area 0
Router(config-router)#network
20.20.20.0 0.0.0.255 area 0
Router(config-router)#do wr
Building configuration...
[OK]
R3 :
Router>en
Router#conf t
Router(config)#hostname R3
R3(config)#int gi0/0
R3(config-if)#ip add 20.20.20.2
255.255.255.0
R3(config-if)#no sh
R3(config-if)#ex
R3(config)#int gi0/1
R3(config-if)#ip add 50.50.50.1
255.255.255.0
R3(config-if)#no
sh
Konfigurasi
routing ospf single area R3:
R3(config-if)#router ospf 1
R3(config-router)#network 50.50.50.0
0.0.0.255 area 0
R3(config-router)#network 20.20.20.0
0.0.0.255 area 0
R3(config-router)#do wr
Building configuration...
[OK]
R1 Cek Table Routing :
R1(config)#do sh 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
10.0.0.0/8 is
variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24
is directly connected, GigabitEthernet0/0
L 10.10.10.1/32
is directly connected, GigabitEthernet0/0
20.0.0.0/24 is
subnetted, 1 subnets
O 20.20.20.0/24
[110/2] via 10.10.10.2, 00:00:58, GigabitEthernet0/0
30.0.0.0/8 is
variably subnetted, 2 subnets, 2 masks
C 30.30.30.0/24
is directly connected, GigabitEthernet0/1
L 30.30.30.1/32
is directly connected, GigabitEthernet0/1
40.0.0.0/24 is
subnetted, 1 subnets
O 40.40.40.0/24
[110/2] via 10.10.10.2, 00:05:34, GigabitEthernet0/0
50.0.0.0/24 is
subnetted, 1 subnets
O 50.50.50.0/24
[110/3] via 10.10.10.2, 00:00:48, GigabitEthernet0/0
R1 : Menampilkan Routing ospf
R1(config)#do sh ip route ospf
20.0.0.0/24 is
subnetted, 1 subnets
O 20.20.20.0
[110/2] via 10.10.10.2, 00:02:38, GigabitEthernet0/0
40.0.0.0/24 is
subnetted, 1 subnets
O 40.40.40.0
[110/2] via 10.10.10.2, 00:07:14, GigabitEthernet0/0
50.0.0.0/24 is
subnetted, 1 subnets
O 50.50.50.0
[110/3] via 10.10.10.2, 00:02:28, GigabitEthernet0/0
R1(config)#
R2 : Menampilkan Informasi Neighbor
Router(config-router)#do sh ip ospf
neighbor
Neighbor
ID Pri State Dead Time Address Interface
30.30.30.1 1
FULL/DR 00:00:36 10.10.10.1 GigabitEthernet0/0
50.50.50.1 1
FULL/BDR 00:00:39 20.20.20.2 GigabitEthernet0/1
R3 : Menampilkan Routing Protocol
R3(config-router)#do sh ip protocol
Routing
Protocol is "ospf 1"
Outgoing update
filter list for all interfaces is not set
Incoming update
filter list for all interfaces is not set
Router ID
50.50.50.1
Number of areas
in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for
Networks:
50.50.50.0
0.0.0.255 area 0
20.20.20.0
0.0.0.255 area 0
Routing
Information Sources:
Gateway Distance
Last Update
30.30.30.1 110
00:09:28
40.40.40.1 110
00:04:56
50.50.50.1 110
00:04:56
Distance:
(default is 110)
R3 : Menampilkan Informasi Database Ospf
R3(config-router)#do sh ip ospf
database
OSPF Router with
ID (50.50.50.1) (Process ID 1)
Router Link
States (Area 0)
Link ID ADV
Router Age Seq# Checksum Link count
30.30.30.1
30.30.30.1 633 0x80000003 0x007a78 2
50.50.50.1
50.50.50.1 361 0x80000003 0x00ee12 2
40.40.40.1
40.40.40.1 361 0x80000005 0x000605 3
Net Link States
(Area 0)
Link ID ADV
Router Age Seq# Checksum
10.10.10.1
30.30.30.1 633 0x80000001 0x004cdd
20.20.20.1
40.40.40.1 361 0x80000001 0x00d9ce
#. Test : Ping Dan Tracert
PC>ipconfig
FastEthernet0
Connection:(default port)
Link-local IPv6
Address.........: FE80::201:64FF:FE20:1A8B
IP
Address......................: 30.30.30.2
Subnet
Mask.....................: 255.255.255.0
Default
Gateway.................: 30.30.30.1
PC>ping 50.50.50.2
Pinging
50.50.50.2 with 32 bytes of data:
Request timed
out.
Reply from
50.50.50.2: bytes=32 time=98ms TTL=125
Reply from
50.50.50.2: bytes=32 time=44ms TTL=125
Reply from
50.50.50.2: bytes=32 time=11ms TTL=125
Ping statistics
for 50.50.50.2:
Packets: Sent =
4, Received = 3, Lost = 1 (25% loss),
Approximate
round trip times in milli-seconds:
Minimum = 11ms,
Maximum = 98ms, Average = 51ms
Tracer :
PC>tracert 50.50.50.2
Tracing route to
50.50.50.2 over a maximum of 30 hops:
1 2 ms 11 ms 3
ms 30.30.30.1
2 15 ms 17 ms 15
ms 10.10.10.2
3 0 ms 10 ms 11
ms 20.20.20.2
4 13 ms 11 ms 13
ms 50.50.50.2
Trace complete.