Open Shortest Path First OSPF n n Open

  • Slides: 43
Download presentation
Open Shortest Path First (OSPF) n n Open Shortest Path First (OSPF) is an

Open Shortest Path First (OSPF) n n Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network vendors This works by using the Dijkstra algorithm First, a shortest path tree is constructed, and then the routing table is populated with the resulting best paths OSPF converges quickly

Open Shortest Path First (OSPF) OSPF provides the following features: n Consists of areas

Open Shortest Path First (OSPF) OSPF provides the following features: n Consists of areas and autonomous systems n Minimizes routing update traffic n Allows scalability n Supports VLSM/CIDR n Has unlimited hop count n Allows multi-vendor deployment (open standard)

Open Shortest Path First (OSPF) n n OSPF is supposed to be designed in

Open Shortest Path First (OSPF) n n OSPF is supposed to be designed in a hierarchical fashion, which basically means that you can separate the larger network into smaller networks called areas. The reasons for creating OSPF in a hierarchical design include: n n n To decrease routing overhead To speed up convergence To confine network instability to single areas of the network

Open Shortest Path First (OSPF)

Open Shortest Path First (OSPF)

Open Shortest Path First (OSPF) n n Each area connects to the backbone—called area

Open Shortest Path First (OSPF) n n Each area connects to the backbone—called area 0, or the backbone area OSPF must have an area 0, and all routers should connect to this area if at all possible Routers that connect other areas to the backbone within an AS are called Area Border Routers (ABRs) Still, at least one interface must be in area 0

Open Shortest Path First (OSPF) n n OSPF runs inside an autonomous system, but

Open Shortest Path First (OSPF) n n OSPF runs inside an autonomous system, but can also connect multiple autonomous systems together The router that connects these AS’es together is called an Autonomous System Boundary Router (ASBR).

OSPF Terminology n n n Following are important OSPF terms to familiarize yourself Link

OSPF Terminology n n n Following are important OSPF terms to familiarize yourself Link A link is a network or router interface assigned to any given network. When an interface is added to the OSPF process, it’s considered by OSPF to be a link. This link, or interface, will have state information associated with it (up or down) as well as one or more IP addresses. Router ID The Router ID (RID) is an IP address used to identify the router. OSPF chooses the highest IP address of all active physical interfaces

OSPF Terminology n n Neighbors are two or more routers that have an interface

OSPF Terminology n n Neighbors are two or more routers that have an interface on a common network, such as two routers connected on a point-to-point serial link Adjacency An adjacency is a relationship between two OSPF routers that permits the direct exchange of route updates n OSPF directly shares routes only with neighbors that have also established adjacencies. And not all neighbors will become adjacent—this depends upon both the type of network and the configuration of the routers

OSPF Terminology n Hello protocol The OSPF Hello protocol provides dynamic neighbor discovery and

OSPF Terminology n Hello protocol The OSPF Hello protocol provides dynamic neighbor discovery and maintains neighbor relationships n n Hello packets are addressed to 224. 0. 0. 5. Neighborship database The neighborship database is a list of all OSPF routers for which Hello packets have been seen n A variety of details, including the Router ID and state, are maintained on each router in the neighborship database

OSPF Terminology n Topology database The topology database contains information from all of the

OSPF Terminology n Topology database The topology database contains information from all of the Link State Advertisement packets that have been received for an area n n The router uses the information from the topology database as input into the Dijkstra algorithm that computes the shortest path to every network Link State Advertisement A Link State Advertisement (LSA) is an OSPF data packet containing link-state and routing information that’s shared among OSPF routers n n There are different types of LSA packets An OSPF router will exchange LSA packets only with routers to which it has established adjacencies

OSPF Terminology n n n n Designated router A designated router (DR) is elected

OSPF Terminology n n n n Designated router A designated router (DR) is elected whenever OSPF routers are connected to the same multi-access network They are networks that have multiple recipients A prime example is an Ethernet LAN To minimize the number of adjacencies formed, a DR is chosen (elected) to send/receive routing information to/from the remaining routers on the broadcast network or link This ensures that their topology tables are synchronized All routers on the shared network will establish adjacencies with the DR and backup designated router (BDR) The election is won by the router with the highest priority, and the Router ID is used as a tiebreaker if the priority of more than one router turns out to be the same

