Sunteți pe pagina 1din 44

Introduction to OSPF

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

Database Table Information

Neighbor Neighbor • List of all routers that a router


Database Table communicates bidirectionally
• Vary according to each routers
• Show ip ospf neighbors
Link State Topology • Keeps information about all other routers in
Database Table the network
(LSDB) • Represents network topology
• Same LSBD for all routers in the same area
• Show ip ospf database

Forwarding Routing • An algorithm, a route list created when the


Database Table link state is run in the database
• The routing table for each router is unique
• Show ip route
R1

OSPF in Multi Access Networks


Multiple access networks can create two problems R2 SW
for OSPF in terms of the transfer of LSAs:
R3

• Occurrence of multiple contiguities


• Lots of LSA transfers
R4
Once the neighbors are established, link-state sharing Routers (n) Neighbors ( n(n-1)/2)
continues between the routers. The problem here, 4 6
each router communicates with the rest of all.
10 45
20 190
Multicast Addressing

OSPF uses IP multicast addressing to communicate


with routing peers. This reduces the overhead of R1 (DR) R2 (BDR)
other devices on the same segment that are not 1.1.1.4 1.1.1.3
running OSPF.
When a OPSF update is sent on network, the
destination MAC address is modified to use the
reserved multicast range. 24 bits of the MAC address
are the lower 24 bits of the IP multicast address. With
OSPF, the relationship between the IP multicast
address and the MAC address is as follows:

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

OSPF routers to obtain routing information and to achieve 5


merge status: R1
1. Setting up neighbors
2. Change of link status presentation with LSAs 20
10 10.11.0.0/16
3. Topology table creation 10.2.0.0/16 10.5.0.0/16
4. Executing the SPF Algorithm
R2 2 R5
The reason why you prefer the route to written blue in the R4
table below, SPF algorithm is choosing the shortest path. 2 2
Therefore, the other two routes are not preferred because
they cost more. Other paths: 20 20
10.4.0.0/16 10.9.0.0/16
10.3.0.0/16
1. R1->R2->R4 ---- Cost is 40 10.10.0.0/16
2. R1->R5->R4 ---- Cost is 50 10
10 10.8.0.0/16
10.6.0.0/16
Target Path Cost
10.3.0.0/16 R1->R2 12

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

OSPF packet 3 or 4 Summary LSA


Link header IP header Link trailer
types
5 Autonomous System External LSA

6 Multicast OSPF LSA

7 Defined for Not-So-Stubby-Areas


Ethernet fields are shown
• Destination MAC Address 8 External attributes LSA for BGP
• Target MAC Address
9-10-11 Opaque LSA
IP Packets
• Destination IP Address
• Target IP Address
• Protocol ID is 89 Type Code
Router ID
Area ID
0x01 -- > Hello Packet Creation of neighborhs
0x02 -- > Database Description (DBD) Database synchronization
0x03 -- > Link State Request (LSR) Requesting a link from the router
0x04 -- > Link State Update (LSU) Reply to request
0x05 -- > Link State Acknowledgment (LSAck) Confirm to LSU
Type of LSAs
Type 1
• Creates by all routers.
• Takes off the direct-connected
network prefix and connection type
list.
İnternet
• Transmitted in the area and not
propagated beyond the ABR.
• The source identity of the LSA is
defined by the router ID of router.
Area 1 Area 0 Area 2
• Sent to the multicast within the region
where they are produced.
DR DR

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

Hello packets not recieved yet, so router


Down State sends to Hello packets.
Setting
Up Hello packets are taken from neighbor.
Init State Packets contain the router ID of the
Neighbors sending router.

Two-Way State One DR and one BDR are selected from


the Ethernet connection.

Starts the exchange of DBD packages.


ExStart State
Synchronize
The router changes the DBD packets. If extra
OSPF Exchange State routing information is required follow the
Databases diagram. Otherwise go to Full State.
LSR and LSU are used to obtain additional
Loading State route information. Route are processed using
SPF algorithm.

Full State Comlete mergers.


Transition Between States On Scheme(cont.)

R1 Fa 0/0:
Fa 0/0: R2
192.168.1.2/24
192.168.1.1/24

Lo0: 10.10.10.1 Lo0: 10.10.10.2

Fa 1/0: DOWN DOWN Fa 1/0:


172.16.1.1/24 I am 10.0.0.1. I see no one. 172.168.2.1/24

HELLO --- 224.0.0.5 (Multicast)

I am 10.0.0.2. I see 10.0.0.1 INIT

HELLO --- 224.0.0.5 (Multicast)


2-WAY
I am 10.0.0.1. I see 10.0.0.2

HELLO --- 192.168.1.2 (Unicast) 2-WAY


When an OSPF router has a higher Router ID or priority
DR/BDR ELECTION than the existing DR or BDR, it does not preempt the
existing DR or BDR. This prevents the DR/BDR election
I am 10.0.0.1. I see 10.0.0.2
process from occurring whenever a new OSPF router joins
DR = 192.168.1.2 || BDR = 192.168.1.1
a broadcast network.
HELLO --- 224.0.0.5 (Multicast)
When an OSPF router joins a broadcast network which has
I am 10.0.0.1. I see 10.0.0.2 a DR and BDR elected, it will only establish adjacency and
enter into the FULL state with the DR and BDR. The
DR = 192.168.1.2 || BDR = 192.168.1.1
neighbor state with other non-DR/BDR neighboring
HELLO --- 224.0.0.5 (Multicast) routers (DROTHERs) would stays in the 2-WAY state.
Transition Between States On Scheme(cont.)
R1 Fa 0/0:
Fa 0/0: R2
192.168.1.2/24
192.168.1.1/24

Lo0: 10.10.10.1 Lo0: 10.10.10.2

EXSTART I am the Master and will start the Exchange. EXSTART Fa 1/0:
(Seq = 2222, Init, More, Master) 172.168.2.1/24

DBD – 192.168.1.2 (Unicast)


The EXSTART state ends once the Master/Slave
No, I am the Master as I have higher Router ID. relationship is determined.
(Seq = 1111, Init, More, Master)

DBD – 192.168.1.1 (Unicast)


EXCHANGE EXCHANGE
Here is a summary of my link-state database
(Seq = 1111, More, Slave) Sequence numbers are being used to determine the
newness of link-state information.
DBD - 192.168.1.2 (Unicast)
The Master will send the next DBD packet only when the
Here is a summary of my link-state database. previous DBD packet is acknowledged through a DBD
(Seq = 1112, More, Master) packet with the same sequence number from the Slave. If
the Master does not receive an acknowledgment for an
DBD – 192.168.1.1 (Unicast) outstanding DBD packet within the RxmtInterval, it would
N times of DBD exchange retransmit the previous DBD packet.
(Seq = xxxx, Master)
The Slave would send a DBD packet with the same
DBD – 192.168.1.1 (Unicast) sequence number to acknowledge the receipt of a DBD
packet from the Master. Therefore, the last DBD packet is
(Seq = xxxx, Slave)
always sent by the Slave.
DBD - 192.168.1.2 (Unicast)
Transition Between States On Scheme(cont.)
R1 Fa 0/0:
Fa 0/0: R2
192.168.1.2/24
192.168.1.1/24

Lo0: 10.10.10.1 Lo0: 10.10.10.2

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

LSR – 192.168.1.2 (Unicast)


I would like to have the complete entry for
LSID 10.10.10.1, Type Router-LSA

LSR – 192.168.1.1 (Unicast)

Here is the complete entry for


LSID 10.10.10.1, Type Router-LSA

LSU - 192.168.1.2 (Unicast)


Here is the complete entry for
LSID 10.10.10.2, Type Router-LSA

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

The router identifies its identity according to one of


three criteria in accordance with the following order Is the IPv4 YES
of preference: loopback
interface
configured
• Via router ID command
• Highest loopback
• Selects the highest valued active
IPv4 address of the physical NO
interfaces.
Use the configured highest IPv4 address
Application 1 - Topology

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

R1 192.168.10.5 Uses 224.0.0.5 multicast addresses to listen to LSA’ s.

R2 209.165.201.1 Send LSA’ s to all participating directors.

R3 10.1.10.1 Passively listen to LSA’ s.

R4 192.168.10.3 If the DR stops producing Hello Packets, it will promote itself.

R5 192.168.10.1 LSA will not be sent to all routers in the network.

R6 209.165.201.2 Uses 224.0.0.6 multicast addresses to send to LSA’ s.

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

OSPF design is classless. For this reason, the general


