39
Cisco OSPF Alp ISIK

Ospf Cisco

Embed Size (px)

DESCRIPTION

ospf

Citation preview

Page 1: Ospf Cisco

Cisco OSPF

Alp ISIK

Page 2: Ospf Cisco

DR-BDRDR – BDR secimi ethernet - frame gibi multiaccess networklerde olur.Bu secimde preempt ozelligi yoktur, sonradan networke katilan, DR – BDRseciminin yeniden yapilmasini saglamaz. Mevcut DR dustugunde, BDR otomatik olarak DR olur (yeni DR secimi bu durumda da yapilmaz.Ancak BDR secimi yapilir.)

Page 3: Ospf Cisco

DR-BDR 2Sirasiyla R1, R2, R3, R4 te OSPF’i actigimizda, R1 DR; R2 BDR olur. R3 ve R4

Daha sonra R1 de ospf’i clear ettigimizde.

BDR secimi yeniden yapildi; R4 BDR oldu.

Not : DROTHER’lar birbirleriyle, 2way state’inde kalirlar. Birbirleriyle networkpaylasimina direkt olarak gecmezler, DBD’leri DR uzerinden gonderip,anlasirlar.

Not : DR’dan sora BDR da giderse, bastan DR – BDR secimi yapilir.

Page 4: Ospf Cisco

Priority• Interface’in altinda, “ip ospf priority <0-255>” komutu ile priority

secimini etkileyebiliriz. Priority’si buyuk olan DR olur. 0 priority’li olan ise DR-BDR secimine katilmaz.

Page 5: Ospf Cisco

Loopback interface

• Loopback interface’i ospf networkune dahil ettigimizde, subnet mask’a bakmadan otomatik olarak /32 ile advertice edilir. Kendi subneti ile advertice edilmesini istiyorsak, interface’in altina ip ospf network point-to-point komutunu girmemiz gerekiyor.

Page 6: Ospf Cisco

Summary

Page 7: Ospf Cisco

Summary 2

Show ip route output from R1, before summarization at R2 (ABR)

Page 8: Ospf Cisco

Summary Routes 3

At R2 applying summarization as below :

R2(config-router) area 10 range 10.10.0.0 255.255.252.0

We see 1 entry for 10.10.0.0 network at the routing table of R1 as below

Page 9: Ospf Cisco

Summary for ASBR 4

Before summarization of static routes R5 routing table as below :

R1(config-router)# summary-address 172.16.0.0 255.255.252.0

Not : E2 routes does not change the cost after redistribution.

Page 10: Ospf Cisco

Summary for ASBR 4

Static routes are summarized as below :

Page 11: Ospf Cisco

Cost

• By default for 100Mb BW cost is 1, and for any higher BW it’s 1 again, you need to reconfigure the value while you have higher BW for proper calculation.

Not : that value need to change at all routers in the network.

-----------------------------------------------------------------

R1 (config)# router ospf 1

R1(config-router)# auto-cost referance bandwidth 1000

-----------------------------------------------------------------

The above is done for 1G BW, and this config need to be implemented at each Router in the network.

Page 12: Ospf Cisco

OSPF over NMMA• There is 5 methods;

- Non Broadcast (rfc standart)- Point-to-multipoint (rfc standart)- Point-to-point (Cisco Proprietary)- Broadcast (Cisco)- Point –to-point, non-broadcast (Cisco)

Not : Hub & Spoke topology’de Hub’in DR olmasi mantiklidir.

Page 13: Ospf Cisco

NBMA p-to-p, p-to-mp, non-broadcast

Area 0 -> non broadcastArea 24 -> point-to-pointArea 356 -> hybrid

Page 14: Ospf Cisco

Area 0, R1

Page 15: Ospf Cisco

Area 0, R1

Page 16: Ospf Cisco

Area 0, R1

Page 17: Ospf Cisco

R2; Area 0, Area 24 •

Page 18: Ospf Cisco

R2; Area 0, Area 24

Page 19: Ospf Cisco

R2; Area 0, Area 24

Page 20: Ospf Cisco

