Open Shortest Path First Pedro Tsao Email PedroTsaodlink

  • Slides: 48
Download presentation
Open Shortest Path First Pedro Tsao E-mail: Pedro_Tsao@dlink. com. tw

Open Shortest Path First Pedro Tsao E-mail: Pedro_Tsao@dlink. com. tw

Agenda l. Link state l. OSPF Areas l. OSPF behavior l. OSPF Packets Type

Agenda l. Link state l. OSPF Areas l. OSPF behavior l. OSPF Packets Type l. OSPF Network Type l. OSPF LSA Type l. OSPF Route Summarization l. Configuring OSPF Special Area types l. Configuring OSPF Authentication

Link State

Link State

Link State The information available to a distance vector router has been compared to

Link State The information available to a distance vector router has been compared to the information available from a road sign. Link state routing protocol are like a road map. Link State routing include the following: • Open Shortest Path First (OSPF) for IP • The ISO’s Intermediate System-to-Intermediate System (IS-IS) for CLNS and IP • DEC’s DNA Phase V • Novell’s Net. Ware Link Services Protocol (NLSP)

OSPF as a Link-State Protocol • OSPF propagates link-state advertisements rather than routing table

OSPF as a Link-State Protocol • OSPF propagates link-state advertisements rather than routing table updates • LSAs are flooded to all OSPF routers in the area • The OSPF link-state database(LSDB) is pieced together from the LSAs generated by the OSPF routers • OSPF use the SPF algorithm to calculate the shortest path to a destination ØLink = router interface ØState = description of an interface and its relationship to neighboring routers

Link State Data Structures – Neighbor table: l Also known as the adjacency database

Link State Data Structures – Neighbor table: l Also known as the adjacency database l Contains list of recognized neighbors – Topology table: l Typically referred to as LSDB l Contains all routers and their attached links in the area or network l Identical LSDB for all routers within an area – Routing table: l Commonly named a forwarding database l Contains list of best paths to destinations

Link State Routing Protocol l. Link-state routers recognize more information about the network than

Link State Routing Protocol l. Link-state routers recognize more information about the network than their distance vector counterparts. l. Each router has a full picture of the topology. l. Consequently, link-state routers tend to make more accurate decisions.

OSPF Areas

OSPF Areas

Link State Data Structure: Network Hierarchy l. Link-state routing requires a hierachical network structure

Link State Data Structure: Network Hierarchy l. Link-state routing requires a hierachical network structure that is enforced by OSPF. l. This two-level hierarchy consists of the following: • Transit area (backbone or area 0) • Regular areas (non-backbone areas)

OSPF Areas Backbone Area OSPF area characteristics: l. Minimizes routing table entries l. Localizes

OSPF Areas Backbone Area OSPF area characteristics: l. Minimizes routing table entries l. Localizes impact of a topology change within an area l. Detailed LSA flooding stops at the area boundary l. Requires a hierarchical network design Area 1 Area 2 Area 3

OSPF Terminology Backbone Area l. Router A and B are backbone routers l. Backbone

OSPF Terminology Backbone Area l. Router A and B are backbone routers l. Backbone routers make up area 0 l. Router C, D and E are known as Area Border Routers (ABRs) l. ABRs attach all other areas to area 0 Area 1 Area 2 Area 3

OSPF Behavior

OSPF Behavior

OSPF Adjacencies Hello l. Routers discover neighbors by exchange hello packets l. Routers declare

OSPF Adjacencies Hello l. Routers discover neighbors by exchange hello packets l. Routers declare neighbors to be up after checking certain parameters or options in the hello packet

Forming OSPF Adjacencies l Point-to-point WAN links: ØBoth neighbors become full adjacent l LAN

Forming OSPF Adjacencies l Point-to-point WAN links: ØBoth neighbors become full adjacent l LAN Links ØNeighbors form a full adjacency with the DR and BDR ØRouters maintain two-way state with the other routers (DROTHERs) l Routing updates and topology information are passed only between adjacent routers l Once an adjacency is formed, LSDBs are synchronized by exchanging LSAs l LSAs are flooded reliably through the area (or network)

OSPF Router ID l. The Router is Known to OSPF by the OSPF router