search mask must always be used. The general
search mask is generally the reverse of the subnet
mask configured in this interface, while defining the
255.255.255.255
interfaces involved in the routing process. Subnet Mask
- 255.255.255.000
A general lookup mask is a 32-bit binary string used
by the router to determine which address bits are General Search Mask 000.000.000.255
used to examine a match. The binary 1 in a submask
equals 1 to a match and the binary 0 equals to not
255.255.255.255
match. The opposite is true for a global search mask: Subnet Mask
- 255.255.255.240
• 0 : Matches the corresponding bit value in the General Search Mask 000.000.000.015
address.
• 1 : Ignores the corresponding bit value in the 255.255.255.255
address. Subnet Mask
- 255.255.255.192
General Search Mask 000.000.000.063
The easiest way to calculate a global search mask is
to subtract the network subnet mask from
255.255.255.255.
Passive Interface
By default, OSPF messages are transmitted from all
OSPF-enabled interfaces. Sending unnecessary
messages in a LAN affects the network in three
ways:
• Inefficient use of bandwidth
• Inefficient use of resources
• Increased security vulnerability
Bandwidth Interface Type Cost
OSPF use cost as a metric. Low cost indicates a 10 Gb/sn 1
better way than high cost. The cost of an interface is 1 Gb/sn 1
inversely proportional to the bandwidth of the 100 Mb/sn 1
interface.
Reference bandwidth 10 Mb/sn 10
COST = 1.544 Mb/sn 64
Interface bandwidth
128 Kb/sn 781
The bandwidth of all connected interfaces must be 64 Kb/sn 1562
the same. The default reference-bandwidth is 100
000 000 kb/s or 100 Gb/s.
MD5 Authentication
R1 R2
Often routing systems can be attacked by routing
partners or by tampering with information carried
in the routing protocol. Tampered routing
192.168.10.20/24
information to each other often gives incorrect 192.168.10.10/24
information about to the system, to cause a
denial-of-service attack (DoS) or can be used to
pass information from the road that traffic would OSPF Update Packet
192.168.10.10/24 Secret Key
normally not be transmitted. The consequences of
tampering with routing information are: 192.168.20.10/24

• Route traffic to create routing loops


• Route traffic for tracing from an unsecured
connection
• Guide traffic to trash
When neighbor authentication is configured on a
router, this route checks the identity of the source
of each routing update package it receives. This Signature 1HIjoı3IıjKK54
mean, with the exchange of an authentication
key(sometimes known as a password) happens in
routers.
NO YES
The signature is
THROW ACCEPT
matching?
Troubleshooting

Connectivity Issues due to routing? • Are the interfaces operational?


• Are the interfaces enable for OSPF?
• Does the OSPF area match?
YES • Is there an interface that is configured as passive?

NO SHOW COMMAND
Is the neighbor • Show ip ospf neighbors
table correct? • Show ip interface brief
• Show ip ospf interface

YES • Are the interfaces operational?


• Are the interfaces enable for OSPF?
• Does the OSPF area match?
Is the routing NO • Is there an interface that is configured as passive?
table correct?
SHOW COMMAND
• Show ip ospf neighbors
YES • Show ip interface brief
• Show ip ospf interface

• Are the interfaces operational?


Does traffic NO • Are the interfaces enable for OSPF?
take desired • Does the OSPF area match?
route? • Is there an interface that is configured as passive?

YES SHOW COMMAND


