Академический Документы
Профессиональный Документы
Культура Документы
1
OSFP
• open standard
• link state routing protocol
• AD=110
• classless,FLSM,VLSM,CIDR
• Metric=cost 10^8/BW(bps)
• support cost load balancing, doesn't support unequal cost load balancing.
Area: Collection of routers and networks. Interfaces falls into area not Router. Neighboring is not formed
between routers but between interfaces.
2
• Exchange--->In this state router exchange the DDB (Data base description packet)
• Loading---> In this state actual exchange of link-state information occurs.
• Full----> In this state routers are fully adjacent with each other.
• Router ID
• Hello and Dead inerval
• Neighbor list
• Area Id
• priority
• DD and BDR
• Authentication
• Stub Area flag
2. DBD - The Database Description (DBD) packet contains an abbreviated list of the sending router's link-state
database and is used by receiving routers to check against the local link-state database.
3. LSR - Receiving routers can then request more information about any entry in the DBD by sending a Link-
State Request (LSR).
4. LSU - Link-State Update (LSU) packets are used to reply to LSRs as well as to announce new information.
LSUs contain seven different types of Link-State Advertisements (LSAs). LSUs and LSAs are briefly discussed
in a later topic.
OSPF Routers:
1. Internal Router:
2. Backbone Router
3. ABR
4. ASBR
3
routers that are running OSPF with identical topological databases. An area is a subdivision of the ospf routing
domain. Each area runs SPF separately and summaries are passed between each Area.
The Dead interval is the period, expressed in seconds, that the router will wait to receive a Hello packet before
declaring the neighbor "down." Cisco uses a default of four times the Hello interval.
OSPF configuration:
4
cost in OSPF:
Cost=108/BW(bps). The cost is applied to the outgoing interface. The routing process will select the cumulative
cost to a remote network.
Changing the default cost:
cost command manually overrides the default.
Router(config)# int s0/0
Router(config-if)# ip ospf cost <cost> (cost is a 16 bit value 0 – 65,535).
you can mange the cost by setting the bandwidth command or setting the reference BW.
Bandwidth command set the BW in kbps (it is used only in cost calculations not the actual BW)
Router(config-router)# auto-cost reference-bandwidth 1000
Router-ID:
The router is known to OSPF by
the OSPF router ID number.
LSDBs use the route id to
differentiate one router from
another.
Choosing Router-Id.
• router-id assigned with
router-id ospf configuration
command.
• Highest IP address of all
configured loopback
interfaces
• Highest IP address of all
configured physical
interfaces.
5
LSA Types:
LSA are the building blocks of LSDB. Individually, they act as database records. In combination, they describe
the entire topology of an OSPF network or area.Link-state updates (LSUs) are the packets used for OSPF
routing updates. An LSU packet can contain ten different types of Link-State Advertisements (LSAs),
6
4. LSA: Type-4 -Summary LSA (ASBR ): ASBR produce this LSA to advertise their presence. It contains
the router id of the ASBR. A type 4 summary LSA is generated by an ABR only when an ASBR exists
within an area. A type 4 LSA identifies the ASBR and provides a route to it. They are regenerated by the
subsequent ABRs to flood throughout the AS. The ASBR sends the Type 1 LSA to with an external bit
set, the ABR then builds LSA Type 5 and flood to the backbone area 0. Its the IP address of the ASBR.
It advertise the location of ASBR.
5. LSA Type 5 – External LSA: This LSA is originated by the ASBR and flooded throughout the AS. It
describe routes to the network outside the AS.
The advertising router-id (ASBR) is unchanged throughout the As. Type 4 LAS is needed to find the
ASBR. By default routes are not summarised.
6. LSA Type- 6: They are specialised LSA and are used in multicast ospf applications.
7. LSA Type -7: type -7 LSA are used in NSSA (not so stubby area). They are originated by ASBR within
NSSA and are flooded only within the NSSA in which they are originated. NSSA ABR translates it into
type 5 LSA, which then propagated into the OSPF domain.
7
Challenges in Multi-access Network:
DR and BDR:
OSPF defines five network types:
1. Point-to-point
2. Broadcast Multiaccess
3. Nonbroadcast Multiaccess (NBMA)
4. Point-to-multipoint
5. Virtual links
(To illustrate this point, imagine that you are in a room with a large number of people. What if everyone had to
introduce themselves individually to everyone else?)
Solution:
Designated Router/Backup Designated Router:
On multiaccess networks, OSPF elects a Designated Router (DR) to be the collection and distribution point for
LSAs sent and received. A Backup Designated Router (BDR) is also elected in case the Designated Router fails.
All other routers become DROthers (this indicates a router that is neither the DR or the BDR).
The idea behind DR/BDR is that , router have a central point of contact for information exchange. Instead of
each router exchanging updates with every routers on the segment, every router exchanges information with DR
and BDR. The DR and BDR then relay the information to everyone else.
The routers which are neither DR nor BDR are called DR/Other. DROther will only maintain adjacencies with DR
and BDR ( Full State) while it maintain 2-way with other DROther.
DR/BDR Election:
• The router with the highest OSPF priority is selected as DR. The router with the second highest priority value
is the BDR.
• Uses the router ID as the tie-breaker
• The DR election is non-preemptive. I.e If a router with highest priority is added to the network then it doesn't
change the DR/BDR. The only time that a DR or BDR changes is when one of them is out of service.
Note: DR and BDRs are elected on a per network basis. An ospf area can contain more than one IP network, so
each area can (& usually does) have multiple DR and BDR.A router can be configured to win an election on one
8
interface and lose an election on other.
1. Standard Area
2. Backbone Area
3. Stub Area
4. Totally Stubby Area
5. Not So stubby Area
(NSSA)
6. Not so stubby totally
stubby area
9
1. Standard Area: Accepts link updates, route summaries, and external routes (the default).
2. Backbone Area (Area 0, Transit Area): The OSPF backbone includes all the properties of a standard
OSPF area.
3. Stub area: Doesn't accept routes external to the AS, such as routes from non OSPF source. I.e no type
5 and type 4 LSAs are known inside the AS. LSA Type 4 and 5 are blocked. ABR at the edge of the
stub area use type 3 LSA to advertise a single default route (0.0.0.0) into the area. Stub area can't
contain ASBR expect that ABR itself is ASBR.
Configuration:
Router1(config-router)# area 2 stub
Router2(config-router)# area 2 stub
4. Totally Stubby Area: Doesn't accept external AS routes and summary routes from other areas internal
to the AS. ABR of the Totally Stubby Area block Type 4 and 5 LSAs as well as Type 3 summary LSA
with an exception of a single type 3 LSA to advertise the default route.
Configuration:
Router1(config-router)# area 1 stub no-summary (ABR)
Router2(config-router)# area 1 stub
5. Not-so-Stubby-Area: ASBR can't be located in the stub area. NSSA allows ASBR which is against the
rule of stub area. The ASBR originates type 7 LSAs to advertise the external destinations. The type 7
LSAs are flooded throughout the NSSA but are blocked by the ABR. The ABR converts the type 7 LSA
into a type 5 LSA, which is then propagated through the remainder of the autonomous system.
Configuration:
Router1(config-router)# area 1 nssa
Router2(config-router)# area 1 nssa
10
LAB Example:
Stubby Area”
blocks type 4 and 5 LSA from entering
Default route is automatically inserted into the routing table of R1 by R2 (ABR) for external routes coming from
RIP via redistribution.
O*IA 0.0.0.0/0------------
Not-so-Stubby-Area:
Allows the ASBR in the stub area, which is against the rule. It allows the external routes to the area, since type 5
LSA are blocked, NSSA ASBR produce type 7 LSA which is propagated throughout the area, and the NSSA
ABR translates this LSA to type 5 LSA which then propagated into the OSPF domain.
11
Configuration:
R4(config-router)# area 1 nssa no-summary
R5(config-router)# area 1 nssa
there is no auto summarization in the OSPF. Manual Summarization can occur only in the ABR and ASBR.
12
Summarisation in ABR (R2)
R2(config-router)# area 1 range 192.168. 0.0 255.255.0.0
The command is little feneky. Don't do mistake to type either area 1 or area 2. Area that we want to summarize
should appear in the range command.
OSPF automatically suppresses any routes from area 1 that matches the range command above. So all the
advertisements 192.168.1.0, 2.0,3.0 --------- are going to be suppresses by R2 and advertised only 192.168.0.0
to other Area.
Summarisation in ASBR(R4)
R2(config-router)# summary-address 172.16.0.0 255.255.0.0
There is no any area to be included in the summary-address command since it is not the OSPF domain, its the
RIP domain.
13
Virtual Link:
Virtual link creates a tunnel interfaces. Area should be given where virtual link belongs. Note that there can be
other router exists between R2 and R3. In spite of it, the configuration is same.
When designing a multi-area OSPF network, all areas should be connected to the backbone area. However,
there may be instances when an area will need to cross another area to reach the backbone area like area 2 in
this case. A virtual link has the following two requirements:
+ It must be established between two routers that share a common area and are both ABRs.
+ One of these two routers must be connected to the backbone.
14
Syntax:
To debug Authentication:
Router# debug ip ospf adj
15
Propagating default route in OSPF domain:
To propagate the default route configured on R3 into the OSPF domain, use the default-information originate
OSPF configuration command.
This propagate the default route as R3 to the other routing domain if and only if default route is cofigured in the
router R3 . If you want to propagate the route in spite of default route configuration in R3 use the always
command at the last.
Verifying OSPF:
1. show ip route
2. show ip protocols -->show ip routing protocol configuration on the router
3. show ip ospf-----> shows ospf process details. For eg. How many times the router has run SPF alog
4. show ip ospf database---> shows the content of topological databases
5. show ip ospf interface---> shows the information how ospf is configured in each of the interfaces also
shows the information about DR/BDR, costs etc.
6. show ip ospf neighbor--->
7. clear ip ospf process
Debug commands:
1. debug ip ospf adj
2. debug ip ospf events
16