Open standard protocol Successor of RIP Classless routing protocol Uses Shortest Path First (SPF) Algorithm Updates are sent through Multicast IP address Administrative distance is 110 Metric = Cost =10 8 /Bandwidth in bps (CISCO) Open Shortest Path First
Hello packets are sent every 10 seconds Faster Convergence Hierarchical design with Multiple Areas Area 0 is called the backbone area Router ID The highest IP address of the active physical interface of the router is elected as Router ID. If logical interface is configured, the highest IP address of the logical interface is elected as Router ID OSPF (contd..)
It maintains three tables : Neighbor Table Neighbor table contains information about the directly connected OSPF neighbors forming adjacency. Database table Database table contains information about the entire view of the topology with respect to each router. Routing information Table Routing table contains information about the best path calculated by the shortest path first algorithm in the database table. OSPF Tables
OSPF - Network Diagram LAN /24LAN – /24LAN /24 AREA 0 E /24 E /24 E / /8 S0 S / /8 S0 S /8
OSPF Packet Types Hello DBD (Database Descriptor) LSR (Link State Request) LSU (Link State Update) LSAck (Link State Acknowledge)
OSPF States DOWN Init 2-Way Ex-Start Exchange Loading Full
How OSPF Works /8 SO /8 S1 DOWN STATE I am router ID and I see no one. INIT STATE Router HYD Neighbors List /24, int s1 I am router ID and I see Router CHE Neighbors List /16, int s0 2-way STATE
/8 SO /8 S1 No, I will start exchange because I have a higher router ID I will start exchange because I have router ID Ex-Start STATE Here is a summary of my link-state database Exchange State Here is a summary of my link-state database How OSPF Works
/8 SO /8 S1 Thanks for the Information Loading State I need the complete entry for network /16 Here is the entry for network /16 Thanks for the Information! Full State How OSPF Works
Consumes More Memory and CPU processing Disadvantages of OSPF
exit Hyderabad(config-if)# Hyderabad(config)# telnet ================================ Welcome to Hyderabad Router ================================ User Access Verification password : **** **** enable configure terminal interface serial 0 ip address no shut clockrate encapsulation hdlc Hyderabad> password : Hyderabad# Enter configuration commands, one per line. End with CNTL/Z. Hyderabad(config)# Hyderabad(config-if)# Microsoft Windows 2000 [Version ] (C) Copyright Microsoft Corp. C:\> Connecting..... Directly Connected Networks on HYDERABAD Router Directly Connected Networks on HYDERABAD Router
Hyderabad(config)# router ospf 1 Hyderabad(config-router)# network area 0 network area 0 no ip routing Hyderabad(config)# ip routing Configuring OSPF Router(config)# router ospf Router(config-router)# network area Configuring OSPF Router(config)# router ospf Router(config-router)# network area
show ip route Hyderabad# 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,*- candidate default U - per-user static route, o - ODR Gateway of last resort is not set C /8 is directly connected, Serial0 O /8 [110/128] via , 00:00:36, Serial0 C /24 is directly connected, Ethernet0 O /24 [110/74] via , 00:00:36, Serial0 O /24 [110/138] via , 00:00:36, Serial0 Hyderabad# ^ Z O – for OSPF routes 110 is nothing but Administrative Distance Metric of OSPF Cost Metric of OSPF Cost Hyderabad(config)# router ospf 1 Hyderabad(config-router)# network area 0 Hyderabad(config-router)#network area 0 no ip routingHyderabad(config)# ip routing
show ip ospf database Hyderabad# OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link x x897B x x x xD328 3 Hyderabad# show ip ospf neighbor Neighbor ID Pri State Dead Time Address FULL/ - 00:00: Hyderabad#
Chennai(config-if)# ================================ Welcome to Chennai Router ================================ User Access Verification password : **** **** enable configure terminal ip address no shut encapsulation hdlc interface serial 0 Chennai> password : Chennai# Enter configuration commands, one per line. End with CNTL/Z. Chennai(config)# Chennai(config-if)# Microsoft Windows 2000 [Version ] (C) Copyright Microsoft Corp. C:\> Connecting..... Chennai(config-if)# telnet interface serial 1 ip address no shut encapsulation hdlc Directly Connected Networks on CHENNAI Router Directly Connected Networks on CHENNAI Router
Chennai(config)# router ospf 2 Chennai(config-router)# network area 0 network area 0 no ip routing Chennai(config)# ip routing network area 0 Chennai(config-router)# Configuring OSPF Router(config)# router ospf Router(config-router)# network area Configuring OSPF Router(config)# router ospf Router(config-router)# network area
show ip route Chennai# 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,*- candidate default U - per-user static route, o - ODR Gateway of last resort is not set C /8 is directly connected, Serial1 C /8 is directly connected, Serial0 O /24 [110/74] via , 00:01:33, Serial1 C /24 is directly connected, Ethernet0 O /24 [110/74] via , 00:01:33, Serial0 Chennai# ^ Z O – for OSPF routes 110 is nothing but Administrative Distance Metric of OSPF Cost Metric of OSPF Cost Chennai(config)# router ospf 2 Chennai(config-router)# network area 0 Chennai(config-router)#network area 0 no ip routingChennai(config)# ip routing network area 0 Chennai(config-router)#
show ip ospf database Chennai# OSPF Router with ID ( ) (Process ID 2) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link x x897B x x x xD328 3 Chennai # show ip ospf neighbor Neighbor ID Pri State Dead Time Address FULL/ - 00:00: FULL/ - 00:00: Chennai#
exit Banglore(config-if)# Banglore(config)# ================================ Welcome to Banglore Router ================================ User Access Verification password : **** **** enable configure terminal ip address no shut clockrate encapsulation hdlc Banglore> password : Banglore# Enter configuration commands, one per line. End with CNTL/Z. Banglore(config)# Banglore(config-if)# Microsoft Windows 2000 [Version ] (C) Copyright Microsoft Corp. C:\> Connecting..... telnet interface serial 1 Directly Connected Networks on Banglore Router Directly Connected Networks on Banglore Router
Banglore(config)# router ospf 1 Banglore(config-router)# network area 0 no ip routing Banglore(config)# ip routing network area 0 Configuring OSPF Router(config)# router ospf Router(config-router)# network area Configuring OSPF Router(config)# router ospf Router(config-router)# network area
show ip route Banglore# 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,*- candidate default U - per-user static route, o - ODR Gateway of last resort is not set O /8 [110/128] via , 00:02:09, Serial1 C /8 is directly connected, Serial1 O /24 [110/138] via , 00:02:09, Serial1 O /24 [110/74] via , 00:02:09, Serial1 C /24 is directly connected, Ethernet0 Banglore# ^ Z O – for OSPF routes 110 is nothing but Administrative Distance Metric of OSPF Cost Metric of OSPF Cost Banglore(config)# router ospf 1 Banglore(config-router)# network area 0 Banglore(config-router)# no ip routingBanglore(config)# ip routing network area 0
show ip ospf database Banglore# OSPF Router with ID ( ) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link x x897B x x x xD328 3 Banglore# show ip ospf neighbor Neighbor ID Pri State Dead Time Address FULL/ - 00:00: Banglore#
ping Hyderabad# Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms Hyderabad# !!!!! ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms Hyderabad# !!!!!
ping Chennai# Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms Chennai# !!!!! ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms Chennai# !!!!!
ping Banglore# Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms Banglore# !!!!! ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms Banglore# !!!!!