R4; Area 24

Page 21: Ospf Cisco

R4; Area 24

Page 22: Ospf Cisco

R3; Area 0, Area 356

Page 23: Ospf Cisco

R3; Area 0, Area 356

Page 24: Ospf Cisco

R3; Area 0, Area 356

Page 25: Ospf Cisco

R5; Area 356

Page 26: Ospf Cisco

R5; Area 356

Page 27: Ospf Cisco

Virtual Links

• Is a necessity while it’s not possible to directly connect an area to area 0.

• Not a desired topology but it works. It should be used as a temporary solution, better to re-redesign.

Page 28: Ospf Cisco

Virtual Links

Virtual link

Page 29: Ospf Cisco

Virtual LinksR2#show run | s ospf

ip ospf network point-to-point

router ospf 1

router-id 2.2.2.2

log-adjacency-changes

area 1 virtual-link 3.3.3.3

network 2.2.2.2 0.0.0.0 area 0

network 10.1.2.2 0.0.0.0 area 0

network 10.2.3.2 0.0.0.0 area 1

R3#show run | s ospf ip ospf network point-to-pointrouter ospf 1 router-id 3.3.3.3 log-adjacency-changes area 1 virtual-link 2.2.2.2 network 3.3.3.3 0.0.0.0 area 1 network 10.2.3.3 0.0.0.0 area 1 network 10.3.4.3 0.0.0.0 area 2

R4#show ip ospf data

OSPF Router with ID (4.4.4.4) (Process ID 1)

Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count3.3.3.3 3.3.3.3 67 0x80000004 0x00272C 24.4.4.4 4.4.4.4 1524 0x80000002 0x00C789 2

Summary Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum1.1.1.0 3.3.3.3 2 0x80000001 0x001A922.2.2.0 3.3.3.3 2 0x80000001 0x0073763.3.3.0 3.3.3.3 67 0x80000001 0x00CC5A10.1.2.0 3.3.3.3 2 0x80000001 0x008F1410.2.3.0 3.3.3.3 68 0x80000001 0x00F5EB

Page 30: Ospf Cisco

OSPF Areas and Router Types• What is the reasons behind Multıple Areas- Summarization (only possible at ABR - ASBR)- Hierarchical Network- BW efficiency

• Area Types- Normal- Stub // Automatically creates default route to area 0 Router;

redistribute routelar iceri alınmaz.- Totally Stub // Automatically creates default route to area 0 Router;

summary ve redistribute routelar iceri alınmaz.- NSSA- Totally NSSA // Automatically creates default route to area 0

Router

Page 31: Ospf Cisco

OSPF Areas and Router Types• LSA Type 1 : Router• LSA Type 2 : Network // generated by DR• LSA Type 3 : Summary // ABR summary• LSA Type 4 : Summary ASBR Reachability• LSA Type 5 : Ext LSA // ASBR summary route• LSA Type 7Ext LSA for Stub

Page 32: Ospf Cisco

OSPF Areas and Router Types

Area 0

Page 33: Ospf Cisco

OSPF Areas and Router TypesR1#show run | s ospf

ip ospf network point-to-point

router ospf 1

router-id 1.1.1.1

log-adjacency-changes

area 2 stub

network 1.1.1.1 0.0.0.0 area 2

network 10.1.2.1 0.0.0.0 area 2

R2#sho run | s ospf ip ospf network point-to-pointrouter ospf 1 router-id 2.2.2.2 log-adjacency-changes area 2 stub network 2.2.2.2 0.0.0.0 area 0 network 10.1.2.2 0.0.0.0 area 2 network 10.2.3.2 0.0.0.0 area 0

R4#show run | s ospf ip ospf network point-to-pointrouter ospf 1 router-id 4.4.4.4 log-adjacency-changes area 1 stub no-summary network 0.3.4.4 0.0.0.0 area 0 network 4.4.4.4 0.0.0.0 area 1 network 10.3.4.4 0.0.0.0 area 0 network 10.4.5.4 0.0.0.0 area 1

