SINGLE-AREA OSPF


Bu bölümde tek bir alan için OSPF konfigurasyonu yapacağız, Router-Id belirlemeyi, hello ve dead sürelerini belirlemeyi, default-route’u OSPF de anons etmeyi ve  DR ve BDR seçimini yaptırmayı göreceğiz.

ospf

 

1. OSPF routing protokolü için ortam hazırlayalım
Lab konfigürasyonu için temel sistem ve ip address yapılandırmasını kuralım.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname CLIGURU-R1
[CLIGURU-R1]interface GigabitEthernet 0/0/1
[CLIGURU-R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24
[CLIGURU-R1-GigabitEthernet0/0/1]quit
[CLIGURU-R1]interface GigabitEthernet 0/0/0
[CLIGURU-R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24
[CLIGURU-R1-GigabitEthernet0/0/0]quit
[CLIGURU-R1]interface LoopBack 0
[CLIGURU-R1-LoopBack0]ip address 10.0.1.1 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname CLIGURU-R2
[CLIGURU-R2]interface GigabitEthernet 0/0/1
[CLIGURU-R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24
[CLIGURU-R2-GigabitEthernet0/0/1]quit
[CLIGURU-R2]interface LoopBack 0
[CLIGURU-R2-LoopBack0]ip address 10.0.2.2 24
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname CLIGURU-R3
[CLIGURU-R3]interface GigabitEthernet 0/0/0
[CLIGURU-R3-GigabitEthernet0/0/0]ip address 10.0.13.3 24
[CLIGURU-R3-GigabitEthernet0/0/0]quit
[CLIGURU-R3]interface LoopBack 0
[CLIGURU-R3-LoopBack0]ip address 10.0.3.3 24
[CLIGURU-R3-LoopBack0]quit
[CLIGURU-R3]interface LoopBack 2
[CLIGURU-R3-LoopBack2]ip address 172.16.0.1 24
2.  OSPF konfigürasyonu oluşturalım.
Router ID yi 10.0.1.1 (Manuel olarak da loopback olmadan router-id girilebilir. Kolaylık için loopback’ipsi ile aynı girdik)olarak verelim. OSPF process 1 (default process)’i kullanalım, network ağlarınıda spesific olarak 10.0.1.0/24, 10.0.13.0/24 ve 10.0.12.0/24 networklerinde area0 ’ın bir parçası olarak belirtelim.
[CLIGURU-R1]ospf 1 router-id 10.0.1.1
[CLIGURU-R1-ospf-1]area 0
[CLIGURU-R1-ospf-1-area-0.0.0.0]network 10.0.1.0 0.0.0.255
[CLIGURU-R1-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255
[CLIGURU-R1-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
Farklı process ID’leri farklı link-state veritabanları oluşturur, bundan dolayı bütün routerların aynı OSPF process ID’sine sahip olmasına dikkat edin. Wildcard mask’i network komutunda spesifik olarak o network için girilmelidir.

 

CLIGURU-R2’de manuel olarak 10.0.2.2 ‘yi router-id olarak konfigure edelim. OSPF process-id’miz 1 ve anons ettiğimiz network segmentleri 10.0.12.0/24 ve 10.0.2.0/24 olarak Area0 içinde yer alsın.
[CLIGURU-R2  ]id 10.0.2.2
[CLIGURU-R2]area 0
[CLIGURU-R2-ospf-1-area-0.0.0.0]network 10.0.2.0 0.0.0.255
[CLIGURU-R2-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
Manuel olarak 10.0.3.3 ‘yi router-id olarak konfigure edelim. OSPF process-id’miz 1 ve anons ettiğimiz network segmentleri 10.0.3.0/24 ve 10.0.13.0/24 olarak Area0 içinde yer alsın.
[R3id 10.0.3.3
[CLIGURU-R3-ospf-1]area 0
[CLIGURU-R3-ospf-1-area-0.0.0.0]network 10.0.3.0 0.0.0.255
[CLIGURU-R3-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255
 3. OSPF konfigürasyonunu kontrol edelim.
OSPF route eşleşmesi tamamlandıktan sonra , CLIGURU-R1 ,CLIGURU-R2 ve CLIGURU-R3’ün routing tablosuna bakalım.
<CLIGURU-R1>display ip routing-table
Route Flags: R – relay, D – download to fib
—————————————————————————
Routing Tables: Public
Destinations : 10       Routes : 10
Destination/Mask   Proto   Pre Cost Flags NextHop         Interface
10.0.1.0/24 Direct 0   0     D   10.0.1.1       LoopBack0
10.0.1.1/32 Direct 0   0     D   127.0.0.1       LoopBack0
10.0.2.2/32 OSPF   10   1     D 10.0.12.2   GigabitEthernet0/0/1
10.0.3.3/32 OSPF   10  1     D   10.0.13.3 GigabitEthernet0/0/0
10.0.12.0/24 Direct 0   0     D   10.0.12.1 GigabitEthernet0/0/1
10.0.12.1/32 Direct 0   0     D   127.0.0.1 GigabitEthernet0/0/1
10.0.13.0/24 Direct 0   0     D   10.0.13.1 GigabitEthernet0/0/0
10.0.13.1/32 Direct 0   0     D   127.0.0.1 GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0     D   127.0.0.1       InLoopBack0
127.0.0.1/32 Direct 0   0     D   127.0.0.1       InLoopBack0
<CLIGURU-R2>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 9       Routes : 9
Destination/Mask Proto   Pre Cost   Flags NextHop         Interface
10.0.1.1/32 OSPF   10   1   D   10.0.12.1       GigabitEthernet0/0/1
10.0.2.0/24 Direct 0   0   D   10.0.2.2       LoopBack0
10.0.2.2/32 Direct 0   0   D   127.0.0.1       LoopBack0
10.0.3.3/32 OSPF   10   2     D   10.0.12.1   GigabitEthernet0/0/1
10.0.12.0/24 Direct 0   0   D   10.0.12.2     GigabitEthernet0/0/1
10.0.12.2/32 Direct 0   0   D   127.0.0.1    GigabitEthernet0/0/1
10.0.13.0/24 OSPF   10   2   D   10.0.12.1   GigabitEthernet0/0/1
127.0.0.0/8   Direct 0   0   D   127.0.0.1       InLoopBack0
127.0.0.1/32 Direct 0   0   D   127.0.0.1       InLoopBack0
<CLIGURU-R3>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 11       Routes : 11
Destination/Mask Proto   Pre Cost Flags NextHop         Interface
10.0.1.1/32 OSPF   10   1     D   10.0.13.1     GigabitEthernet0/0/
10.0.2.2/32 OSPF   10   2     D   10.0.13.1     GigabitEthernet0/0/0
10.0.3.0/24 Direct 0   0     D   10.0.3.3       LoopBack0
10.0.3.3/32 Direct 0   0     D   127.0.0.1       LoopBack0
10.0.12.0/24 OSPF   10   2   D   10.0.13.1     GigabitEthernet0/0/0
10.0.13.0/24 Direct 0   0   D   10.0.13.3     GigabitEthernet0/0/0
10.0.13.3/32 Direct 0   0   D   127.0.0.1     GigabitEthernet0/0/0
27.0.0.0/8   Direct 0   0    D   127.0.0.1       InLoopBack0
127.0.0.1/32 Direct 0   0         D   127.0.0.1       InLoopBack0
172.16.0.0/24 Direct 0   0       D   172.16.0.1     LoopBack2
172.16.0.1/32 Direct 0   0       D   127.0.0.1       LoopBack2
CLIGURU-R1 ve CLIGURU-R2 arasında 10.0.1.1’e, de CLIGURU-R2 ve CLIGURU-R3 arasında 10.0.3.3’e ping atarak networkü kontrol edelin.
<CLIGURU-R2>ping 10.0.1.1
PING 10.0.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 10.0.1.1: bytes=56 Sequence=2 ttl=255 time=60 ms
Reply from 10.0.1.1: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 10.0.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 10.0.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms
— 10.0.1.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/38/60 ms
<CLIGURU-R2>ping 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1 ttl=254 time=60 ms
Reply from 10.0.3.3: bytes=56 Sequence=2 ttl=254 time=80 ms
Reply from 10.0.3.3: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 10.0.3.3: bytes=56 Sequence=4 ttl=254 time=80 ms
Reply from 10.0.3.3: bytes=56 Sequence=5 ttl=254 time=80 ms
— 10.0.3.3 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/66/80 ms
OSPF komşuluk durumuna display ospf peer komutuyla bakabiliriz.
<CLIGURU-R1>display ospf peer
                          OSPF Process 1 with Router ID 10.0.1.1
                                     Neighbors
Area 0.0.0.0 interface 10.0.12.1(GigabitEthernet0/0/1)’s neighbors
Router ID: 10.0.2.2         Address: 10.0.12.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.12.1 BDR: 10.0.12.2 MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00:06:10
Authentication Sequence: [ 0 ]
Neighbors
Area 0.0.0.0 interface 10.0.13.1(GigabitEthernet0/0/0)’s neighbors
Router ID: 10.0.3.3         Address: 10.0.13.3
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.13.1 BDR: 10.0.13.3 MTU: 0
Dead timer due in 39 sec
Retrans timer interval: 5
Neighbor is up for 00:03:58
Authentication Sequence: [ 0 ]
Display ospf peer komutuyla ospf komşuluklarını detaylı olarak inceleyebiliriz. Örnekteki  ekran çıktısına bakarak  CLIGURU-R1’in DR’ını 10.0.13.1 olarak belirlemiş.  DR seçiminde sonsuz bir öncelik yoktur, yani DR durumu CLIGURU-R3’den CLIGURU-R1’e geçmeyecektir, geçmesi için OSPF process’i resetlenmelidir.
Display ospf peer brief  komutu ile ospf komuşularının daha küçük bir çıktısını verir.
<CLIGURU-R1>display ospf peer brief
OSPF Process 1 with Router ID 10.0.1.1
Peer Statistic Information
————————————————————————–
Area Id         Interface                       Neighbor id     State
0.0.0.0         GigabitEthernet0/0/1             10.0.2.2         Full
0.0.0.0         GigabitEthernet0/0/0             10.0.3.3         Full
————————————————————————–
<R2>display ospf peer brief
OSPF Process 1 with Router ID 10.0.2.2
Peer Statistic Information
————————————————————————–
Area Id         Interface                       Neighbor id     State
0.0.0.0         GigabitEthernet0/0/1             10.0.1.1         Full
————————————————————————–
<R3>display ospf peer brief
OSPF Process 1 with Router ID 10.0.3.3
Peer Statistic Information
————————————————————————–
Area Id         Interface                       Neighbor id     State
0.0.0.0         GigabitEthernet0/0/0             10.0.1.1         Full
————————————————————————–
 Ospf hello interval ve dead interval aralıklarını(sürelerini) değiştirelim.
Display ospf interface GigabitEthernet 0/0/0 komutu ile CLIGURU-R1 üzerinde default hello interval ve dead interval bilgilerini görüntüleyelim.
<CLIGURU-R1>display ospf interface GigabitEthernet 0/0/0
OSPF Process 1 with Router ID 10.0.1.1
Interfaces
Interface: 10.0.13.1 (GigabitEthernet0/0/0)
Cost: 1      State: DR       Type: Broadcast   MTU: 1500
Priority: 1
Designated Router: 10.0.13.1
Backup Designated Router: 10.0.13.3
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
Ospf’in  hello ve dead interval’ini degiştirmek için ospf timer komutunu kullanırız.CLIGURU-R1 ‘in hello interval 15 ,dead interval 60 olarak değiştirelim.
[CLIGURU-R1]interface GigabitEthernet 0/0/0
[CLIGURU-R1-GigabitEthernet0/0/0]ospf timer hello 15
[CLIGURU-R1-GigabitEthernet0/0/0]ospf timer dead 60
Oct 28 2014 15:56:17-08:00 CLIGURU-R1 %%01OSPF/3/NBR_DOWN_REASON(l)[1]:Neighbor state lea
ves full or changed to Down. (ProcessId=1, NeighborRouterId=10.0.3.3, NeighborAreaId=0,
NeighborInterface=GigabitEthernet0/0/0,NeighborDownImmediate reason=Neighb
or Down Due to Inactivity, NeighborDownPrimeReason=Interface Parameter Mismatch,
NeighborChangeTime=2014-10-28 15:56:17-08:00)
<CLIGURU-R1>display ospf interface GigabitEthernet 0/0/0
OSPF Process 1 with Router ID 10.0.1.1
Interfaces
Interface: 10.0.13.1 (GigabitEthernet0/0/0)
Cost: 1       State: DR       Type: Broadcast   MTU: 1500
Priority: 1
Designated Router: 10.0.13.1
Backup Designated Router: 0.0.0.0
Timers: Hello 15 , Dead 60 , Poll 120 , Retransmit 5 , Transmit Delay 1
CLIGURU-R1 üzerinde ospf komşuluk durumunu kontrol edelim.
<CLIGURU-R1>display ospf peer brief
OSPF Process 1 with Router ID 10.0.1.1
Peer Statistic Information
————————————————————————–
Area Id         Interface                       Neighbor id     State
0.0.0.0         GigabitEthernet0/0/1             10.0.2.2         Full
————————————————————————–
Yukarıdaki ekran çıktısında , CLIGURU-R1’in sadece tek bir komşusunun, CLIGURU-R2 olduğunu göstermektedir.
OSPF hello interval ve dead interval değerleri CLIGURU-R1 ve CLIGURU-R3 üzerinde farklı, bundan dolayı CLIGURU-R1 ve CLIGURU-R3 OSPF komşuluğu kuramamaktadır.
Ospf timer komutu ile CLIGURU-R3 üzerinde GE0/0/0 içinde Hello 15, Dead 60 olarak değiştirelim.
[CLIGURU-R3]interface GigabitEthernet 0/0/0
[CLIGURU-R3-GigabitEthernet0/0/0]ospf timer hello 15
[CLIGURU-R3-GigabitEthernet0/0/0]ospf timer dead 60
Oct 28 2014 16:02:55-08:00 CLIGURU-R3 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes event:
neighbor status changed. (ProcessId=1, NeighborAddress=10.0.13.1, NeighborEvent=Lo
adingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
<CLIGURU-R3>display ospf interface GigabitEthernet 0/0/0
OSPF Process 1 with Router ID 10.0.3.3
Interfaces
Interface: 10.0.13.3 (GigabitEthernet0/0/0)
Cost: 1       State: DR       Type: Broadcast   MTU: 1500
Priority: 1
Designated Router: 10.0.13.3
Backup Designated Router: 10.0.13.1
Timers: Hello 15 , Dead 60 , Poll 120 , Retransmit 5 , Transmit Delay 1
CLIGURU-R1 üzerinde ospf komşuluk durumunu tekrar kontrol edelim.
<CLIGURU-R1>display ospf peer brief
OSPF Process 1 with Router ID 10.0.1.1
Peer Statistic Information
————————————————————————-
Area Id         Interface                       Neighbor id     State
0.0.0.0         GigabitEthernet0/0/1             10.0.2.2         Full
0.0.0.0         GigabitEthernet0/0/0             10.0.3.3       Full
————————————————————————–
4. Default routeları OSPF’de anons etmek.
CLIGURU-R3 üzerinde default-route’ları OSPF ile anons  edelim.
[CLIGURU-R3]ip route-static 0.0.0.0 0.0.0.0 LoopBack 2
[R3]ospf 1[
CLIGURU-R3-ospf-1]default-route-advertise
CLIGURU-R1 ve CLIGURU-R2’nin routing tablolarına bakalım. CLIGURU-R3 tarafından anons edilen  yolların ,CLIGURU-R1 ve CLIGURU-R2’nin routing tablosunda görüyoruz.
<CLIGURU-R1>display ip routing-table
Route Flags: R – relay, D – download to fib
—————————————————————————
Routing Tables: Public
Destinations : 11       Routes : 11
Destination/Mask Proto   Pre Cost     Flags NextHop Interface
0.0.0.0/0   O_ASE   150  1       D   10.0.13.3   GigabitEthernet0/0/0
10.0.1.0/24 Direct 0   0       D   10.0.1.1       LoopBack0
10.0.1.1/32 Direct 0   0       D   127.0.0.1       LoopBack0
10.0.2.2/32 OSPF   10   1       D   10.0.12.2 GigabitEthernet0/0/1
10.0.3.3/32 OSPF   10   1       D   10.0.13.3   GigabitEthernet0/0/0
10.0.12.0/24 Direct 0   0     D   10.0.12.1 GigabitEthernet0/0/1
10.0.12.1/32 Direct 0   0     D   127.0.0.1   GigabitEthernet0/0/1
10.0.13.0/24 Direct 0   0     D   10.0.13.1   GigabitEthernet0/0/0
10.0.13.1/32 Direct 0   0     D   127.0.0.1   GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0     D   127.0.0.1       InLoopBack0
127.0.0.1/32 Direct 0   0     D  127.0.0.1       InLoopBack0
<CLIGURU-R2>display ip routing-table
Route Flags: R – relay, D – download to fib
—————————————————————————
Routing Tables: Public
Destinations : 10       Routes : 10
Destination/Mask Proto   Pre Cost     Flags NextHop   Interface
0.0.0.0/0   O_ASE   150 1         D   10.0.12.1   GigabitEthernet0/0/1
10.0.1.1/32 OSPF   10   1       D   10.0.12.1   GigabitEthernet0/0/1
10.0.2.0/24 Direct 0   0       D   10.0.2.2       LoopBack0
10.0.2.2/32 Direct 0   0       D   127.0.0.1       LoopBack0
10.0.3.3/32 OSPF   10   2         D   10.0.12.1   GigabitEthernet0/0/1
10.0.12.0/24 Direct 0   0       D   10.0.12.2   GigabitEthernet0/0/1
10.0.12.2/32 Direct 0   0       D   127.0.0.1  GigabitEthernet0/0/1
10.0.13.0/24 OSPF   10   2       D   10.0.12.1    GigabitEthernet0/0/1
127.0.0.0/8   Direct 0   0       D 127.0.0.1       InLoopBack0
127.0.0.1/32 Direct 0   0       D   127.0.0.1       InLoopBack0
<CLIGURU-R3>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 12       Routes : 12
Destination/Mask Proto   Pre Cost     Flags NextHop     Interface
0.0.0.0/0   Static 60   0       D   172.16.0.1     LoopBack2
10.0.1.1/32 OSPF   10   1     D   10.0.13.1   GigabitEthernet0/0/0
10.0.2.2/32 OSPF   10   2     D   10.0.13.1   GigabitEthernet0/0/0
10.0.3.0/24 Direct 0   0     D   10.0.3.3       LoopBack0
10.0.3.3/32 Direct 0   0     D   127.0.0.1       LoopBack0
10.0.12.0/24 OSPF   10   2     D   10.0.13.1   GigabitEthernet0/0/0
10.0.13.0/24 Direct 0   0   D   10.0.13.3   GigabitEthernet0/0/0
10.0.13.3/32 Direct 0   0   D   127.0.0.1   GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0   D   127.0.0.1       InLoopBack0
127.0.0.1/32 Direct 0   0   D   127.0.0.1       InLoopBack0
172.16.0.0/24 Direct 0   0   D   172.16.0.1     LoopBack2
172.16.0.1/32 Direct 0   0   D   127.0.0.1       LoopBack2
CLIGURU-R2 üzerinde LoopBack2  (172.16.0.1) arasındaki bağlantıyı kontrol etmek için  ping komutunu kullanalım.
<CLIGURU-R2>ping 172.16.0.1
PING 172.16.0.1: 56 data bytes, press CTRL_C to break
Reply from 172.16.0.1: bytes=56 Sequence=1 ttl=254 time=80 ms
Reply from 172.16.0.1: bytes=56 Sequence=2 ttl=254 time=80 ms
Reply from 172.16.0.1: bytes=56 Sequence=3 ttl=254 time=70 ms
Reply from 172.16.0.1: bytes=56 Sequence=4 ttl=254 time=100 ms
Reply from 172.16.0.1: bytes=56 Sequence=5 ttl=254 time=80 ms
— 172.16.0.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 70/82/100 ms
6.  OSPF de DR,BDR seçimlerini kontrol edelim.
CLIGURU-R1’de  CLIGURU-R3’ün DR ve BDR bilgilerini görüntülemek için display ospf peer komutunu kullanalım.
<CLIGURU-R1>display ospf peer 10.0.3.3
OSPF Process 1 with Router ID 10.0.1.1
Neighbors
Area 0.0.0.0 interface 10.0.13.1(GigabitEthernet0/0/0)’s neighbors
Router ID: 10.0.3.3         Address: 10.0.13.3
State: Full Mode:Nbr is Master Priority: 1
DR: 10.0.13.3 BDR: 10.0.13.1 MTU: 0
Dead timer due in 58 sec
Retrans timer interval: 0
Neighbor is up for 00:08:01
Authentication Sequence: [ 0 ]
Çıktı üzerinden CLIGURU-R3’ün DR ve CLIGURU-R1’in BDR olduğunu görüntülüyoruz. Çünkü CLIGURU-R3’
router-id’si 10.0.3.3 CLIGURU-R1’in router-id’sinden daha iyidir(daha büyük). CLIGURU-R1 ve
CLIGURU-R3 priority değerleri değiştirilmedi yani default olarak 1, bundan dolayı
Seçimler router-id’leri üzerinden gerçekleşti.
Ospf dr-priority komutu ile DR prioritylerini CLIGURU-R1 ve CLIGURU-R3’de değiştirelim.
[CLIGURU-R1]interface GigabitEthernet 0/0/0
[CLIGURU-R1-GigabitEthernet0/0/0]ospf dr-priority 200
[CLIGURU-R3]interface GigabitEthernet 0/0/0
[CLIGURU-R3-GigabitEthernet0/0/0]ospf dr-priority 100
DR ve BDR seçimi non-preemption mod’dadır default da, yani herhangi bir şekilde DR yada BDR devreden çıkmadığı bir durumda tekrar seçilmeyecektir. Bundan dolayı tekrar seçim için OSPF komşuluk larını CLIGURU-R1 ve CLIGURU-R3 için resetlememiz gerekir.
Bunu interfaceleri kapatıp açarak yapabiliriz.
[CLIGURU-R3]interface GigabitEthernet 0/0/0
[CLIGURU-R3-GigabitEthernet0/0/0]shutdown
[CLIGURU-R1]interface GigabitEthernet 0/0/0
[CLIGURU-R1-GigabitEthernet0/0/0]shutdown
 [CLIGURU-R1-GigabitEthernet0/0/0]undo shutdown
 [CLIGURU-R3-GigabitEthernet0/0/0]undo shutdown
CLIGURU-R1’de  CLIGURU-R3’ün DR ve BDR bilgilerini görüntülemek için display ospf peer komutunu kullanalım.
[CLIGURU-R1]display ospf peer 10.0.3.3
OSPF Process 1 with Router ID 10.0.1.1
Neighbors
Area 0.0.0.0 interface 10.0.13.1(GigabitEthernet0/0/0)’s neighbors
Router ID: 10.0.3.3         Address: 10.0.13.3
State: Full Mode:Nbr is Master Priority: 100
DR: 10.0.13.1 BDR: 10.0.13.3 MTU: 0
Dead timer due in 57 sec
Retrans timer interval: 5
Neighbor is up for 00:00:03
Authentication Sequence: [ 0 ]
CLIGURU-R1 priority değeri CLIGURU-R3’den yüksek oldugu için CLIGURU-R1 DR seçildi,CLIGURU-R3 ise BDR seçildi.
Final….
<CLIGURU-R1>display current-configuration
#
sysname CLIGURU-R1
#
interface GigabitEthernet0/0/0
ip address 10.0.13.1 255.255.255.0
ospf dr-priority 200
ospf timer hello 15
#
interface GigabitEthernet0/0/1
ip address 10.0.12.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
ospf 1 router-id 10.0.1.1
area 0.0.0.0
network 10.0.1.0 0.0.0.255
network 10.0.13.0 0.0.0.255
network 10.0.12.0 0.0.0.255
#
user-interface con 0
user-interface vty 0 4
#
Return
<CLIGURU-R2>display current-configuration
#
sysname CLIGURU-R2
#
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
#
interface LoopBack0
ip address 10.0.2.2 255.255.255.0
#
ospf 1 router-id 10.0.2.2
area 0.0.0.0
network 10.0.2.0 0.0.0.255
network 10.0.12.0 0.0.0.255
#
user-interface con 0
user-interface vty 0 4
#
Return
<CLIGURU-R3>display current-configuration
#
sysname CLIGURU-R3
#
interface GigabitEthernet0/0/0
ip address 10.0.13.3 255.255.255.0
ospf dr-priority 100
ospf timer hello 15
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
interface LoopBack2
ip address 172.16.0.1 255.255.255.0
#
ospf 1 router-id 10.0.3.3
default-route-advertise
area 0.0.0.0
network 10.0.3.0 0.0.0.255
network 10.0.13.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 LoopBack2
#
user-interface con 0
user-interface vty 0 4
#
return