• Show ip ospf neighbors
• Show ip interface brief
Functionally Network? • Show ip ospf interface
OSPF Network Types
OSPF’s functionality is different across several different network topology types. OSPF’s interaction with Frame Relay will be explained in
another section .
Broadcast Multi-Access – indicates a topology where broadcast occurs.
• Examples include Ethernet, Token Ring, and ATM.
• OSPF will elect DRs and BDRs.
• Traffic to DRs and BDRs is multicast to 224.0.0.6. Traffic from DRs and BDRs to other routers is multicast to 224.0.0.5.
• Neighbors do not need to be manually specified.
The default OSPF network type for Ethernet and Token Ring is Broadcast Multi-Access. To configure manually:
Router(config)# interface Ethernet 0
Router(config-if)# ip ospf network broadcast
Point-to-Point – indicates a topology where two routers are directly connected.
• An example would be a point-to-point T1.
• OSPF will not elect DRs and BDRs.
• All OSPF traffic is multicast to 224.0.0.5.
• Neighbors do not need to be manually specified.
The default OSPF network type for T1’s (HDLC or PPP) and Point-to-Point Frame Relay is Point-to-Point. To
configure manually:
Router(config)# interface serial 0
Router(config-if)# encapsulation frame-relay
Router(config-if)# interface serial 0.1 point-to-point
Router(config-if)# frame-relay map ip 10.10.10.10 100 broadcast
Router(config-if)# ip ospf network point-to-point
OSPF Network Types(cont.)
Non-broadcast Multi-access Network (NBMA) – indicates a topology where one interface can connect to multiple
destinations; however, broadcasts cannot be sent across a NBMA network.
• An example would be Frame Relay.
• OSPF will elect DRs and BDRs.
• OSPF neighbors must be manually defined, thus All OSPF traffic is unicast instead of multicast.
The default OSPF network type for basic Frame Relay is Non-broadcast Multi-access Network (NBMA). To configure
manually:
Router(config)# interface serial 0
Router(config-if)# encapsulation frame-relay
Router(config-if)# frame-relay map ip 10.10.10.10 100
Router(config-if)# ip ospf network non-broadcast
Router(config)# router ospf 1
Router(config-router)# neighbor 10.10.10.10
Notice that the neighbor was manually specified, as multicasting is not allowed on an NBMA. However, the Frame-
Relay network can be tricked into allowing broadcasts, eliminating the need to manually specify neighbors:
Router(config)# interface serial 0
Router(config-if)# encapsulation frame-relay
Router(config-if)# frame-relay map ip 10.10.10.10 100
Router(config-if)# ip ospf network broadcast
Notice that the ospf network type has been changed to broadcast, and the broadcast parameter was added to the
frame-relay map command. The neighbor no longer needs to be specified, as multicasts will be allowed out this
map.
OSPF Network Types(cont.)
Point-to-Multipoint – indicates a topology where one interface can connect to multiple destinations. Each connection between a source and
destination is treated as a point-to-point link.
• An example would be Point-to-Multipoint Frame Relay.
• OSPF will not elect DRs and BDRs.
• All OSPF traffic is multicast to 224.0.0.5.
• Neighbors do not need to be manually specified.
The default OSPF network type for Point-to-Multipoint Frame Relay is still Non-broadcast Multi-access Network (NBMA). However, OSPF supports
an additional network type called Point-to-Multipoint, which will allow neighbor discovery to occur automatically. To configure:
Router(config)# interface serial 0
Router(config-if)# encapsulation frame-relay
Router(config)# interface serial 0.2 multipoint
Router(config-if)# frame-relay map ip 10.10.10.10 100 broadcast
Router(config-router)# ip ospf network point-to-multipoint
Additionally, a non-broadcast parameter can be added to the ip ospf network command when specifying point-to-multipoint.
Router(config)# interface serial 0
Router(config-if)# encapsulation frame-relay
Router(config)# interface serial 0.2 multipoint
Router(config-if)# frame-relay map ip 10.10.10.10 100
Router(config-if)# ip ospf network point-to-multipoint non-broadcast
Router(config)# router ospf 1
Router(config)# neighbor 10.10.10.10
Notice the different in configuration. The frame-relay map command no longer has the broadcast parameter, as broadcasts and multicasts are not
allowed on a non-broadcast network. Thus, in the OSPF router configuration, neighbors must again be manually specified. Traffic to those
neighbors will be unicast instead of multicast.
OSPF Route Types

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

AREA 10 R2 AREA 0 AREA 20 R6


