OSPF
Short Description
info...
Description
Open Shortest Path First (OSPF) Ejaz Ahmed
OSPF
The Open Shortest Path First (OSPF) protocol is an intradomain routing protocol based on link state routing. Its domain is also an autonomous system. The topics discussed in this section include: Areas Metric Types of Links Graphical Representation OSPF Packets Link State Update Packet Other Packets Encapsulation
OSPF
The Open Shortest Path First (OSPF) protocol is an intradomain routing protocol based on link state routing. Its domain is also an autonomous system. The topics discussed in this section include: Areas Metric Types of Links Graphical Representation OSPF Packets Link State Update Packet Other Packets Encapsulation
Open Shortest Path First
Developed for Internet Protocol (IP)
Interior Gateway Protocol
Like RIP, the standard is open (not proprietary ), available for free.
Doesn’t have RIP problems.
Implements link state routing.
Open Shortest Path First
The OSPF protocol runs directly over IP, using IP protocol 89. Supports type of service routing –
Uses ToS field in IP header and the destination IP address to choose from multiple routes for packets requiring different services.
Open Shortest Path First
OSPF provides load balancing You can have multiple routes to a given destination at the same cost. OSPF distributes traffic on all routes equally. It can support from one to six paths to the same destination in its routing table. OSPF supports classless routes as well as classful routes. All exchanges between the routers can be authenticated. So that only trusted routers propagate routing information. It currently supports clear-text and MD5 authentication. –
–
–
–
–
Open Shortest Path First
OSPF divides the area into several hierarchies: –
Autonomous Systems (AS)
–
Areas – Groups of routers within AS
–
Backbone area – Group of routers that connects other areas together.
Open Shortest Path First
Routers are distinguished by the function they perform: Internal Routers
–
•
Only route packets within one area
Area Border Router (ABR)
–
•
Connects two areas together
Backbone Routers
–
•
Reside only in backbone area.
AS boundary Router
–
•
Routers that connects two AS together
OSPF – Modified Link State Routing
Recall: In link state routing, routers flood their routing information to all other routers in the network In OSPF, routers only send their information to “adjacent routers”, not to all routers. Adjacent does NOT mean nearest-neighbour in OSPF One router in each area is marked as the “designated router” Designated routers are considered adjacent to all other routers in the area OSPF combines link state routing with centralised adaptive routing –
Designated Router
On broadcast networks neighbors do not necessarily form adjacencies. Several router can be connected via the same multi-access network, if they all form adjacencies then there would be significant overhead involved for each router to track so many adjacencies. A large percent of traffic on the network would consist of routing updates between every pair of adjacent routers. Routers elect Designated Router (DR) and Backup Designated Router (BDR). DR and BDR must form adjacencies with every neighbor with on the network. OSPF allows every BMA to have a designated router (Why) A designated router sends link stat messages, on behalf of all routers attached to the network –
Open Shortest Path First
Adjacency A relationship formed between selected neighboring routers for the purpose of exchanging routing information. Not every pair of neighboring routers become adjacent.
Adjacancies
Designated Router
The Designated Router Performs two main functions: The Designated Router originates a network-LSA on behalf of the network. This LSA lists the set of routers (including the DR itself) currently attached to the network. The Designated Router becomes adjacent to all other routers on the network. Since the link state databases are synchronized across the adjacencies, the Designated Router plays a central part in the synchronization process. –
–
OSPF – BMA Networks
OSPF-NBMA Networks
Designated Router (Election)
DR and BDR are elected using the Hello Protocol . A router’s Hello packet contains its Router Priority. On boot-up the router checks for a DR. If it is found it accepts it, otherwise it itself becomes the DR if it has highest Router Priority on the network. –
Backup Designated Router
Transition to a new Designated Router is made smooth by electing a Backup Designated Router.
BDR becomes the DR when ever the existing DR fails.
BDR already has adjacencies with all the router in the network.
BDR does not generate network-LSAs.
BDR is also elected through Hello packets.
Hello Protocol
The hello protocol is responsible for establishing and maintaining the neighbor relationships. On broadcast and NBMA networks, the hello protocol elects a Designated Router for the network.
Establishing Adjacencies
After neighbors are discovered, the decision is made for establishing the adjacencies. Adjacencies are established with a subset of the neighbors. In broadcast and NBMA networks, all routers on network become adjacent to DR and BDR.
Establishing Adjacencies
Adjacencies are established with a neighbor if any of the following is satisfied: –
The router itself is DR.
–
The router itself is the BDR.
–
The neighbor router is the Designated Router.
–
The neighbor is the Backup Designated Router.
–
The underling network is point-to-point.
Database Synchronization
Only adjacencies are synchronized. This is done by sending a sequence of Database Description packets to its neighbors. Each Database Description packet describes a set of LSAs belonging to the router’s database. During this process the routers forma master/slave relationship.
Open Shortest Path First
If OSPF used broadcast packets to exchange routing information, all nodes on the network would have to process the packets to determine whether the packets were meant for them or not. OSPF uses multicast. Destination IP address for all routers is 224.0.0.5 (called ALLSPFRouters ) Destination IP address for Designated Router and Backup Designated Router in OSPF is 224.0.0.6 (called ALLDRouters ).
Open Shortest Path First
OSPF can be a memory intensive protocol All routers store all LSA’s in their 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 subset called AREAs. To permit growth and make the networks in an AS easier to manage. –
–
OSPF AREAS
An AREA is a part of the OSPF AS, in which all routers share a common link state database. Routers 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. Using areas, OSPF networks can be logically segmented to decrease the size of routing tables.
OSPF AREAS
With the introduction of areas, it is no longer true that all routers in the AS have identical link state databases. A router actually has separate link state database for each area it is connected to. An area is identified with a number, which is 32-bit unsigned integer value. Area 0 is reserved for the back bone, and all areas must connect to back bone directly.
Areas in an autonomous system
Types of links
Example of an AS and its graphical representation in OSPF
Types of OSPF packets
OSPF common header
64 Bits
Hello packet
OSPF Hello Packet
Unlike RIP, OSPF does not regularly broadcast all of its routing information. OSPF routing updates are incremental, so usually routers only send updates when a topology change occur. Routers use Hello packets to let their neighbors 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 neighbor must no longer be running.
OSPF Hello Packet
In addition to function as keep-alives between neighbors, Hello packets allow the discovery of OSPF neighbors, establishment of neighbor relationships and adjacencies and the election of DR. Timers that are used with Hello packets are HELLO Interval DEAD Timer –
–
OSPF Hello Packet
DEAD Timer Time in seconds after which a non-responding neighbor is considered dead (normally 4 times the hello interval). HELLO Interval Time in seconds between hello messages (normally 10 sec). G-Way Priority Integer priority for sender (router). Used during the election of DR and BDR. –
–
–
–
OSPF Hello Packet
Designated and Backup Router –
IP addresses that give the senders the view of the designated and backup designated router for the network over which this message is sent.
Neighbor IP Address –
IP addresses of neighbors from which the sender has recently received hello messages.
OSPF Neighbors
OSPF neighbors are routers on the same network that agree on certain configuration parameters. Routers form a neighbor relationship by analyzing the contents of each others hello packets to determine whether they agree on the required parameters. The following parameters must match for routers to become neighbors: –
Area ID
–
Network Mask
–
Authentication Information
–
Hello Interval
–
Dead Timer
OSPF Neighbors
If the routers do not agree on the parameters, they cannot become neighbors to form adjacencies. If the routers agree on these parameters, each router put the other routers ID into his own Hello packet. When a router receives a Hello packet with its own RID listed as neighbor, it knows that the neighbor relationship has been formed.
Link state update packet
LSA general header
Router link LSA
Link types, link identification, and link data
Router link
Example Give the router link LSA sent by router 10.24.7.9 .
Solution to Example
Figure 14.33 Network link
Network link advertisement format
Example
Give the network link LSA
Solution to Example
Example Which router(s) sends out router link LSAs?
All routers advertise router link LSAs. a. R1 has two links, N1 and N2. b. R2 has one link, N1. c. R3 has two links, N2 and N3.
Example
Which router(s) sends out the network link LSAs? Solution
A network-LSA is generated for every transit broadcast or NBMA network. (A transit network is a network having two or more attached routers). The network-LSA describes all therouters that are attached to the network. As N2 is transit network so any of the router R1, R2, R3 (whoever is a designated router) will generate NLSA
Summary link to network
Summary LSA carry routing information about networks, AS boundary routers, or a range of IP addresses. They are generated by ABRs to propagate routing information between areas. The destination described by them is external to the area in which they are flooded, yet still belonging to the same AS. •
•
•
Summary link to network LSA
Summary link to AS boundary router
Summary link to AS boundary router LSA
AS – External LSA –
–
–
–
Type 5
AS external LSAs are generated by ASBR routers. AS-external-LSAs describe routes to destinations external to the Autonomous System. They advertise routes external to OSPF AS, such as those from other routing protocols. This LSA is not associated with any particular area so they are flooded into the entire OSPF area, except stub areas.
External link
External link LSA
Database description packet
OSPF Database Description Packets
Routers exchange these messages to initialize their network topology database. The database description message can be large so it may be divided into several messages using the I, M, and S bits. I if bit I is set to 1 then it is initial message. M if bit M is set to 1 then it means more message to follow. S if bit S is set to 1 then it mean messages was sent by master, slave other wise. –
–
–
OSPF Link State Request Packet
Routers can ask for details about specific links from other routers. The neighbor responds with the most current information it has about those links. More than one request message may be needed if the list of request is long but there is no need of having sequence numbers etc.
Link state request packet
Link state acknowledgment packet
View more...
Comments