Documente Academic
Documente Profesional
Documente Cultură
By:
Atakan ATAK
Network Engineer
atakannatak@hotmail.com
July, 2017
Features of OSPF
Classless - Supporting VLSM and CIDR OSPF routes have an administrative
distance is 110.
Efficient – No need for periodic update
OSPF uses the Dijkstra Shortest Path
Secure - Authentication with MD5 First algorithm to determine the
Fast Convergence shortest path.
Scalable OSPF employs a hierarchical network
design using Areas.
Link state or SPF technology
OSPF uses cost as its metric, which is
Uses its own 4th Layer protocols such computed based on the bandwidth of
as protocol number 89 the link. OSPF has no hop-count limit.
Dynamic Routing
Components of OSPF
R3 sends update
• 224.0.0.5 – 01:00:5E:00:00:05 : All routers that speak to all DRs using R1 sends update
OSPF on the network IP address to all OSPF
• 224.0.0.6 - 01:00:5E:00:00:06 : All DR/BDRon the 224.0.0.6 router using IP
network address
R3 R4 224.0.0.5
1.1.1.1 1.1.1.2
Calculate Path Cost Using SPF Algorithm 10.1.0.0/16
10.4.0.0/16 R1->R2 30
R3
10.5.0.0/16 R1->R2->R4 32
5
10.7.0.0/16 R1->R2->R3 25
10.7.0.0/16
10.8.0.0/16 R1->R2->R3 30
10.9.0.0./16 R1->R5 40
10.10.0.0/16 R1->R5 22
Generic IPv4 Packet Header
LSA Type Description
1 Router LSA
2 Network LSA
Type 2
• Define the network addresses of
routers and multiple access links. ASBR ABR ABR
Type 1 Type 1 Type 1
• Creates by only DR routers.
• Transmitted within the multiple access Type 2 Type 2
network and can not transimit beyond
the ABR.
• The source identity of the LSA is
defined by the router ID of DR router.
Type 3
• They defines network address learned İnternet
by type 1 LSAs.
• Valid for each subnet.
• Transmitted between ABRs and
recreated by the transmitted ABR.
• The connection status is defined by Area 1 Area 0 Area 2
the network address.
• Routes are not summarized by default.
Type 4
• Used to introduce other areas to ASBR ASBR
and provide a route. ABR ABR
Type 3 Type 3 Type 3 Type 3
• Creates by ABR.
• The resource is created by ABR and Type 1 Type 4 Type 4
recreated by other ABRs.
Type 5 Type 5 Type 5
• The source identity of the LSA is
defined by the router ID of ASBR
router.
Type 5
• Used to be notified by external network(e.g. Non-OSPF Networks).
• Creates by ASBR.
• Transmitted along the area and recreated by other ABRs.
• The source identity of the LSA is defined by the external network address.
• Routes are not summarized by default.
Transition Between States
R1 Fa 0/0:
Fa 0/0: R2
192.168.1.2/24
192.168.1.1/24
EXSTART I am the Master and will start the Exchange. EXSTART Fa 1/0:
(Seq = 2222, Init, More, Master) 172.168.2.1/24
LOADING I would like to have the complete entry for LOADING Fa 1/0:
LSID 10.10.10.2, Type Router-LSA 172.168.2.1/24
LSU – 192.168.1.1 (Unicast) Not all LSAs require explicit acknowledgment. When
routing update cross, in which 2 neighboring routers send
Thanks for information
each other the same instance of LSA at about the same
LSAck – 192.168.1.2 (Unicast) time, the received LSA will be treated as an implicit
acknowledgment and no corresponding LSAck packet is
Thanks for information required.
FULL LSAck – 192.168.1.1 (Unicast) FULL
Designated Router
The solution of managing the number of adjacencies in
the multi-access network and transferring LSAs is DR.
OSPF selects a DR as aggregation and distribution point 172.16.2.0/24
for sent and received LSAs. In case of DR failure, a BDR
is also selected. The BDR listens passively on this
exchange and maintains links with all directors. If DR R1
stops generating hello packets, BDR identifies itself and
assumes the DR role. RID : 2.2.2.2
BDR
Other routers without DR or BDR become DROTHER 172.16.1.0/24 192.168.1.0/28 172.16.3.0/24
R2
DR is notified when a new device is added and DR
forwards it to all routers. This prevents LSA packets from SW
R3
consuming bandwidth. RID : 1.1.1.1 RID : 3.3.3.3
DR
Selection of DR/BDR
There are two different options to choose from:
• Highest priority (0-255)
• Highest router ID
Router identity
A router ID is required for each router in order to join Is the router ID YES
the OSPF domain. The router ID is used by the router configured?
OSPF enabled to:
• Uniquely identify the router
• Participation in the selection of DR NO Use as a router ID
R6
SO: 209.165.201.2/27
R1 E1: 10.1.19.1/24
Lo0: 192.168.10.5/32 SO: 209.165.201.1/27
SO: 10.1.16.2/30
E0: 10.1.10.4/24 R2
E0: 10.1.10.2/24
SO: 10.1.16.1/30
E1: 10.1.10.1/24
E1: 10.1.10.3/24
R5 Lo0: 192.168.10.3/32 R4
Lo0: 192.168.10.1/32
E1: 10.1.13.1/24 R3
E0: 10.1.13.2/24
Section 1 – Choose Router ID Application – Features of DR, BDR and DRother
ROUTER NAME ROUTER ID FEATURES OF WHAT ? DR BDR DRother
NETWORK ROUTER
10.1.10.0 R2
10.1.13.0 R4
10.1.16.0 YOK
10.1.19.0 R1
209.165.201.0 YOK
General Search Mask
NO SHOW COMMAND
Is the neighbor • Show ip ospf neighbors
table correct? • Show ip interface brief
• Show ip ospf interface
AREA 0
İnternet S0/1 : 192.168.2.1
9.0.0.0 / 8 S0/0 : 192.168.1.2
RIP
S0/0 : 192.168. 2.2
S0/0 : 192.168.1.2
RA RB RC
ASBR
External routes fall under two categories, external type 1 and external type 2. The difference between
the two is in the way the cost (metric) of the route is being calculated. The cost of a type 2 route is
always the external cost, irrespective of the interior cost to reach that route. A type 1 cost is the addition
of the external cost and the internal cost used to reach that route. A type 1 route is always preferred
over a type 2 route for the same destination.
OSPF Route Types(cont.)
The ABRs and ASBRs of Standard areas do not automatically generate (or inject) default routes into the area. Consider the following example:
Area 1 Area 0
R1 R3
External
Networks
R2
Assume that Area 1 is configured as a Standard area. Router 3 will forward Type 3 LSAs from all other areas into Area 1, allowing Router 1 and
Router 2 to reach inter-area networks.
Notice also that Router 1 is an ASBR, connecting to an external Autonomous System. Thus, Router 1 will generate Type 5 LSAs, detailing the routes
to these external networks.
To additionally force Router 1 to generate a default route (indicating itself as the next hop) for the external networks, and inject this into Area 1.
This default route will be advertised as a Type 5 LSA to all other areas:
Router(config)# router ospf 1
Router(config)# default-information originate
Router 1 must have a default route in its routing table in order for the above command to function. Router 1’s default route would point to some
upstream router in the external Autonomous System.
OSPF Area Types Scheme
External
Networks
R1
R7
R5
R3 R4
Totally Stubby Area : Prevents both inter-area and external routes from flooding into an area.
• Like Standard and Stub areas, Totally Stubby area routers will share Type 1 and Type 2 LSAs to build their
topology tables.
• Totally Stubby areas will not accept Type 3 LSAs to other areas.
• Totally Stubby areas will also not accept Type 4 or Type 5 LSAs, detailing routes to external networks.
Again, the purpose of Totally Stubby areas is to limit the number of LSAs flooded into the area, to conserve
bandwidth and router CPUs. The Stub’s ABR will instead automatically inject a default route into the Totally Stubby
area, so that those routers can reach both inter-area networks and external networks. The ABR will be the next-hop
for the default route.
Configuration of totally stubby areas is relatively simple:
Router(config)# router ospf 1
Router(config-router)# network 10.1.0.0 0.0.7.255 area 1
Router(config-router)# area 1 stub no-summary
The area 1 stub no-summary command is configured only on the ABR of the Totally Stubby area; other routers
within the area are configured with the area 1 stub command. No ASBRs are allowed in a Totally Stubby area.
In the above example, if we were to configure Area 1 as a Totally Stubby area, it would not accept any external
routes originating from the ASBR (Router 7). It also would not accept any Type 3 LSAs containing route information
about Area 0 and Area 2. Instead, Router 3 (the ABR) will inject a default route into Area 1, and all routers within
Area 1 will use Router 3 as their gateway to all other networks.
OSPF Area Types(cont.)
Not So Stubby Area(NSSA) : Similar to a Stub area; prevents external routes from flooding into an area, unless those
external routes originated from an ASBR within the NSSA area
• Like Standard and Stub areas, NSSA area routers will share Type 1 and Type 2 LSAs to build their topology tables.
• NSSA areas will also accept Network Summary (Type 3) LSAs, which contain the routes to reach networks in all
other areas.
• NSSA areas will not accept Type 4 or Type 5 LSAs, detailing routes to external networks.
• If an ASBR exists within the NSSA area, that ASBR will generate Type 7 LSAs.
Again, NSSA areas are almost identical to Stub areas. If Area 1 was configured as an NSSA, it would not accept any
external routes originating from Router 7 (an ASBR outside Area 1). However, Area 1 also has an ASBR within the
area (Router 1). Those external routes will be flooded into Area 1 as Type 7 LSAs. These external routes will not be
forwarded to other areas as Type 7 LSAs; instead, they will be converted into Type 5 LSAs by Area 1’s ABR (Router 3).
Configuration of NSSA areas is relatively simple:
The area 1 nssa command must be applied to all routers in the NSSA area.
OSPF Area Types(cont.)
Totally Not So Stubby Area (TNSSA) : Similar to a Totally Stubby area; prevents both inter-area and external routes
from flooding into an area, unless those external routes originated from an ASBR within the NSSA area.
• Like Standard and Stub areas, TNSSA area routers will share Type 1 and Type 2 LSAs to build their topology tables.
• TNSSA areas will not accept Type 3 LSAs to other areas.
• TNSSA areas will not accept Type 4 or Type 5 LSAs, detailing routes to external networks.
• If an ASBR exists within the TNSSA area, that ASBR will generate Type 7 LSAs.
With the exception of not accepting inter-area routes, TNSSA areas are identical in function to NSSA areas.
Configuration of TNSSA areas is relatively simple:
The area 1 nssa no-summary command is configured only on the ABR of the TNSSA area; other routers within the area are
configured with the area 1 nssa command.
Application 2 - Topology
90.0.0.2
80.0.0.1
WEB SW-1
SERVER 90.0.0.1
ISP
80.0.0.2
RID : 6.6.6.6
40.0.0.2 50.0.0.1 R6
R1
20.0.0.1 R4 60.0.0.2
30.0.0.1 40.0.0.1 RID : 4.4.4.4 50.0.0.2 60.0.0.1
PC1 70.0.0.1
30.0.0.3
20.0.0.2 RID : 1.1.1.1
SW-0
R2 100.0.0.1 100.0.0.2
70.0.0.2
10.0.0.1
30.0.0.2 R3 R5
PC2 RID : 3.3.3.3 RID : 5.5.5.5
10.0.0.2 PC3
AREA 10 RID : 2.2.2.2 AREA 0 AREA 50
The network infrastructure installation work of XXX Company was given to you. Accordingly, configure all PCs so that they can connect to the
Internet Server. Assign all subnet masks to 255.0.0.0.
Check Configuration on Routers
First we will show the configurations to be made on a router. We will then share screenshots of the settings written on the company's
remaining devices. The output of the working company network, OSPF neighbors and various control / troubleshooting commands for
routing tables will be examined.
The R4 router with some extra settings has been chosen for this. As a reference, the following commands are used to configure the
settings on this router:
Configuration settings related to OSPF over R1; Configuration settings related to OSPF over R2;
In the meantime, extra features can be added on the Switch if desired. In this example Switch is used only as an
intermediate device. Adjustments can be configured for network complexity, security precautions, and so on.
Check Configuration on Routers(cont.)
Configuration settings related to OSPF over R3; Configuration settings related to OSPF over R5; Configuration settings related to OSPF over R6;
Troubleshooting on Router
Only the output of show commands on a single router(R4) will be examined. To view the OSPF Neighbor Table:
The Neighbor Table provides the following information about each neighbor:
Only the output of show commands on a single router(R4) will be examined. To view the OSPF topology table:
Only the output of show commands on a single router(R4) will be examined. To view the specific information about an OSPF process:
Only the output of show commands on a single router(R4) will be examined. To view routing protocol specific information for OSPF:
Only the output of show commands on a single router(R4) will be examined. To view OSPF-specific information on an interface:
Summarization allows you to keep the routing tables small. Combines more than one route and then resulting in a single route published. They can
then be published into the spine area.
Typically, type 1 and type 2 LSAs are produced in-house in each field, converted to type 3 LSAs and sent to other fields. If there were 30 networks
to be introduced to area 1, into the spine 30 type 3 LSAs would be transmitted. The ABR combines 30 networks in an aggregate published with
route summarization.
Summarization helps to increase network stability as it reduces unnecessary LSA multicasting. This directly affects the bandwidth consumed by the
OSPF routing process, the amount of CPU and memory resources. Without route summarization, the transmission of each specific link to the OSPF
backbone and beyond has been done separately. This causes unnecessary network traffic and router workload.
In OSPF, summarization is only configured in ABRs or ASBRs. ABR routers type 3 LSAs; ABSR routers also summarize type 5 LSAs. Route
summarization can be configured in the following ways:
• Summarize route between areas - Inter area route summarization occurs in ABR and applies to routes of
each area. Not applicable for routes injected into OSPF by distribution. To perform an effective route
summarization between areas, must be assigned contiguous in such a way that it can be summarized as
at least a summary address.
• External route summarization - External route summarization is external rotala-specific injected into
OSPF via route distribution. Again, it is important to ensure the continuity of the external address space
to be summarized. Usually only ASBRs summarize external roots.
OSPF Summarization(cont.)
10.2.1.0/24
AREA 0
EIGRP
Send 172.16.0.0/24
summarization 172.16.31.0/24
route to 192.168.10.4/30
10.1.0.0/24
192.168.10.0/30
/22
10.1.0.0/24
10.1.1.0/24 The obtained 10.1.0.0/22 route was summarized together with 4 different
10.1.2.0/24 networks. In the example, the summary address matches 4 networks, although
there are only 2 networks.
10.1.3.0/24
Sources
1. İtcertnotes
2. Router Alley
3. Cisco
4. Etherealmind
5. 9tut