Académique Documents
Professionnel Documents
Culture Documents
1
Single-Area OSPF Concepts
Open Shortest Path First (OSPF) is a link-state
routing protocol based on open standards.
“Open”in OSPF means open to the public and
non-proprietary.
OSPF is becoming the preferred IGP protocol
when compared with RIP v1 and v2 because
it is scalable (permitting growth with minimal
design change.)
OSPF can be used and configured as a single
area for small networks, or for large networks
if hierarchical network design principles are
followed.
Copyright 2003 www.ciscopress.com
Defining areas
– reduces routing overhead,
– speeds up convergence,
– confines network instability to an area,
– improves performance.
2
OSPF Overview
3
OSPF Terminology
Designated Routers
To reduce the number of exchanges of
routing information among several
neighbors on the same network,
OSPF routers elect a
Designated Router (DR) and a
Backup Designated Router (BDR)
that serve as focal points for routing
information exchange.
4
Designated Routers
Since all routers in an area have the
same view of the network,
• OSPF selects the fastest loop-free path from the shortest-path first
tree as the best path in the network.
• RIP is appropriate for small networks, and the best path is based on the
lowest number of hops
5
Comparing OSPF with Distance Vector Routing Protocols
• OSPF supports VLSMs and therefore is referred to as a classless
protocol.
RIP v1 does not support VLSMs, however, RIP v2 does support VLSMs.
• RIP considers a network that is more than 15 routers away to be
unreachable because the number of hops is limited to 15. This
limits RIP to small topologies. OSPF has no size limits and is
suitable for intermediate to large networks.
• RIP selects a path to a network by adding one to the hop count reported
by a neighbor. It compares the hop counts to a destination and selects the
path with the smallest distance or hops. This algorithm is simple and does
not require a powerful router or a lot of memory. RIP does not take into
account the available bandwidth in best path determination.
• OSPF selects a path using cost, a metric based on bandwidth. All OSPF
routers must obtain complete information about the networks of every
router to calculate the shortest path. This is a complex algorithm.
Therefore, OSPF requires more powerful routers with more memory
than RIP.
Copyright 2003 www.ciscopress.com
6
Shortest Path Algorithm
7
DR/BDR vs Network Type
Hello Packets
When a router starts an OSPF routing process on an interface, it sends a
hello packet and continues to send hellos at regular intervals.
At Layer 3 of the OSI model, the hello packets are addressed to the
multicast address 224.0.0.5. This address is “all OSPF routers”.
OSPF routers use hello packets to
– initiate new adjacencies.
– 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 (non-broadcast multi-access)
networks, such as Frame Relay, the default time is 30 seconds.
On multi-access (broadcast and non-broadcast) networks, the Hello
protocol elects a designated router (DR) and a backup designated
router (BDR).
Although the hello packet is small, it consists of the OSPF packet header.
For the hello packet the type field is set to 1.
The hello packet carries information that all neighbors must agree upon
before an adjacency is formed, and link-state information is exchanged.
8
OSPF Hello Protocol
9
Maintaining Routing Information
10
Single-Area OSPF Configuration
An area in the OSPF network, may be assigned any
number from 0 to 65,535.
11
Single-Area OSPF Configuration
Router(config-router)#network address
wildcard-mask area area-id
The network address can be
– a whole network,
– a subnet,
– the address of the interface.
12
Configuring OSPF Loopback Address and Router Priority
When the OSPF process starts, the Cisco IOS uses the highest
local active IP address as its OSPF router ID. [If the active interface
goes down, the OSPF process has no router ID and therefore ceases to function
until the interface comes up again.]
13
Configuring OSPF Loopback Address and Router Priority
14
Configuring OSPF Loopback Address and Router Priority
The command
show ip ospf interface
will display the interface priority value as well as other key
information.
15
Configuring Router Priority
Router(config-if)#bandwidth 64
16
Modifying OSPF Cost Metric
The default bandwidth for Cisco serial interfaces is
1.544 Mbps, or 1544 kbps.
You can change the cost.
For example, the default cost assigns the lowest cost
value, 1, to a 100 Mbps link (100 Mbps / 100 Mbps).
For 100-Mbps and Gigabit Ethernet links, the default
cost values could cause routing to a less than
desirable path.
The cost value can be between 1 and 65,535.
Use the following interface configuration command to
set the link cost:
17
Modifying OSPF Cost Metric
18
Configuring OSPF Authentication
To configure OSPF authentication:
Router(config-if)#ip ospf
authentication-key password
Router(config-router)#area area-
number authentication
19
Plain Text vs. Encrypted Authentication
To enable encrypted authentication::
Router(config-router)#area area-id authentication
message-digest
MD5 authentication creates a message digest,
scrambled data, based on the password and the packet contents.
The receiving router uses the shared password and the packet to re-
calculate the digest.
• If the digests match, the router believes that the source and contents of
the packet have not been tampered with.
• The authentication type identifies which authentication, if any, is being
used.
• In the case of message-digest authentication, the authentication data
field contains the key-id and the length of the message digest that is
appended to the packet. [The message digest is like a watermark that
cannot be counterfeited.]
20
Configuring OSPF Timers
OSPF routers must have the same hello intervals and
the same dead intervals to exchange information.
21
Configuring OSPF Timers
To configure the hello and dead intervals on an
interface, use the following commands:
22
Propagating a Default Route in OSPF
To configure a default route:
Router(config-router)#default-information originate
OSPF, Propagating a
Default Route
23
Propagating a Default Route in OSPF
Common OSPF
Configuration Issues
24
Verifying OSPF Configuration
• show ip protocol
Displays parameters about timers, filters, metrics and networks.
• show ip route
Displays contents of the routing table: routes known to router
and how they were learned.
25
Cisco IOS Debug and Clear Commands
26