OSPF Terminology n n n n n Backup designated router A backup designated router

OSPF Terminology n n n n n Backup designated router A backup designated router (BDR) is a hot standby for the DR on multi-access links The BDR receives all routing updates from OSPF adjacent routers, but doesn’t flood LSA updates OSPF areas An OSPF area is a grouping of contiguous networks and routers All routers in the same area share a common Area ID A router can be a member of more than one area so, the Area ID is associated with specific interfaces on the router This would allow some interfaces to belong to area 1 while the remaining interfaces can belong to area 0 All of the routers within the same area have the same topology table There must exist an area 0, typically configured on the routers that connect to the backbone of the network Areas also play a role in establishing a hierarchical network organization

OSPF Terminology n Broadcast (multi-access) networks such as Ethernet allow multiple devices to connect

OSPF Terminology n Broadcast (multi-access) networks such as Ethernet allow multiple devices to connect to (or access) the same network, as well as provide a broadcast ability in which a single packet is delivered to all nodes on the network n n In OSPF, a DR and a BDR must be elected for each broadcast multi-access network Non-broadcast multi-access (NBMA) networks are types such as Frame Relay, X. 25, and Asynchronous Transfer Mode (ATM) n n These networks allow for multi-access, but have no broadcast ability like Ethernet So, NBMA networks require special OSPF configuration to function properly and neighbor relationships must be defined

OSPF Terminology n Point-to-point refers to a type of network topology consisting of a

OSPF Terminology n Point-to-point refers to a type of network topology consisting of a direct connection between two routers that provides a single communication path n n The point-to-point connection can be physical, as in a serial cable directly connecting two routers, or it can be logical, as in two routers that are thousands of miles apart yet connected by a circuit in a Frame Relay network This type of configuration eliminates the need for DRs or BDRs—but neighbors are discovered automatically

OSPF Terminology n Point-to-multipoint refers to a type of network topology consisting of a

OSPF Terminology n Point-to-multipoint refers to a type of network topology consisting of a series of connections between a single interface on one router and multiple destination routers n n All of the interfaces on all of the routers sharing the point-to-multipoint connection belong to the same network As with point-to-point, no DRs or BDRs are needed

OSPF n n n The DR is responsible for distributing all LSAs to every

OSPF n n n The DR is responsible for distributing all LSAs to every OSPF router on that network and it is also responsible for generating a separate LSA for that multi access network The BDR becomes the DR if the current DR goes down After BDR becomes the DR, a new BDR is elected

OSPF n n If OSPF used broadcast packets to exchange routing information, all nodes

OSPF n n If OSPF used broadcast packets to exchange routing information, all nodes on the network would have to process the packets to determine whether or not the packets were meant for them OSPF uses multicast Destination IP address for all OSPF routers is 244. 0. 0. 5 (called ALLSPFRouters) Destination IP address for designated and backup designated router in OSPF is 244. 0. 0. 6 (called ALLDRouter)

OSPF n OSPF can be a memory intensive protocol n n n All routers

OSPF n OSPF can be a memory intensive protocol n n n All routers store all LSA’s in their link state database On a large network, memory requirements can make OSPF cost prohibitive or may prevent organizations from running the protocol on existing hardware OSPF allows the site to partition its networks and routers in smaller subsets called AREAS n To permit growth and make the networks in an AS easier to manage

OSPF AREAS n n n An AREA is part of the OSPF AS, in

OSPF AREAS n n n An AREA is part of the OSPF AS, in which all routers share a common link state database Router in different areas do not share the same link state database, but information is passed between areas within an AS through other types of LSAs Information is shared between areas but the information a router stores about other areas is not as detailed Using areas, OSPF networks can be logically segmented to decrease the size of routing tables With the introduction of areas, its is no longer true that all routers in the AS have an identical link state database. A router actually has a separate link state

OSPF AREAS n n n An AREA is identified by a number, which is

OSPF AREAS n n n An AREA is identified by a number, which is 32 -bit unsigned integer value Area 0 is reserved for the backbone of the network and all areas must connect to area 0 directly Area numbers can be expressed as decimal integers or in dotted decimal format n n Area 0 Area 2216169484 or or 0. 0 132. 24. 16. 12

