Documente Academic
Documente Profesional
Documente Cultură
open standards routing protocol thats 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
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:
To decrease routing overhead To speed up convergence To confine network instability to single areas of the network
Each router connects to the backbonecalled 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
OSPF runs inside an autonomous system, but can also connect multiple autonomous systems together The router that connects these ASes together is called an Autonomous System Boundary Router (ASBR).
OSPF Terminology
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, its 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
Neighbors 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
OSPF directly shares routes only with neighbors that have also established adjacencies. And not all neighbors will become adjacentthis depends upon both the type of network and the configuration of the routers
OSPF Terminology
Hello protocol The OSPF Hello protocol provides dynamic neighbor discovery and maintains neighbor relationships
Neighborship database The neighborship database is a list of all OSPF routers for which Hello packets have been seen
A variety of details, including the Router ID and state, are maintained on each router in the neighborship database
OSPF Terminology
Topology database The topology database contains information from all of the Link State Advertisement packets that have been received for an area
Link State Advertisement A Link State Advertisement (LSA) is an OSPF data packet containing link-state and routing information thats shared among OSPF routers
The router uses the information from the topology database as input into the Dijkstra algorithm that computes the shortest path to every network
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
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
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 doesnt 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
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
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)
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
Point-to-point Point-to-point refers to a type of network topology consisting of a direct connection between two routers that provides a single communication path
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 BDRsbut neighbors are discovered automatically
OSPF Terminology
Point-to-multipoint 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
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
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
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
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
OSPF AREAS
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 database for each area it is connected to
OSPF AREAS
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
or or
0.0.0.0 132.24.16.12
OSPF AREAS
Based on its role in an area, a router can be one or more of the following types
Internal routers
A router whose interfaces are all in the same area 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
Backbone routers
OSPF AREAS
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
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
I
I I
Area 192.168.100.100
Area 1
Area 0
ABR, B
ABR, B
Area 1024
I I, B I, B
ASBR
RIP
OSPF AREAS
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
LSAs are the means by which OSPF routers communicate information for the link state database LSAs come in several types which are identified by the following type numbers Type 1
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
Router LSA
Type 2
Type 3
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
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
Network LSA:
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:
Type 5
Also generated by ABRs Similar to Network summary LSA except they contain routing information about a particular host (ASBR)
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
AS External LSA:
1) Hello
Tests reachability of neighbours Topology outline sent to a newly connected router Request for more information about a link Update changes in link status ACK for every update message
2) Database description
Network Mask
Dead Timer Hello Intr Designated Router GWAY PRIO
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
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
DEAD TIMER
Time in seconds after which a non-responding neighbour is considered dead (normally 4 times the Hello interval)
HELLO INTR
PRIORITY
Integer priority of the sender (router) Used during elections for Designated and Backup designated router
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
IP address of all neighbours from which the sender has recently received hello messages
OSPF Neighbours
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
OSPF Neighbours
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
16
24
Link Type
Advertising Router
Link Sequence Number Link Checksum Length
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 MaxAge is the max amount of time an LSA can exist without being refreshed. MaxAge is 3600 seconds (one hour) If the LSA reaches MaxAge in the database the router will flush the LSA from its database
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 the exact same LSAs, and each router has chosen its best routes using SPF, the following is still true of routers running OSPF:
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 LSAs MaxAge timer (default 60 minutes)
Conclusions
Efficient routing protocol for larger networks No loops in the network Difficult to configure and manage on larger network Scalable Protocol