OSPF Router ID l. The Router is Known to OSPF by the OSPF router ID number l. LSDBs use the OSPF router ID to differentiate one router from the next In descending other of specificity, the Router-id may be one of following: • Router-id command • Highest loopback address • Highest Active IP address

OSPF DR/BDR Election DR/BDR will be electing by the following rules: • The router

OSPF DR/BDR Election DR/BDR will be electing by the following rules: • The router With Highest priority value is the DR • The router with the second highest priority value is BDR • In case of a tie. The highest Router ID is DR, the second is BDR • A router with priority of 0 cannot be the DR or BDR • A router that’s not DR or BDR is a DROther • If a router with higher priority comes into the network, it does not preempt the DR or BDR

OSPF Calculation Routers find the best paths to destinations by applying Dijkstra’s SPF algorithm

OSPF Calculation Routers find the best paths to destinations by applying Dijkstra’s SPF algorithm to linkstate database as follows: l. Every router in an area has the identical link-state DB l. Each router in the area places itself into the root of the tree that is built l. The best path is calculated with respect to the lowest total cost of links to a specific destination l. Best routes are put into the forwarding database(routing table)

OSPF Calculation(cont. ) Link-state DB Shortest Path x x B A C Dijkstra’s algorithm

OSPF Calculation(cont. ) Link-state DB Shortest Path x x B A C Dijkstra’s algorithm C D D E E F G H F Assume all links are Ethernet, with an OSPF cost of 10 G H

OSPF Packets Type

OSPF Packets Type

OSPF Packet Types 1. Hello 2. Destination Description 3. Link-State Request 4. Link-State Update

OSPF Packet Types 1. Hello 2. Destination Description 3. Link-State Request 4. Link-State Update 5. Link-State Acknowledgement

Neighborship: The Hello Packet Hello hello • Entry must match on neighboring routers •

Neighborship: The Hello Packet Hello hello • Entry must match on neighboring routers • Router ID • Hello and dead intervals • Neighbors • Area ID • Router priority • DR IP address • BDR IP address • Authentication password • Stub area flag

Establishing Bidirectional Communication Port 2 172. 16. 5. 1/24 A Port 1 172. 16.

Establishing Bidirectional Communication Port 2 172. 16. 5. 1/24 A Port 1 172. 16. 5. 2/24 B Down state hello I am router id 172. 16. 5. 1, and I see no one To 224. 0. 0. 5 Initial State Router B neighbor List 172. 16. 5. 1/24, in Port 2 Unicast to A I am router id 172. 16. 5. 2, and I see 172. 16. 5. 1 Router A neighbor List 172. 16. 5. 2/24, in Port 1 Two-way State hello

Discovering the Network Routes Port 2 172. 16. 5. 1/24 A Port 1 172.

Discovering the Network Routes Port 2 172. 16. 5. 1/24 A Port 1 172. 16. 5. 2/24 B Exstart state DBD I will start exchange because I have router id 172. 16. 5. 1 No, I’ll start exchange because I have a higher RID DBD exchange State Here is a summary of my LSDB DBD

Adding the Link-State Entries Port 2 172. 16. 5. 1/24 A LSAck Port 1

Adding the Link-State Entries Port 2 172. 16. 5. 1/24 A LSAck Port 1 172. 16. 5. 2/24 Thanks for the information! B LSAck Loading state LSR I need complete entry for network 172. 16. 6. 0/24 Here is the entry for network 172. 16. 6. 0/24 LSAck Thanks for the information! Full State LSU

Case Study: OSPF Packets Area 0 int 1 172. 17. 1. 1/24 int 2

Case Study: OSPF Packets Area 0 int 1 172. 17. 1. 1/24 int 2 172. 17. 2. 1/24 Router ID: 2. 2 int 1 10. 1. 1. 3/24 System 10. 1. 1. 2/24 Router ID: 1. 1 int 1 192. 168. 1. 1/24 Area 2 int 2 192. 168. 2. 1/24

Link-State Data Structures: LSA Operation LSA IS entry in LSDB? YES NO NO Add

Link-State Data Structures: LSA Operation LSA IS entry in LSDB? YES NO NO Add to DB Is seq# the same? YES Is seq# higher? Send LSAck NO Flood LSA Send LSU with newer information to source Run SPF to calculate new routing table END Ignore LSA