OSPF AREAS n Based on its role in an area, a router can be

OSPF AREAS n Based on its role in an area, a router can be one or more of the following types n Internal routers n n A router whose interfaces are all in the same area Backbone routers n n A router with at least one interface in area 0 Backbone routers do not have to be area border routers. Routers with all interfaces connecting to the backbone area are supported

OSPF AREAS n Area Border Router (ABR) n n n A router with at

OSPF AREAS n Area Border Router (ABR) n n n A router with at least one interface in area 0 and at least one interface in an other area Area border routers run multiple copies of the basic algorithm, one copy for each attached area Area border routers condense the topological information of their attached areas for the distribution to the backbone. The backbone in turn distributes the information to other areas

OSPF AREAS n Autonomous System Border Router (ASBR) n n n A router that

OSPF AREAS n Autonomous System Border Router (ASBR) n n n A router that connects an AS running OSPF to another AS running another protocol such as RIP Such a router advertises AS external routing information throughout the Autonomous System The paths to each AS boundary router are known by every router in the AS

OSPF AREAS Area 1 I Area 0 I I ABR, B Area 192. 168.

OSPF AREAS Area 1 I Area 0 I I ABR, B Area 192. 168. 100 Area 1024 I I, B ASBR RIP

OSPF AREAS n n When routing a packet between two nonbackbone areas, the backbone

OSPF AREAS n n When routing a packet between two nonbackbone areas, the backbone is used Looking at this another way, inter-area can be pictured as forcing a star configuration on the autonomous system, with the back bone as hub

Link State Advertisements n LSAs are the means by which OSPF routers communicate information

Link State Advertisements n LSAs are the means by which OSPF routers communicate information for the link state database n LSAs come in several types which are identified by the following type numbers n Type 1 n n Router LSA Every router generates one Router LSA which includes its RID along with a list of all of the routers interfaces including their cost and state These LSAs do not traverse ABRs

Link State Advertisements n Type 2 n n Every DR generates one Network LSA

Link State Advertisements n Type 2 n n Every DR generates one Network LSA for a multiaccess netwok A network LSA includes a list of all routers attached to the MA network Like Type 1, these LSA's are blocked by ABRs and kept in the area itself Type 3 n n n Network LSA: Network Summary LSA: Network summary LSA carry routing information about networks of one area into another area They are generated by ABRs to propagate routing information between areas Network summary LSAs are not included in the SPF algorithm run by routers. They are simply directly inserted into the routing table. In this respect, OSPF behaves as a distance vector routing protocol between areas

Link State Advertisements n n Each summary-LSA describes a route to a destination outside

Link State Advertisements n n Each summary-LSA describes a route to a destination outside the area, yet still inside the AS(i. e. , an interarea route) TYPE 4 ASBR Summary LSA: n n n Also generated by ABRs Similar to Network summary LSA except they contain routing information about a particular host (ASBR) Type 5 n n n AS External LSA: AS external LSA are generated by ASBR routers They advertise routes external to the OSPF AS, such as those from other routing protocols Type 5 LSA are not associated with any particular Area so they are flooded in the entire OSPF AS

OSPF Message Format (Header) 0 8 Version (1) 16 Type 24 Message Length Source

OSPF Message Format (Header) 0 8 Version (1) 16 Type 24 Message Length Source Router IP address Area ID Checksum Authentication Type Authentication (octets 0 – 3) Authentication (octets 4 – 7)

OSPF Message Types n 1) Hello n n 2) Database description n n Request

OSPF Message Types n 1) Hello n n 2) Database description n n Request for more information about a link 4) Link state update n n Topology outline sent to a newly connected router 3) Link state request n n Tests reachability of neighbours Update changes in link status 5) Link state acknowledgment n ACK for every update message

OSPF Hello Message 0 8 16 24 32 OSPF header with Type = 1

OSPF Hello Message 0 8 16 24 32 OSPF header with Type = 1 Network Mask Dead Timer Hello Intr Designated Router Backup Designated Router Neighbor 1 IP Address GWAY PRIO

OSPF Hello Message n n Unlike RIP, OSPF does not regularly broadcast all of

