Contoh Protokol OSPF dengan 5 Router Cisco

contoh-ospf-1
Skenario Pertama Contoh Penggunaan Protokol OSPF

Router Pertama

Router>
Router>en
Router#conf t
Router(config)#hostname Rasid
Rasid(config)#int f0/0
Rasid(config-if)#ip addr 10.64.0.1 255.255.0.0
Rasid(config-if)#no shut

Rasid(config-if)#
Rasid(config-if)#router ospf 1
Rasid(config-router)#router-id 1.1.1.1
Rasid(config-router)#network 10.64.0.0 0.0.255.255 area 1
Rasid(config-router)#end
Rasid#

Rasid#sh ip ospf
Routing Process “ospf 1” with ID 1.1.1.1
Supports only single TOS(TOS0) routes
Supports opaque LSA
—–more—–

===========================================================
Router ke-dua

Router>
Router>en
Router#config t
Router(config)#hostname Callista
Callista(config)#int f0/0
Callista(config-if)#ip address 10.64.0.2 255.255.0.0
Callista(config-if)#no shutdown
Callista(config-if)#

Callista(config-if)#router ospf 1
Callista(config-router)#router-id 2.2.2.2
Callista(config-router)#network 10.64.0.0 0.0.255.255 area 1
Callista(config-router)#end
Callista#

Callista#
Callista#show ip ospf
Routing Process “ospf 1” with ID 2.2.2.2
Supports only single TOS(TOS0) routes
Supports opaque LSA
===more===
Callista#
Callista#show ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet address is 10.64.0.2/16, Area 1
Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
===more===

==================================

Callista#
Callista#config t
Callista(config)#int f0/1
Callista(config-if)#ip address 10.2.1.2 255.255.0.0
Callista(config-if)#no shutdown
Callista(config-if)#

Callista(config-if)#
Callista(config-if)#router ospf 1
Callista(config-router)#network 10.2.0.0 0.0.255.255 area 0
Callista(config-router)#end
Callista#

Callista#show ip ospf
Routing Process “ospf 1” with ID 2.2.2.2
Supports only single TOS(TOS0) routes
Supports opaque LSA
===more===
============================================
Router ke-Tiga
Router>en
Router#config t
Router(config)#hostname Irsyad
Irsyad(config)#int f0/0
Irsyad(config-if)#ip address 10.2.1.1 255.255.0.0
Irsyad(config-if)#no shutdown
Irsyad(config-if)#

Irsyad(config-if)#
Irsyad(config-if)#router ospf 1
Irsyad(config-router)#router-id 3.3.3.3
Irsyad(config-router)#network 10.2.0.0 0.0.255.255 area 0
Irsyad(config-router)#end

Irsyad#
Irsyad#show ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet address is 10.2.1.1/16, Area 0
Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
==more==

Rasid#
Rasid#show ip ospf neigh
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:38 10.64.0.2 FastEthernet0/0
Rasid#
Callista#
Callista#show ip ospf neigh
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:34 10.64.0.1 FastEthernet0/0
3.3.3.3 1 FULL/BDR 00:00:36 10.2.1.1 FastEthernet0/1
Callista#

Irsyad#
Irsyad#show ip ospf neigh

Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:31 10.2.1.2 FastEthernet0/0
Irsyad#

 

=========================

contoh-ospf-2
Skenario Kedua Contoh Penggunaan Protokol OSPF ditambah 2 PC.

Tambah PC
Router Rasid

Rasid>en
Rasid#config t
Rasid(config)#int f0/1
Rasid(config-if)#ip address 20.64.0.1 255.255.0.0
Rasid(config-if)#no shutdown
Rasid(config-if)#

Rasid(config-if)#router ospf 1
Rasid(config-router)#network 20.64.0.0 0.0.255.255 area 1
Rasid(config-router)#end
Rasid#

==================
Tambah PC
Router Irsyad

Irsyad#config t
Irsyad(config)#int fa0/1
Irsyad(config-if)#ip address 20.2.1.1 255.255.0.0
Irsyad(config-if)#no shutdown
Irsyad(config-if)#