Maintaining Routing Information 3 DR 1 2 A B l. Router A notifies all

Maintaining Routing Information 3 DR 1 2 A B l. Router A notifies all OSPF DRs on 224. 0. 0. 6 l. DR notifies others on 224. 0. 0. 5

Command (OSPF) Command Parameters Enable ospf Disable ospf create ospf area <area_id> type [normal

Command (OSPF) Command Parameters Enable ospf Disable ospf create ospf area <area_id> type [normal | stub {stub_summary [enable | disable] | metric <value 0 -65535>} create ospf host_route <ipaddr> {area <area_id> | metric <value 1 -65535>} create ospf aggregation <area_id> <network_address> lsdb_type summary {advertise [enabled | disabled]} config ospf ipif [ipif <ipif_name 12> | all] {area <area_id> | priority <value> | hello_interval <sec 1 -65535> | dead_interval <sec 1 -65535> | authentication [none | simple <password 8> | md 5 <key_id 1255>] | metric <value 1 -65535> | state [enable | disable] | active | passive} create ospf virtual_link <area_id> <neighbor_id> {hello_interval <sec 1 -65535> | dead_interval <sec 1 -65535> | authentication [none | simple <password 8> | md 5 <key_id 1 -255>]}

Case Study: OSPF Configuration(D-Link) Area 0 DES-3852 int 1 172. 17. 1. 1/24 int

Case Study: OSPF Configuration(D-Link) Area 0 DES-3852 int 1 172. 17. 1. 1/24 int 2 172. 17. 2. 1/24 Router ID: 2. 2 System 10. 1. 1. 3/24 DES-3828 P System 10. 1. 1. 2/24 Router ID: 1. 1 int 1 192. 168. 1. 1/24 Area 2 int 2 192. 168. 1. 1/24

int 1 172. 17. 1. 1/24 int 2 172. 17. 2. 1/24 DES-3852 #

int 1 172. 17. 1. 1/24 int 2 172. 17. 2. 1/24 DES-3852 # OSPF config ospf ipif System area 0. 0 state enable config ospf ipif int 1 area 0. 0 state enable config ospf ipif int 2 area 0. 0 state enable config ospf router_id 2. 2 enable ospf System 10. 1. 1. 3/24 System 10. 1. 1. 2/24 DES-3828 P # OSPF create ospf area 0. 0. 0. 2 type normal config ospf ipif System area 0. 0 state enable config ospf ipif int 1 area 0. 0. 0. 2 state enable config ospf ipif int 2 area 0. 0. 0. 2 state enable config ospf router_id 1. 1 enable ospf int 1 192. 168. 1. 1/24 int 2 192. 168. 1. 1/24

int 1 172. 17. 1. 1/24 int 2 172. 17. 2. 1/24 DES-3852 #

int 1 172. 17. 1. 1/24 int 2 172. 17. 2. 1/24 DES-3852 # OSPF config ospf ipif System area 0. 0 state enable config ospf ipif int 1 area 0. 0 state enable config ospf ipif int 2 area 0. 0 state enable config ospf router_id 2. 2 enable ospf System 10. 1. 1. 3/24 System 10. 1. 1. 2/24 DES-3828 P # OSPF create ospf area 0. 0. 0. 2 type normal config ospf ipif System area 0. 0 state enable config ospf ipif int 1 area 0. 0. 0. 2 state enable config ospf ipif int 2 area 0. 0. 0. 2 state enable config ospf router_id 1. 1 enable ospf int 1 192. 168. 1. 1/24 int 2 192. 168. 1. 1/24

int 1 172. 17. 1. 1/24 int 2 172. 17. 2. 1/24 DES-3852 #

int 1 172. 17. 1. 1/24 int 2 172. 17. 2. 1/24 DES-3852 # OSPF config ospf ipif System area 0. 0 state enable config ospf ipif int 1 area 0. 0 state enable config ospf ipif int 2 area 0. 0 state enable config ospf router_id 2. 2 enable ospf System 10. 1. 1. 3/24 System 10. 1. 1. 2/24 DES-3828 P # OSPF create ospf area 0. 0. 0. 2 type normal config ospf ipif System area 0. 0 state enable config ospf ipif int 1 area 0. 0. 0. 2 state enable config ospf ipif int 2 area 0. 0. 0. 2 state enable config ospf router_id 1. 1 enable ospf int 1 192. 168. 1. 1/24 int 2 192. 168. 1. 1/24

Case Study: OSPF Configuration(Cisco) Fa 1/3 10. 1. 3. 2/24 Fa 1/1 88. 88.

Case Study: OSPF Configuration(Cisco) Fa 1/3 10. 1. 3. 2/24 Fa 1/1 88. 88. 88/24 SW 3 Area 0 Fa 1/2 10. 1. 2. 1/24 Area 1 SW 2 Fa 1/1 172. 31. 1. 2/24 Fa 1/3 10. 1. 3. 1/24 Fa 1/2 10. 1. 2. 1/24 SW 1 Fa 1/1 172. 31. 1. 1/24 SW 4 Fa 1/2 99. 99. 99/24 Area 3 • X is the Switch Number • Each Switch has a loopback: X. X/32 except SW 3

OSPF Network Type

OSPF Network Type

OSPF Network Type The three types of networks defined by OSPF are: l. Point-to-point:

OSPF Network Type The three types of networks defined by OSPF are: l. Point-to-point: A network that joins a single pair of routers l. Broadcast: A multiaccess broadcast network, such as Ethernet l. Non-Broadcast multiaccess(also called NBMA): A network that interconnects more than two routers but that has no broadcast capability. Frame Relay, X. 25 and ATM are examples of NBMA networks

Point-to-point Links l. Usually a serial interface running either PPP or HDLC l. May

Point-to-point Links l. Usually a serial interface running either PPP or HDLC l. May also be a point-to-point interface running Frame Relay or ATM l. No DR or BDR election required l. OSPF autodetects this interface type l. OSPF packets are send using multicast 224. 0. 0. 5

Broadcast Network l. Generally these are LAN technologies like Ethernet and Token Ring l.

Broadcast Network l. Generally these are LAN technologies like Ethernet and Token Ring l. DR and BDR election are required l. All neighbor routers form full adjacencies with the DR and BDR only l. Packets to the DR and BDR use 224. 0. 0. 6 l. Packets from DR to all other routers use 224. 0. 0. 5

Electing the DR and BDR Hello l. Hello packets are exchange via IP multicast

Electing the DR and BDR Hello l. Hello packets are exchange via IP multicast l. The router with the highest priority is selected as the BR. The second-highest one is the BDR l. Use the OSPF RID as the tie breaker l. The DR election is nonpreemptive

OSPF Network Type summary OSPF Mode NBMA Preferred Topology Subnet Address Hello Timer Adjacency

OSPF Network Type summary OSPF Mode NBMA Preferred Topology Subnet Address Hello Timer Adjacency RFC or Cisco Broadcast Full or partial mesh Same 10 sec Automatic, DR/BDR elected Cisco Nonbroadcast (NBMA) Full or partial mesh Same 30 sec Manual configuration, DR/BDR elected RFC Point-tomultipoint Partial-mesh or star Same 30 Sec Automatic, no DR/BDR RFC Point-tomultipoint nonbroadcast partial-mesh or star Same 30 sec Manual configuration, no/DR/BDR Cisco Point-to-point Partial-mesh or star, using subinterface Different for Each Subinterface 10 sec Automatic, no DR/BDR Cisco

OSPF Router Type Area 0 ABR and Backbone Router Backbone/Internal routers ABR and Backbone

OSPF Router Type Area 0 ABR and Backbone Router Backbone/Internal routers ABR and Backbone Router Area 1 External AS Area 2 ASBR and Backbone Router

OSPF Virtual Link Area 1 172. 16. 0. 0 Area 0 10. 0 A

OSPF Virtual Link Area 1 172. 16. 0. 0 Area 0 10. 0 A Virtual Link Area 0 10. 0 B • Virtual links are used to connect a discontinuous area to area 0 • A logical connection is built between router A and router B • Virtual links are recommended for backup or temporary connections

Case Study: OSPF Virtual Link (D-Link)

Case Study: OSPF Virtual Link (D-Link)

Case Study: OSPF Virtual Link (Cisco)

Case Study: OSPF Virtual Link (Cisco)

Q&A

Q&A

END

END