OSPF Hello Message n n Unlike RIP, OSPF does not regularly broadcast all of its routing information OSPF routing updates are incremental, so usually router only send updates when a topology change occurs Instead, routers use Hello packets to let their neighbours know that they are still up and running If a router does not receive a Hello packet for a certain amount of time, it decides that the neighbour must no longer be running

OSPF Hello Message n n On addition to functioning as keepalives between neighbours, Hello

OSPF Hello Message n n On addition to functioning as keepalives between neighbours, Hello packets allow the descovery of OSPF neighbours, establishment of neighbour Timers that are used with Hello packets are n n HELLO INTR DEAD TIMER

OSPF Hello Message n DEAD TIMER n n HELLO INTR n n Time in

OSPF Hello Message n DEAD TIMER n n HELLO INTR n n Time in seconds after which a non-responding neighbour is considered dead (normally 4 times the Hello interval) Time in seconds between hello messages (normally 10 seconds) PRIORITY n n Integer priority of the sender (router) Used during elections for Designated and Backup designated router

OSPF Hello Message n DESIGNATED and BACKUP ROUTER n n IP addresses that gives

OSPF Hello Message n DESIGNATED and BACKUP ROUTER n n IP addresses that gives the senders view of the designated and backup designated router for the network over which this message is sent NEIGHBOR IP ADDRESS n IP address of all neighbours from which the sender has recently received hello messages

OSPF Neighbours n n n OSPF neighbours are routers on the same network that

OSPF Neighbours n n n OSPF neighbours are routers on the same network that agree on certain configuration parameters Routers form a neighbour relationship by analyzing the contents of each others Hello packets to determine whether they agree on the required parameters The following parameters must be matched for routers to become neighbours n n n Area ID Network mask Authentication information Hello Interval Dead Timer

OSPF Neighbours n n If routers don't agree on the parameters, they cannot become

OSPF Neighbours n n If routers don't agree on the parameters, they cannot become neighbours to form adjacencies If the routers agree on these parameters, each router put the Router ID into his own Hello packet with its own RID listed as neighbour, it knows that the neighbour relationship has been formed

OSPF Link Status Update Message (LSU) 0 8 16 OSPF Header with Type =

OSPF Link Status Update Message (LSU) 0 8 16 OSPF Header with Type = 4 Number of LSAs LSA 1 LSA 2 ……… 24

OSPF Link State Advertisement 0 8 16 Link Age 24 Link Type Link ID

OSPF Link State Advertisement 0 8 16 Link Age 24 Link Type Link ID Advertising Router Link Sequence Number Link Checksum Length

OSPF Link Status Advertisement n n n All LSA have an age which is

OSPF Link Status Advertisement n n n All LSA have an age which is measured in seconds When generating an LSA the router sets its age to ZERO Age of the LSA is also kept in the link state database and incremented over time Max. Age is the max amount of time an LSA can exist without being refreshed. Max. Age is 3600 seconds (one hour) If the LSA reaches Max. Age in the database the router will flush the LSA from its database

OSPF Link Status Advertisement n n LSAs are not packets on their own; they

OSPF Link Status Advertisement n n LSAs are not packets on their own; they are contained within Link State update (LSU) packets Several LSAs may be contained in one LSU Every router that receives an LSA for a particular area will flood that LSA out of all other interfaces that are part of that area It does not simply forward the packet instead, it extracts LSAs from the LSU, enters them in its database and builds its own LSU to forward the new or updated LSAs to its adjacent neighbours

Steady-State Operation After a network has stabilized, all routers in the same area have

Steady-State Operation After a network has stabilized, all routers in the same area have the exact same LSAs, and each router has chosen its best routes using SPF, the following is still true of routers running OSPF: n n Each router sends Hellos, based on per-interface hello intervals Each router expects to receive Hellos from neighbors within the dead interval on each interface; if not, the neighbor is considered to have failed Each router originally advertising an LSA refloods each LSA based on a per-LSA Link-State Refresh (LSRefresh) interval (default 30 minutes) Each router expects to have its LSA refreshed within each LSA’s Max. Age timer (default 60 minutes)

Conclusions n Efficient routing protocol for larger networks n No loops in the network

Conclusions n Efficient routing protocol for larger networks n No loops in the network n n Difficult to configure and manage on larger network Scalable Protocol