R5#show run | s ospf ip ospf network point-to-pointrouter ospf 1 router-id 5.5.5.5 log-adjacency-changes area 1 stub no-summary network 5.5.5.5 0.0.0.0 area 1 network 10.4.5.5 0.0.0.0 area 1

Page 34: Ospf Cisco

OSPF Areas and Router TypesR1#show ip ospf database

OSPF Router with ID (1.1.1.1) (Process ID 1)

Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count

1.1.1.1 1.1.1.1 448 0x8000000B 0x000657 32.2.2.2 2.2.2.2 520 0x80000008 0x0090DD 2

Summary Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum0.0.0.0 2.2.2.2 520 0x80000002 0x0073C12.2.2.0 2.2.2.2 16 0x80000004 0x0027063.3.3.0 2.2.2.2 520 0x80000003 0x0087634.4.4.0 2.2.2.2 1700 0x80000001 0x00E9BF5.5.5.0 2.2.2.2 1448 0x80000001 0x00481E10.2.3.0 2.2.2.2 520 0x80000003 0x002EB710.3.4.0 2.2.2.2 520 0x80000003 0x00990A10.4.5.0 2.2.2.2 1674 0x80000001 0x00095AR1#show ip route

Gateway of last resort is 10.1.2.2 to network 0.0.0.0

1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnetsO IA 2.2.2.0 [110/65] via 10.1.2.2, 00:38:46, Serial0/0 3.0.0.0/24 is subnetted, 1 subnetsO IA 3.3.3.0 [110/129] via 10.1.2.2, 00:38:46, Serial0/0 4.0.0.0/24 is subnetted, 1 subnetsO IA 4.4.4.0 [110/193] via 10.1.2.2, 00:28:31, Serial0/0 5.0.0.0/24 is subnetted, 1 subnetsO IA 5.5.5.0 [110/257] via 10.1.2.2, 00:24:18, Serial0/0 10.0.0.0/24 is subnetted, 4 subnetsC 10.1.2.0 is directly connected, Serial0/0O IA 10.4.5.0 [110/256] via 10.1.2.2, 00:28:04, Serial0/0O IA 10.2.3.0 [110/128] via 10.1.2.2, 00:38:47, Serial0/0O IA 10.3.4.0 [110/192] via 10.1.2.2, 00:38:47, Serial0/0O*IA 0.0.0.0/0 [110/65] via 10.1.2.2, 00:38:47, Serial0/0

R5#show ip ospf database

OSPF Router with ID (5.5.5.5) (Process ID 1)

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count4.4.4.4 4.4.4.4 1657 0x80000005 0x00A87D 35.5.5.5 5.5.5.5 1657 0x80000005 0x00A579 3

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum0.0.0.0 4.4.4.4 1662 0x80000001 0x0039F4R5#show ip routeCodes: 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 10.4.5.4 to network 0.0.0.0

4.0.0.0/24 is subnetted, 1 subnetsO 4.4.4.0 [110/65] via 10.4.5.4, 00:27:40, Serial0/0 5.0.0.0/24 is subnetted, 1 subnetsC 5.5.5.0 is directly connected, Loopback0 10.0.0.0/24 is subnetted, 1 subnetsC 10.4.5.0 is directly connected, Serial0/0O*IA 0.0.0.0/0 [110/65] via 10.4.5.4, 00:27:40, Serial0/0

Page 35: Ospf Cisco

OSPF Areas and Router Types

Page 36: Ospf Cisco

OSPF Areas and Router TypesR5# show run | s ospf

ip ospf network point-to-point

router ospf 1

router-id 5.5.5.5

log-adjacency-changes

area 1 nssa

redistribute rip subnets

network 5.5.5.5 0.0.0.0 area 1

network 10.4.5.5 0.0.0.0 area 1

R4#show run | s ospf ip ospf network point-to-pointrouter ospf 1 router-id 4.4.4.4 log-adjacency-changes area 1 nssa network 0.3.4.4 0.0.0.0 area 0 network 4.4.4.4 0.0.0.0 area 1 network 10.3.4.4 0.0.0.0 area 0 network 10.4.5.4 0.0.0.0 area 1