Irsyad(config-if)#
Irsyad(config-if)#router ospf 1
Irsyad(config-router)#network 20.2.0.0 0.0.255.255 area 0
Irsyad(config-router)#end
Irsyad#

===============================

contoh-ospf-5-router
Contoh protokol OSPF PC diganti dengan Router

GAnti PC dengan Router Tembesi

Router>
Router>en
Router#config t
Router(config)#hostname Tembesi
Tembesi(config)#int fa0/0
Tembesi(config-if)#ip address 20.64.0.100 255.255.0.0
Tembesi(config-if)#no shutdown
Tembesi(config-if)#

Tembesi(config-if)#
Tembesi(config-if)#int loopback 0
Tembesi(config-if)#ip address 192.168.1.1 255.255.255.0
Tembesi(config-if)#
Tembesi(config-if)#router ospf 1
Tembesi(config-router)#router-id 20.20.20.20
Tembesi(config-router)#network 20.64.0.0 0.0.255.255 area 1
Tembesi(config-router)#network 192.168.1.0 0.255.255.255 area 1
Tembesi(config-router)#
Tembesi(config-router)#end

Tembesi#
Tembesi#copy run start
Destination filename [startup-config]?
Building configuration…
[OK]
Tembesi#

===============================
GAnti PC dengan Router Tiban

Router>
Router>en
Router#
Router#config t
Router(config)#hostname Tiban
Tiban(config)#int f0/0
Tiban(config-if)#ip address 20.2.1.100 255.255.0.0
Tiban(config-if)#no shutdown
Tiban(config-if)#

Tiban(config-if)#int loopback 0
Tiban(config-if)#
Tiban(config-if)#ip address 172.16.1.1 255.255.0.0
Tiban(config-if)#router ospf 1
Tiban(config-router)#router-id 30.30.30.30
Tiban(config-router)#network 20.2.0.0 0.0.255.255 area 0
Tiban(config-router)#network 172.16.0.0 0.0.255.255 area 0
Tiban(config-router)#
Tiban(config-router)#end
Tiban#

Tiban#copy run start
Destination filename [startup-config]?
Building configuration…
[OK]
Tiban#

==========================================

Tembesi#
Tembesi#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

10.0.0.0/16 is subnetted, 2 subnets
O IA 10.2.0.0 [110/3] via 20.64.0.1, 00:06:44, FastEthernet0/0
O 10.64.0.0 [110/2] via 20.64.0.1, 00:06:44, FastEthernet0/0
20.0.0.0/16 is subnetted, 2 subnets
O IA 20.2.0.0 [110/4] via 20.64.0.1, 00:06:44, FastEthernet0/0
C 20.64.0.0 is directly connected, FastEthernet0/0
172.16.0.0/32 is subnetted, 1 subnets
O IA 172.16.1.1 [110/5] via 20.64.0.1, 00:06:44, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Loopback0
Tembesi#
Tembesi#show ip ospf database
OSPF Router with ID (20.20.20.20) (Process ID 1)

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 1382 0x80000007 0x003471 1
1.1.1.1 1.1.1.1 443 0x8000000c 0x005e91 2
20.20.20.20 20.20.20.20 414 0x80000003 0x001c0c 2

Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
10.64.0.2 2.2.2.2 1382 0x80000002 0x002ef9
20.64.0.1 1.1.1.1 443 0x80000003 0x000183

Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
10.2.0.0 2.2.2.2 1441 0x80000005 0x00b491
20.2.0.0 2.2.2.2 994 0x80000006 0x003aff
172.16.1.1 2.2.2.2 797 0x80000007 0x00c4ca
Tembesi#
Tembesi#
Tembesi#show 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 20.20.20.20
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
20.64.0.0 0.0.255.255 area 1
192.0.0.0 0.255.255.255 area 1
Routing Information Sources:
Gateway Distance Last Update
1.1.1.1 110 00:07:53
2.2.2.2 110 00:23:32
20.20.20.20 110 00:07:24
Distance: (default is 110)

Tembesi#

LEAVE A REPLY