OSPF Network Types

OSPF'i öğrenmek için hangi network teknolojilerinde nasıl davranacağını bilmek zorundayız. Aynı zamanda network teknolojilerinin de OSPF'e nasıl davranacağını da bilmek zorundayız. Örneğin ethernet networklerde OSPF default olarak network tipi olarak "broadcast" seçip "hello"ları "Multicast" gönderirken "Frame-Relay"in doğasında multicast/broadcast yoktur. Oysaki OSPF komşuluk kurmak, DR-BDR seçmek isteyecektir. OSPF te bilinmesi gereken altın kurallardan biri de iki OSPF'in komşuluk kurabilmesi için "hello" ve "dead" timerların mutlaka eşleşmesi gerekir.

1- Broadcast:


R1(config-if)#do sh run int f0/0
Building configuration...

Current configuration : 110 bytes
!
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
ip ospf 1 area 0
duplex auto
speed auto
end

R2(config-if)#do sh run int f0/0
Building configuration...

Current configuration : 110 bytes
!
interface FastEthernet0/0
ip address 1.1.1.2 255.255.255.0
ip ospf 1 area 0
duplex auto
speed auto
end

Sonuçlar:

  • Default OSPF konfigirasyonu yaptığımızda asağıdaki "debug ip ospf hello" çıktısında da görüldüğü gibi R1, 224.0.0.5 adresine Multicast olarak hello gönderdi.
R1(config-if)#
*Mar 1 00:24:36.175: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 1.1.1.1

Asağıdaki çıktıya göre;
  • Ethernette default olarak network type "broadcast"tir.
  • Her 10 sn de bir "hello" gönderilir 40 sn hello alınmazsa komşuluk düşer.
  • DR-BDR seçimi yapılmış R1 DR olmuştur.
R1#show ip ospf interface
FastEthernet0/0 is up, line protocol is up
Internet Address 1.1.1.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Enabled by interface config, including secondary ip addresses
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 1.1.1.1
Backup Designated router (ID) 1.1.1.2, Interface address 1.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:01
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 1
Last flood scan time is 4 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 1.1.1.2 (Backup Designated Router)
Suppress hello for 0 neighbor(s)

R1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
1.1.1.2 1 FULL/BDR 00:00:30 1.1.1.2 FastEthernet0/0

2- Non-Broadcast:

Özellikle Frame Relay gibi non-broadcast multi access networklerde kullanılır. Bu tip netwoklerde multicast/broadcast olmadığı için "hello" paketleri gönderilemez haliyle komşuluk kurulamaz DR-BDR seçimi yapılamaz. Bu sorunu aşmak için OSPF paketlerini unicast göndermemiz gerekir bunu sağlamak içinde aşağıda görüldüğü gibi OSPF altında neighbor komutu ile HUB da SPOKE'ların adreslerini belirtmemiz gerekir. Yine SPOKE ların birbirleriyle R1 üzerinden haberleşebilmesi nedeniyle DR'ın mutlaka R1 olmasını sağlamak için interface altında "ip ospf priority 0" komutunu yazmamız gerekir.


!R1:

interface Loopback0

ip address 10.10.1.1 255.255.255.0

!

interface Serial1/0

ip address 10.10.123.1 255.255.255.0

encapsulation frame-relay

frame-relay map ip 10.10.123.2 102

frame-relay map ip 10.10.123.3 103

!

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

neighbor 10.10.123.2

neighbor 10.10.123.3

!

!R2:

!

interface Loopback0

ip address 10.10.2.2 255.255.255.0

!

interface Serial1/0

ip address 10.10.123.2 255.255.255.0

encapsulation frame-relay

ip ospf priority 0

frame-relay map ip 10.10.123.1 201

frame-relay map ip 10.10.123.3 201

!

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

!

!R3:

interface Loopback0

ip address 10.10.3.3 255.255.255.0

!

interface Serial1/0

ip address 10.10.123.3 255.255.255.0

encapsulation frame-relay

ip ospf priority 0

frame-relay map ip 10.10.123.1 301

frame-relay map ip 10.10.123.2 301