R5#show ip ospf data

OSPF Router with ID (5.5.5.5) (Process ID 1)

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count4.4.4.4 4.4.4.4 80 0x8000000A 0x002CEA 35.5.5.5 5.5.5.5 81 0x8000000B 0x005AB4 3

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum1.1.1.0 4.4.4.4 85 0x80000002 0x00223F2.2.2.0 4.4.4.4 85 0x80000002 0x007B233.3.3.0 4.4.4.4 85 0x80000002 0x00D40710.1.2.0 4.4.4.4 85 0x80000002 0x0097C010.2.3.0 4.4.4.4 85 0x80000002 0x00FD9810.3.4.0 4.4.4.4 85 0x80000002 0x006470

Type-7 AS External Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Tag172.16.1.0 5.5.5.5 128 0x80000001 0x002789 0

R4#show ip route

1.0.0.0/24 is subnetted, 1 subnetsO IA 1.1.1.0 [110/193] via 10.3.4.3, 00:00:53, Serial0/0 2.0.0.0/24 is subnetted, 1 subnetsO 2.2.2.0 [110/129] via 10.3.4.3, 00:01:03, Serial0/0 3.0.0.0/24 is subnetted, 1 subnetsO 3.3.3.0 [110/65] via 10.3.4.3, 00:01:03, Serial0/0 4.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback0 5.0.0.0/24 is subnetted, 1 subnetsO 5.5.5.0 [110/65] via 10.4.5.5, 00:00:53, Serial0/1 172.16.0.0/24 is subnetted, 1 subnetsO N2 172.16.1.0 [110/20] via 10.4.5.5, 00:00:53, Serial0/1 10.0.0.0/24 is subnetted, 4 subnetsO IA 10.1.2.0 [110/192] via 10.3.4.3, 00:00:53, Serial0/0C 10.4.5.0 is directly connected, Serial0/1O 10.2.3.0 [110/128] via 10.3.4.3, 00:01:03, Serial0/0C 10.3.4.0 is directly connected, Serial0/0O E2 192.168.1.0/24 [110/20] via 10.3.4.3, 00:00:53, Serial0/0

Page 37: Ospf Cisco

OSPF Areas and Router Types

Page 38: Ospf Cisco

OSPF Areas and Router TypesR4#show run | s ospf

ip ospf network point-to-point

router ospf 1

router-id 4.4.4.4

log-adjacency-changes

area 1 nssa no-summary

network 0.3.4.4 0.0.0.0 area 0

network 4.4.4.4 0.0.0.0 area 1

network 10.3.4.4 0.0.0.0 area 0

network 10.4.5.4 0.0.0.0 area 1

R5#show ip ospf data

OSPF Router with ID (5.5.5.5) (Process ID 1)

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count4.4.4.4 4.4.4.4 761 0x8000000A 0x002CEA 35.5.5.5 5.5.5.5 762 0x8000000B 0x005AB4 3

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum0.0.0.0 4.4.4.4 19 0x80000001 0x00C065

Type-7 AS External Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Tag172.16.1.0 5.5.5.5 809 0x80000001 0x002789 0R5#show ip route

Gateway of last resort is 10.4.5.4 to network 0.0.0.0

4.0.0.0/24 is subnetted, 1 subnetsO 4.4.4.0 [110/65] via 10.4.5.4, 00:12:59, Serial0/0 5.0.0.0/24 is subnetted, 1 subnetsC 5.5.5.0 is directly connected, Loopback0 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, Loopback10 10.0.0.0/24 is subnetted, 1 subnetsC 10.4.5.0 is directly connected, Serial0/0O*IA 0.0.0.0/0 [110/65] via 10.4.5.4, 00:00:40, Serial0/0

Page 39: Ospf Cisco

OSPF Authentication

• Both md5 and clear text authentication is supported.

• Komut olarak hem area’nin hemde ilgili interface’in altina girmek mumkun, takip edilebilirlik acsindan interface’in altina girmek daha mantikli.

• ip ospf message-digest-key 1 md5 alp • ip ospf authentication key alp // for clear text