You are on page 1of 35

CCNA – Semester3

Module 2
Single Area OSPF

Objectives

• Link State Routing Protocol


• Single Area OSPF Concepts
• Single Area OSPF Configuration
Link State Routing Protocol

Link State and Distance Vector Routing


Link-state routing protocol

• Collect routing information from all other


routers in the network or within a defined area
of the network.
• Each router independently calculates its best
paths to all destinations in the network.
• It is less likely to propagate incorrect
information provided by any of its neighboring
routers

Link-state routing protocol functions

• Link-state routing protocols perform the


following functions:
– Respond quickly to network changes
– Send triggered updates only when a network change has
occurred
– Send periodic updates known as link-state refreshes
– Use a hello mechanism to determine the reachability of
neighbors
Link State Routing

Link-state routing concepts

• Link-state routing uses the


following features:
– Link-state advertisements (LSAs)
– A topological database
– The shortest path first (SPF)
algorithm
– The resulting SPF tree
– A routing table of paths and ports
to each network to determine the
best paths for packets
Advantages of link-state routing
• Fast convergence
• Use cost metric
• No routing loop
• The awareness of the entire network greatly assist
troubleshooting.
• Support CIDR and VLSM

Disadvantages of link-state routing

• Require more memory and processing power than


distance vector routers.
• Require strict hierarchical network design.
• They require good understanding of link-state routing.
• Initial discovery process by flooding LSAs can
significantly decrease the capability of the network to
transport data.
Single Area OSPF Concepts

Single Area OSPF

• Open Shortest Path First


(OSPF) is a link-state
routing protocol based on
open standards.
• OSPF proves to be a
robust and scalable
routing protocol.
• OSPF can be used and
configured as a single
area for small networks.
Large OSPF network
• Large OSPF networks use a hierarchical design.
• Multiple areas connect to a distribution area, area 0, also called the
backbone.
• Defining areas reduces routing overhead, speeds up convergence,
confines network instability to an area and improves performance.

OSPF terminology
OSPF terminology

OSPF terminology
OSPF terminology

OSPF terminology
OSPF terminology

OSPF terminology
OSPF terminology

Problem: Link state Updates


OSPF Features

• OSPF addresses the following issues:


– Speed of convergence
– Support for Variable Length Subnet Mask (VLSM)
– Network size
– Path selection
– Grouping of members

Shortest path algorithm

• Each node has a complete database of all the links so complete


information about the physical topology is known.
• All router link-state databases are identical.
• The shortest path algorithm then calculates a loop-free topology
Neighbor Relationship

• A neighbor relationship is required for OSPF routers to


share routing information.
• A router will try to become adjacent, or neighbor, to at
least one other router on each IP network to which it is
connected.
• OSPF routers determine which routers to become
adjacent to based on the type of network they are
connected to. Once an adjacency is formed between
neighbors, link-state information is exchanged.

OSPF network types


• A neighbor relationship,
adjacent, is required for OSPF
routers to share routing
information which depends on
network type.
• OSPF interfaces recognize
three types of networks:
– Broadcast multi-access, such as
Ethernet
– Point-to-point networks
– Nonbroadcast multi-access
(NBMA), such as Frame Relay
• A fourth type, point-to-
multipoint, can be configured
on an interface by an
administrator.
OSPF: Adjacency

• Too much overhead if n routers, n*(n-1)/2


adjacencies need to be formed.
• The solution to this overhead is to hold an
election for a designated router (DR).
• All routers in a network form adjacency with DR
and BDR (backup designated router).
• Link-state information sent to OSDF routers
(DROther) at 224.0.0.5.
• DROther sent link-state information to DR and
BDR at 224.0.0.6

OSPF Network Type

• On point-to-point networks only two nodes exist and no


DR or BDR is elected. Both routers become fully
adjacent with each other.
DR and BDR Receive RSAs

OSPF Hello protocol

• The hello packets are addressed to the multicast


address 224.0.0.5.
• OSPF routers use hello packets to initiate new
adjacencies and to ensure that neighbor routers
are still functioning.
• Hellos are sent every 10 seconds by default on
broadcast multi-access and point-to-point
networks.
• On interfaces that connect to NBMA networks,
such as Frame Relay, the default time is 30
seconds.
OPSF Packet Header

• On multi-access networks the Hello protocol elects a


designated router (DR) and a backup designated router
(BDR).

