Single Area OSPF Open University
-
Upload
sairam-penta -
Category
Documents
-
view
222 -
download
0
Transcript of Single Area OSPF Open University
-
8/13/2019 Single Area OSPF Open University
1/41
Single Area OSPF
Explanation & Configuration
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
2/41
We Will Examine the advantages of using a Link State
routing protocol like OSPF over using DistanceVector routing protocols like RIPv1 or RIPv2.
Identify the way routers running OSPF establishrelationships with neighbours, and thencommunicate with them.
Explore the way we configure OSPF in a singlearea environment.
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
3/41
Why should we prefer Link State
over Distance Vector?
Scalability.
Convergence time.
Efficiency and operational advantages.
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
4/41
Scalability.
RIPv1 and RIPv2 cannot scale beyond 15hops and takes no account of the
bandwidth of the routes that they chooseto use.
OSPF is very scalable, it may be used in asingle area for small networks or can bescaled to use multiple areas and supportlarge networks.
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
5/41
Convergence time.
RIP networks can take several minutes toconverge because the routing table of eachrouter is shared and copied in its entirety withdirectly connected routers.
OSPF only updates its neighbours with the
changes in the network this is called anincremental update, these updates are confinedto only one area and this serves to speed up theprocess of convergence.
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
6/41
Efficiency and operational
advantages. OSPF makes far more efficient use of
routing updates than Routing Information
Protocol does.
Any instability in an OSPF area is confined
to that area alone.
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
7/41
How OSPF functions.
A router running OSPF holds threedatabases in its memory.
Routing TableTopological DatabaseAdjacencies Database
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
8/41
Adjacencies Database This contains a list of all the routers that this router has
established bi-directional communication with!
Topological Database. Also known as the Link-State Database
Same for all routers in the same area!
Who is connected to what!
A router with multiple interfaces can exist in more thanone area at the same time!
Routing Table. Also known as a forwarding Database
This holds the information about the lowest path cost
routes to other routers!
How OSPF functions.By Bill Reed
-
8/13/2019 Single Area OSPF Open University
9/41
Routers running OSPF attempt to form adjacencies to the routersrunning OSPF who are directly connected to them and having doneso transfer information to those routers about its own link states.
They achieve this by going through a seven state process thatdefines the relationship between the two directly connected routers.
DownInit
Two way
ExstartExchangeLoading
Full adjacency
How OSPF functions.
Seven State Process
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
10/41
OSPF routers reduce the number of routing information exchanges by electing aDR (designated router) and a BDR (backup designated router).
These routers serve as focal points for the exchange of routing information.
During this seven step process the routers utilise 5 types of packets.
Hello packet - Establishes and maintains adjacency information with neighbours
Database description packetDescribes content of routers link-state database
Link state requestRequests specific pieces of linkstate information
Link state updateTransports LSAs to neighbour routers
Link state acknowledgementAcknowledges receipt of neighbour LSAs
How OSPF functions.OSPF packet types
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
11/41
Down state.
When in the down state the router running OSPF has not yet
exchanged any information with any neighbour router.
OSPF is waiting to enter the next state in our seven step processthe Init state.
How OSPF functions.
The seven state process
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
12/41
DOWN STATE
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
13/41
Init state.
OSPF routers send out type 1 hello packets at regular intervals(default is 10 seconds).
When an interface on an OSPF router receives a type 1 hello packetit enters the Init state, the router knows there is someone out thereand is waiting to take their relationship to the next state.
A router can be in two kinds of relationships with a neighbour
router, Two-way and Adjacency. (as we will see many states exist inbetween these two relationships). A router must receive a type 1hello packet in order to start the process of establishing arelationship.
How OSPF functions.
The seven state process
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
14/41
INIT STATE
Type 1 hello packet
Type 1 hello packetR1
Ah! I know someone's thereLets move on to the Two-way state
By Bill Reed
ll d
-
8/13/2019 Single Area OSPF Open University
15/41
Two-way state.
Using type 1 hello packets OSPF routers try to establish a two-way state orbi-directional communication with its neighbour routers on the same IPnetwork.
Type 1 hello packets contain a list of the senders known OSPF neighbours.
When a router sees itself in a type 1 hello packet sent from one of itsneighbours it declares that a two-way state exists between them.
(No routing information is shared while in the two-way state)
in order to share routing information we must establish an adjacency
How OSPF functions.
The seven state process
By Bill Reed
B Bill R d
-
8/13/2019 Single Area OSPF Open University
16/41
TWO-WAY STATE
Type 1 hello packet
Type 1 hello packet
I recognise myselfIn this hello packet!Were now in a Two-way state
One of my
Neighbours is R1
R1
By Bill Reed
B Bill R d
-
8/13/2019 Single Area OSPF Open University
17/41
Ex-start state.
Technically when two routers enter the ex-start state they have
formed an adjacency, however they are not yet fully adjacent.
The Ex-start state is established by the sending of type 2 DDPs(Database Description Packets), but first the routers use hellopackets to negotiate who will be master and who will be the slave
router.
The routers then use DDPs to exchange a summary of their link-state databases.
How OSPF functions.
The seven state process
By Bill Reed
B Bill R d
-
8/13/2019 Single Area OSPF Open University
18/41
EX-START STATE
Type 1 hello packet
Type 1 hello packet
No I will start the exchange becausemy ID is 192.168.2.7 (I am the master)
I will start the exchange becausemy ID is 192.168.2.5
R1
Type 2 DDP
Type 2 DDP
Here is a summary of myLink state database
Here is a summary of myLink state database
Type 5 LSAck
Type 5 LSAck
Thanks for the summary
Thanks for the summary
By Bill Reed
B Bill R d
-
8/13/2019 Single Area OSPF Open University
19/41
Exchange state.
In the exchange state the receiving router examines the DDP and
compares it with its own link-state database.
If there is information in the DDP that does not exist in the routersoriginal link state database then it requests a complete update fromthe sending neighbour.
The exchanging of database information takes place in the loadingstate.
How OSPF functions.
The seven state process
By Bill Reed
B Bill Reed
-
8/13/2019 Single Area OSPF Open University
20/41
Loading state.
Having examined the contents of its neighbours database and found
new information, the receiving router send a type 3 LSR to itssending neighbour.
The neighbour that receives the type 3 LSR (link state request)willrespond with a type 4 LSU (link state update) these LSUs contain
the actual LSAs (link state advertisements).
LSAs are at the heart of the OSPF process and once a routerreceives an LSA it responds with a type 5 LSAck (link stateacknowledgment).
How OSPF functions.
The seven state process
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
21/41
EXCHANGE /
LOADING STATE
Type 3 Link state request
Type 2 DDP
I've found someone listed I didnt know aboutSend me an update!
Here is a summary of myLink state database
R1
Type 4 Link state update
Ill add this information to my owndatabase
OK heres the information!
Type 5 LSAck Thanks for the information
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
22/41
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
23/41
Single Area OSPF
DR and BDR Election
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
24/41
For every multi-access IP network one router will be elected as theDR (designated router).
The designated router is charged with two tasks:
1. to become adjacent to every other router in its area.
2. to act as a spokesperson for the network.
How OSPF functions.DR and BDR Election
The DR is responsible for sending LSAs to other IP networks and
updating routers in its own area.
Because the DR is adjacent to every router in its area it can act as afocal point for collecting routing information from link stateadvertisements sent by the routers in its area.
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
25/41
Because the DR could represent a single point of failure we have toelect a BDR (backup designated router).
The BDR must also become adjacent to every router in its area.And serves as a second focal point for LSAs
However the BDR is not responsible for sending LSAs to other IPnetworks or updating routers in its area unless the DR fails.
How OSPF functions.DR and BDR Election
The BDR maintains a timer on the DRs update activity to make sure
that the DR is still active.
If the BDRs timer expires before update traffic is detected then theBDR takes over the role of the DR, and a new BDR is elected.
On a point to point network no DR / BDR election takes place.
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
26/41
Multi-access networks support more than two routers and so wemust elect a DR and a BDR.
The criteria for the election process is as follows:
1. Priority setting
2. Router ID
How OSPF functions.DR and BDR Election
The priority of a router can be set by the administrator.
By default the priority is set to 1
The range available to the administrator is between 0 and 255 If priority is set to 0 then that router can never be elected a DR
In the event of a priority tie then the router ID decides the election
Router ID is the highest IP address on the box unless a loopbackaddress is configured.
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
27/41
We covered the process of discovering routes earlierwhen we looked at the Ex-start, Exchange andLoading states.
We used: Type 1 hello packets
Type 2 Database Description Packets
Type 3 Link State Requests
Type 4 Link State Updates
Type 5 Link State Acknowledgements
How OSPF functions.
Discovering Routes
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
28/41
Once we have established adjacencies and have a complete linkstate database we need to create a routing table in order to forwardtraffic across our network.
OSPF uses cost as its metric value to determine the best route to adestination.
Cost is based upon the bandwidth of the media and in general the
cost decreases as the bandwidth of a link increases.
A 10 mbps Ethernet link will have a lower cost than a 1.544 mbpsT1 link.
How OSPF functions.
Selecting Appropriate Routes
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
29/41
When OSPF calculates the best route to a destination it uses the ShortestPath First algorithm or (DIJKSTRA algorithm).
Basically put, the SPF algorithm adds up the costs of all the links between alocal router (known as the root) and its destination network, it is the
product of this calculation that is used to determine the best path which itthen places in its routing table.
If there are multiple paths to a destination network then the route with thelowest cost will be the preferred route. N.B. routers can hold up to 4 equal-cost routes to a destination network, this
facilitates load balancing.
If a link rapidly goes up and down (Flapping), then this can cause a routerto overtax its CPU by continually trying to run the SPF algorithm on thenew data. OSPF deals with this by the implementation of hold timer. Thistimer governs how long the router will wait before running the SPFalgorithm again.
How OSPF functions.
Selecting Appropriate Routes
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
30/41
Routing information in the routers routing table must be kept up todate and accurate.
When a router notices a change to its link states it sends thischange to its DR using the multicast address of 224.0.0.6
The DR will acknowledge receipt of the information with a LSAckthen update all the other routers in its area by sending theinformation using the multicast address 224.0.0.5
Once a router receives a LSU it updates its link state database and
then runs the SPF algorithm using the new information torecalculate its preferred routes. If a route already exists then the router will use the old route while it
runs the SPF algorithm on the new data.
OSPF information is updated whether a change has occurred or not,every 30 minutes by default.
How OSPF functions.
Maintaining Routing Information
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
31/41
Single Area OSPF
Configuration
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
32/41
Step 1
Configure OSPF on the router and assign it a process number.
R1(config) # router ospf 1
R1(config-router) # network network address / wildcard mask / area
How OSPF functions.
Configuration
Network
Identifies the directly connected network addresses.
Wildcard mask
Allows the administrator precise control over which interfaces can participate inthe OSPF routing process. And is necessary because OSPF supports VLSM.
Area
Places the OSPF process into a discrete network area for administrative
purposes. Area 0 designates the backbone area (there must always be abackbone area configured)
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
33/41
Step 2
Verifying your configuration
R1 # show protocols
How OSPF functions.
Configuration
This command will display some important information about the OSPFprocess running on your router.
Update, invalid and hold down timers
All set to 0, OSPF is event driven, updates are not sent at
predetermined intervals.
Routers that have supplied updates are listed under the heading
Routing information sources:
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
34/41
We continue looking at commands used to verify our configuration orgather valuable information about our OSPF process.
R1 # show ip ospf 1
How OSPF functions.
Configuration
This command provides statistics about the OSPF process and can be veryuseful when trying to confirm a suspicion that an interface is flapping by
looking at the number of times that the SPF algorithm has been executed.
By Bill Reed
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
35/41
We will now explore the command for, and the reasoning behind setting aloopback address on our router.
R1(config) # interface loopback 0
R1(config-if) # ip address 192.168.1.1 255.255.255.0
How OSPF functions.
Configuration
We set a loopback address to make our network more stable.
If the interface that constitutes our router ID on our DR or BDRgoes down this can trigger a re-election of our DR or BDR.
A loopback interface is immune to link failure and thereforeensures stability.
A loopback address will always be used as the router ID if one isconfigured on the router.
In order for the loopback address to take effect it must be
configured prior to the starting of the election process.
y
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
36/41
We have discussed earlier how an OSPF routers priority can effect the DRand BDR election process.
We can modify the priority setting on a router with the followingcommands:
How OSPF functions.
Configuration
R1 (config) # interface ethernet 0R1(config-if) # ip ospf priority 0
The priority must be set before the election takes place to have anyeffect on the outcome.
We can examine the results of an election by using the command:
R1 (config) # show ip ospf interface ethernet 0
y
-
8/13/2019 Single Area OSPF Open University
37/41
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
38/41
OSPF authentication ensures that information coming from a router is infact from that router and not from another source.
How OSPF functions.
AuthenticationR1(config) # interface serial 0/1
R1(config-if) # ip ospf message-digest-key 1 md5 barnfield
R1(config-if) # exitR1(config) # router ospf 55
R1(config-router) # area 0 authentication message-digest
R1(config-router) # end
The configuration above enables MD5 authentication and definesthe encryption key (a password on an interface).
Now we must set up authentication on all the other routers in thearea.
y
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
39/41
We enter essentially the same commands into all the other OSPF routers inour area as follows:
How OSPF functions.
AuthenticationR?(config) # interface serial 0/0
R?(config-if) # ip ospf message-digest-key 1 md5 barnfield
R?(config-if) # exitR?(config) # router ospf 12
R?(config-router) # area 0 authentication message-digest
R?(config-router) # end
We can verify our authentication by entering the command:
R?(config) # show ip ospf interface serial 0/0
y
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
40/41
OSPF Is a link state routing protocol Makes more efficient use of bandwidth the RIP
Is more scalable than distance vector routing protocols
Uses a seven stage process to establish adjacencies
Makes use of five types of hello packets Elects a DR and BDR to talk to other networks
Runs the SPF or DIJKSTRA algorithm on its link statedatabase to determine preferred routes
Updates routing information every 30 minutes (default)unless a change occurs
OSPF uses multicast addresses to communicate betweenDR, BDR and other routers in an OSPF area
By Bill Reed
-
8/13/2019 Single Area OSPF Open University
41/41
OSPF
Practical
Exercise