!

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

!

Sonuçlar:

  • Hello paketleri unicast gönderilmektedir.
  • Frame Relay networklerde default network tipi non-broadcast' tir.
  • DR/BDR seçimi yapılmaktadır.
  • Timers: Hello 30, Dead 120
  • Neighbor komutu gereklidir.

*Mar 1 00:25:25.951: OSPF: Send hello to 10.10.123.2 area 0 on Serial1/0 from 10.10.123.1

*Mar 1 00:25:25.955: OSPF: Send hello to 10.10.123.3 area 0 on Serial1/0 from 10.10.123.1


R1#sh ip ospf interface s1/0

Serial1/0 is up, line protocol is up

Internet Address 10.10.123.1/24, Area 0

Process ID 1, Router ID 10.10.1.1, Network Type NON_BROADCAST, Cost: 64

Transmit Delay is 1 sec, State DR, Priority 1

Designated Router (ID) 10.10.1.1, Interface address 10.10.123.1

No backup designated router on this network

Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5

oob-resync timeout 120

Hello due in 00:00:01

Supports Link-local Signaling (LLS)

Index 1/1, flood queue length 0

Next 0x0(0)/0x0(0)

Last flood scan length is 1, maximum is 1

Last flood scan time is 0 msec, maximum is 4 msec

Neighbor Count is 2, Adjacent neighbor count is 2

Adjacent with neighbor 10.10.2.2

Adjacent with neighbor 10.10.3.3

Suppress hello for 0 neighbor(s)


R1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

10.10.2.2 0 FULL/DROTHER 00:01:34 10.10.123.2 Serial1/0

10.10.3.3 0 FULL/DROTHER 00:01:58 10.10.123.3 Serial1/0


3- Point-to-Point:

  • PPP, HDLC, Frame Relay Point-to-Point interfacelerde default OSPF network tipidir.
  • Timers: Hello 10, Dead 40
  • "sh ip ospf neighbor"ciktisinda da görüldüğü gibi DR/BDR seçimi yoktur.
  • Hello paketleri multicast olarak 224.0.0.5 adresine gönderilir.

*Mar 1 00:31:15.139: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0.12 from 10.1.12.1


R1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

10.10.2.2 0 FULL/ - 00:00:33 10.1.12.2 Serial1/0.12

R1#sh ip ospf interface s1/0.12

Serial1/0.12 is up, line protocol is up

Internet Address 10.1.12.1/24, Area 0

Process ID 1, Router ID 10.10.1.1, Network Type POINT_TO_POINT, Cost: 64

Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40

Hello due in 00:00:02

Supports Link-local Signaling (LLS)

Index 1/1, flood queue length 0

Next 0x0(0)/0x0(0)

Last flood scan length is 1, maximum is 1

Last flood scan time is 0 msec, maximum is 0 msec

Neighbor Count is 1, Adjacent neighbor count is 1

Adjacent with neighbor 10.10.2.2

Suppress hello for 0 neighbor(s)


R1#sh run

interface Serial1/0

no ip address

encapsulation frame-relay

!

interface Serial1/0.12 point-to-point

ip address 10.1.12.1 255.255.255.0

frame-relay interface-dlci 102

!


4- Point to Multipoint Broadcast:

  • Hello'lar multicast olarak 224.0.0.5 adresine gönderilir.
  • Routing tablosuna /32'li host route'lar eklenir.
  • DR/BDR secimi yoktur.
  • Timers: Hello 30, Dead 120
  • Neighbor belirtmeye gerek yoktur.

*Mar 1 01:10:43.727: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 10.10.123.1

R1#sh run
interface Serial1/0
ip address 10.10.123.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
frame-relay map ip 10.10.123.2 102 broadcast
frame-relay map ip 10.10.123.3 103 broadcast
!