OSPF Area Types(cont.)
In order to control the propagation of LSAs in the OSPF domain, several area types were developed.
Standart Area : A normal OSPF area.
• Routers within a standard area will share Router (Type 1) and Network (Type 2) LSAs to build their topology tables.
Once fully synchronized, routers within an area will all have identical topology tables.
• Standard areas will accept Network Summary (Type 3) LSAs, which contain the routes to reach networks in all other
areas.
• Standard areas will accept ASBR Summary (Type 4) and External (Type 5) LSAs, which contain the route to the ASBR and
routes to external networks, respectively.
Configuration of standard areas is straight forward:
Router(config)# router ospf 1
Router(config-router)# network 10.1.0.0 0.0.7.255 area 1
Stub Area : Prevents external routes from flooding into an area.
• Like Standard areas, Stub area routers will share Type 1 and Type 2 LSAs to build their topology tables.
• Stub areas will also accept Type 3 LSAs to reach other areas.
• Stub areas will not accept Type 4 or Type 5 LSAs, detailing routes to external networks.
The purpose of Stub areas is to limit the number of LSAs flooded into the area, to conserve bandwidth and router CPUs. The
Stub’s ABR will automatically inject a default route into the Stub area, so that those routers can reach the external networks.
The ABR will be the next-hop for the default route.
Configuration of stub 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 1 stub
The area 1 stub command must be configured on all routers in the Stub area. No ASBRs are allowed in a Stub area.
OSPF Area Types(cont.)

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:

Router(config)# router ospf 1


Router(config-router)# network 10.1.0.0 0.0.7.255 area 1
Router(config-router)# area 1 nssa

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:

Router(config)# router ospf 1


Router(config-router)# network 10.1.0.0 0.0.7.255 area 1
Router(config-router)# area 1 nssa no-summary

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:

R4(config)# interface FastEthernet 0/0


R4(config-if)# ip address 80.0.0.2 255.0.0.0
All necessary IP configurations
R4(config)# interface FastEthernet 0/1 were made on all active
R4(config-if)# ip address 50.0.0.1 255.0.0.0 interfaces
R4(config)# interface Serial 0/0/0
R4(config-if)# ip address 40.0.0.2 255.0.0.0
R4(config)# ip route 0.0.0.0 0.0.0.0 80.0.0.1 The default route was configured to access the web
server. This route was also taught on the OSPF
R4(config)# router ospf 4 network(default-information-originate).
R4(config-router)# router-id 4.4.4.4
The required OSPF settings were made in the
R4(config-router)# network 40.0.0.0 0.0.0.255 area 0 router (eg router ID, networks to which it was
R4(config-router)# network 50.0.0.0 0.0.0.255 area 0 connected)
R4(config-router)# default-information-originate
Check Configuration on Routers(cont.)

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:

• The Router ID of the remote neighbor.


• The OSPF priority of the remote neighbor (used for DR/BDR elections).
• The current neighbor state.
• The dead interval timer.
• The connecting IP address of the remote neighbor.
• The local interface connecting to the remote neighbor.
Troubleshooting on Router(cont.)

Only the output of show commands on a single router(R4) will be examined. To view the OSPF topology table:

The Topology Table provides the following information:

• The actual link (or route).


• The advertising Router ID.
• The link-state age timer.
• The sequence number and checksum for each entry.
Troubleshooting on Router(cont.)

Only the output of show commands on a single router(R4) will be examined. To view the specific information about an OSPF process:

The show ip ospf command provides the following information:


• The local Router ID.
• SPF Scheduling information, and various SPF timers.
• The number of interfaces in specific areas, including the type of area.
• The link-state age timer.
• The sequence number and checksum for each entry.
Troubleshooting on Router(cont.)

Only the output of show commands on a single router(R4) will be examined. To view routing protocol specific information for OSPF:

The show ip protocols command provides the following information:

• Locally originated networks that are being advertised.


• Neighboring sources for routing information
• The administrative distance of neighboring sources.
Troubleshooting on Router(cont.)

Only the output of show commands on a single router(R4) will be examined. To view OSPF-specific information on an interface:

The show ip ospf interface command provides the following information:

• The local Router ID.


• The interface network type.
• The OSPF cost for the interface.
• The interface Hello and Dead timers.
• A list of neighbor adjacencies.
OSPF Summarization

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

10.1.1.0/24 10.1.2.0/24 192.168.1.0/24 192.168.2.0/24


AREA 10 AREA 15
Calculating Route Summarization

Step 1 Step 2 Different Bits

10.1.1.0 00001010 . 00000001 . 00000001 . 00000000


10.1.2.0 00001010 . 00000001 . 00000010 . 00000000

Matching first 22 bits


Step 3

10.1.1.0 00001010 . 00000001 . 00000000 . 00000000


255.255.252.0 11111111 . 11111111 . 11111100 . 00000000

/22

10.1.0.0/22 or 10.1.1.0 255.255.252.0

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

S-ar putea să vă placă și