OSPF Hello Header


Exchange Process

172.16.5.1/24 172.16.5.2/24
A E0 E1 B
Down State

Exchange Process

172.16.5.1/24 172.16.5.2/24
A E0 E1 B
Down State
I am router ID 172.16.5.1 and I see no one.

Init State

Router B
Neighbors List
172.16.5.1/24, int E1
Exchange Process

172.16.5.1/24 172.16.5.2/24
A E0 E1 B
Down State
I am router ID 172.16.5.1 and I see no one.

Init State

Router B
Neighbors List
172.16.5.1/24, int E1
I am router ID 172.16.5.2, and I see 172.16.5.1.

Exchange Process

172.16.5.1/24 172.16.5.2/24
A E0 E1 B
Down State
I am router ID 172.16.5.1 and I see no one.

Init State

Router B
Neighbors List
172.16.5.1/24, int E1
I am router ID 172.16.5.2, and I see 172.16.5.1.

Router A
Neighbors List
172.16.5.2/24, int E0
Two-Way State
Discovering Routes

DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
Exstart State
39547439070713

Hello I will start exchange because I have router ID 172.16.5.1.

afadjfjorqpoeru
39547439070713

No, I will start exchange because I have a


higher router ID. Hello

Discovering Routes

DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
Exstart State
39547439070713

Hello I will start exchange because I have router ID 172.16.5.1.

afadjfjorqpoeru
39547439070713

No, I will start exchange because I have a


higher router ID. Hello

Exchange State afadjfjorqpoeru


39547439070713

Here is a summary of my link-state database.


DBD
afadjfjorqpoeru
39547439070713

DBD Here is a summary of my link-state database.


Discovering Routes

DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


LSAck

Discovering Routes

DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


LSAck

afadjfjorqpoeru
39547439070713
Loading State

LSR I need the complete entry for network 172.16.6.0/24.


afadjfjorqpoeru
39547439070713

Here is the entry for network 172.16.6.0/24. LSU


afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


Discovering Routes

DR
E0 E0
172.16.5.1 172.16.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


LSAck

afadjfjorqpoeru
39547439070713
Loading State

LSR I need the complete entry for network 172.16.6.0/24.


afadjfjorqpoeru
39547439070713

Here is the entry for network 172.16.6.0/24. LSU


afadjfjorqpoeru
39547439070713

LSAck Thanks for the information!


Full State

Maintaining Routing Information

Link-State Change
DR

1 LSU

x A
B

• Router A tells all OSPF DRs on 224.0.0.6


Maintaining Routing Information

2
Link-State Change
DR
LSU

x A
B

• DR tells others on 224.0.0.5

Maintaining Routing Information

2
Link-State Change
DR

3
x A
B
LSU
Maintaining Routing Information

LSU
Is entry in Is seq. #
LSA link-state Ignore LSA
database? the same?
Yes Yes
No
No
Add to database
Is seq. #
Yes higher?
Send LSAck
to DR No

Flood LSA Send LSU


with newer
Run SPF to calculate information to
new routing table source

End End

Single Area OSPF


Configuration
Configuring OSPF routing process

• OSPF routing uses the concept of areas.


• Each router contains a complete database of link-states
in a specific area.
• An area in the OSPF network may be assigned any
number from 0 to 65,535.
• A single area is assigned the number 0 and is known as
area 0.
• In multi-area OSPF networks, all areas are required to
connect to area 0. Area 0 is also called the backbone
area.

Enabling OSPF

• Each router contains a complete database of


link-states in a specific area.
• An area in the OSPF network may be assigned
any number from 0 to 65,535.
• A single area is assigned the number 0 and is
known as area 0.
• In multi-area OSPF networks, all areas are
required to connect to area 0. Area 0 is also
called the backbone area.
• To enable OSPF routing, use the global
configuration command syntax:
Router(config)#router ospf process-id
Configuring network

• IP networks are advertised as follows in OSPF:


Router(config-router)#network address wildcard-mask
area area-id
• The network address can be a whole network, a
subnet, or the address of the interface.
• The wildcard mask represents the set of host
addresses that the segment supports.

Basic OSPF Configuration


OSPF Router ID

• When the OSPF process starts, the Cisco IOS


uses the highest local active IP address as its
OSPF router ID.
• If there is no active interface, the OSPF process
will not start.
• To ensure OSPF stability, loopback interface is
used, the highest loopback IP address is used
as router ID. If there is no loopback interface,
then other interface types are considered.