R1#sh ip route
Codes: 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
i - IS-IS, su - IS-IS summary, 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, 6 subnets, 2 masks
O 10.10.3.3/32 [110/65] via 10.10.123.3, 00:01:41, Serial1/0
O 10.10.2.2/32 [110/65] via 10.10.123.2, 00:01:41, Serial1/0
C 10.10.1.0/24 is directly connected, Loopback0
O 10.10.123.3/32 [110/64] via 10.10.123.3, 00:01:41, Serial1/0
O 10.10.123.2/32 [110/64] via 10.10.123.2, 00:01:41, Serial1/0
C 10.10.123.0/24 is directly connected, Serial1/0

R1#sh ip osp int s1/0
Serial1/0 is up, line protocol is up
Internet Address 10.10.123.1/24, Area 0
Process ID 1, Router ID 10.10.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:00
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 10.10.2.2
Adjacent with neighbor 10.10.3.3
Suppress hello for 0 neighbor(s)

R1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
10.10.2.2 0 FULL/ - 00:01:35 10.10.123.2 Serial1/0
10.10.3.3 0 FULL/ - 00:01:33 10.10.123.3 Serial1/0

Detaylı bilgi için burayı tıklayabilirsiniz.

4- Point to Multipoint Non-Broadcast:

  • Hello'lar unicast gönderilir.
  • Routing tablosuna /32'li host route'lar eklenir.
  • DR/BDR secimi yoktur.
  • Timers: Hello 30, Dead 120
  • Nonbroadcast ortam olduğundan neighbor yazmak gereklidir.


R1#sh run
Building configuration...
!
interface Serial1/0
ip address 10.10.123.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
frame-relay map ip 10.10.123.2 102
frame-relay map ip 10.10.123.3 103
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
neighbor 10.10.123.3
neighbor 10.10.123.2
!

*Mar 1 00:15:39.895: OSPF: Send hello to 10.10.123.3 area 0 on Serial1/0 from 10.10.123.1
*Mar 1 00:15:39.899: OSPF: Send hello to 10.10.123.2 area 0 on Serial1/0 from 10.10.123.1

R1#sh ip osp int s1/0
Serial1/0 is up, line protocol is up
Internet Address 10.10.123.1/24, Area 0
Process ID 1, Router ID 10.10.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:26
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 2
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 10.10.3.3
Adjacent with neighbor 10.10.2.2
Suppress hello for 0 neighbor(s)

R1#sh ip osp nei

Neighbor ID Pri State Dead Time Address Interface
10.10.3.3 0 FULL/ - 00:01:34 10.10.123.3 Serial1/0
10.10.2.2 0 FULL/ - 00:01:34 10.10.123.2 Serial1/0

R1#sh ip route
Codes: 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
i - IS-IS, su - IS-IS summary, 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, 6 subnets, 2 masks
O 10.10.3.3/32 [110/65] via 10.10.123.3, 00:17:46, Serial1/0
O 10.10.2.2/32 [110/65] via 10.10.123.2, 00:17:46, Serial1/0
C 10.10.1.0/24 is directly connected, Loopback0
O 10.10.123.3/32 [110/64] via 10.10.123.3, 00:17:46, Serial1/0
O 10.10.123.2/32 [110/64] via 10.10.123.2, 00:17:46, Serial1/0
C 10.10.123.0/24 is directly connected, Serial1/0


Olası Problemler:

Güzelce OSPF konfigirasyonu yaptınız fakat komşuluklar kurulmadığında ne yapabiliriz?
İlk yapmamız gereken şey "debug" açmaktır. Aşağıdaki örneğe bakarsak;

R2#debug ip ospf events
*Mar 1 00:33:09.583: OSPF: Mismatched hello parameters from 10.10.123.1
*Mar 1 00:33:09.587: OSPF: Dead R 120 C 40, Hello R 30 C 10

Görüldüğü gibi "hello" parametreleri uyuşmamıştır. Bu durumda OSPF network typle'larını kontrol edebiliriz veya bu parametlere manuel bir müdahale yapmamız gerekir.
Hatta konfigirasyona başlamadan önce sadece ilgili "debug"ları açarak kontrollu bir şekilde yolumuza devam edebiliriz, özellikle de "redistribution" yaparken "debug" çıktıları çok işimize yaramaktadır.








1 yorum:

Adsız dedi ki...

Çok açıklayıcı olmuş ellerinize sağlık.