Configure Loopback Interface

• To create and assign an IP address to a


loopback interface use the following
commands:
Router(config)#interface loopback number
Router(config-if)#ip address ip-address subnet-mask
• This loopback interface should be configured
with an address using a 32-bit subnet mask of
255.255.255.255.
DR Election
• The interface reporting the highest priority for a router
will ensure that it becomes the DR. A router with the
second highest priority will be the BDR.
• When OSPF priorities are the same, the OSPF election
for DR is decided on the router ID. The highest router ID
is selected.
• After the election process, the DR and BDR retain their
roles even if routers are added to the network with
higher OSPF priority values.

Router Priority

• If the network type of an interface is broadcast, the


default OSPF priority is 1.
• The priorities can be set to any value from 0 to 255.
• Modify the OSPF priority by entering interface
configuration:
Router(config-if)#ip ospf priority number
• To verify OSPF interface priority:
Router#show ip ospf interface type number
Show ip ospf interface

Modifying OSPF cost metric

• Cost is calculated using the formula 10^8/bandwidth,


where bandwidth is expressed in bps.
• It is essential for proper OSPF operation that the correct
interface bandwidth is set.
Router(config)#interface serial 0/0
Router(config-if)#bandwidth 64
• The cost number can be between 1 and 65,535.
• Use the following interface configuration command to
set the link cost:
Router(config-if)#ip ospf cost number
Cisco IOS Default IOS Path Cost

Configuring OSPF authentication

• The password can be up to eight characters.


Use the following command syntax to configure
OSPF authentication:
Router(config-if)#ip ospf authentication-key password

• After the password is configured, authentication


must be enabled:
Router(config-router)#area area-number authentication
Encrypted authentication
• With simple authentication, the password is sent as
plain text. This means that it can be easily decoded if a
packet sniffer captures an OSPF packet.
• To send encrypted authentication information and to
ensure greater security, the message-digest keyword is
used.
• The MD5 keyword specifies the type of message-digest
hashing algorithm to use, and the encryption type field
refers to the type of encryption, where 0 means none
and 7 means proprietary.

Configure encrypted authentication

• To send encrypted authentication information and to


ensure greater security, the message-digest keyword is
used.
• Use the interface configuration command mode syntax:
Router(config-if)#ip ospf message-digest-key key-id md5
encryption-type key
• The key-id is an identifier and takes the value in the
range of 1 through 255. Neighbor routers must use the
same key identifier with the same key value.
• The following is configured in router configuration
mode:
Router(config-router)#area area-id authentication
message-digest
Configuring OSPF timers

• OSPF routers must have the same hello intervals and


the same dead intervals to exchange information.
• By default, the dead interval is four times the value of
the hello interval.
• On broadcast OSPF networks, the default hello interval
is 10 seconds and the default dead interval is 40
seconds.
• On nonbroadcast networks, the default hello interval is
30 seconds and the default dead interval is 120 seconds.

Configuring OSPF timers

• The default values result in efficient OSPF


operation and seldom need to be modified
unless to improve performance.
• To configure the hello and dead intervals on an
interface, use the following commands:
Router(config-if)#ip ospf hello-interval seconds
Router(config-if)#ip ospf dead-interval seconds
OSPF, propagating a default route

• The following configuration statement will


propagate the default route to all the routers in a
normal OSPF area:
Router(config-router)#
default-information originate

Propagating a default route


Common OSPF configuration issues

• Failure to establish a neighbor relationship is caused by


any of the following reasons:
– Hellos are not sent from both neighbors.
– Hello and dead interval timers are not the same.
– Interfaces are on different network types.
– Authentication passwords or keys are different
– Router neighbors have duplicate IP addresses
– Router interfaces have not been up

Verifying the OSPF configuration


Debug and clear commands

Summary

• The features of link-state routing


• OSPF terminology
• OSPF network types
• The OSPF Hello protocol
• The basics steps in the operation of OSPF
• OSPF configuration
• OSPF verification
Lab Topology
10 ip

• 199.6.3.0/24
30 ip 30 ip • ProcessID: 5
• DR:Branch1 & Site2
• Key:newospf
• Hello: 17s
• Dead: 49s
• Internet:Branch1
Loopback

60 ip 60 ip
10 ip

CCNA3 – Module2

You might also like