Você está na página 1de 53

Module 11

OSPF

Objectives
Describe the background and basic features of OSPF
Identify and apply the basic OSPF configuration
commands
Describe, modify and calculate the metric used by
OSPF
Describe the Designated Router/Backup Designated
Router (DR/BDR) election process in multiaccess
networks.
Configure and propagate a default route in OSPF.

Introduction to OSPF

Background of OSPF

OSPF Message Encapsulation

OSPF Packet Types

5 types of OSPF Packet

Hello Protocol

Type: OSPF Packet Type: Hello (1), DD (2), LS Request (3), LS Update (4), LS ACK (5)
Router ID: ID of the originating router
Area ID: area from which the packet originated
Network Mask: Subnet mask associated with the sending interface
Hello Interval: number of seconds between the sending router's hellos
Router Priority: Used in DR/BDR election (discussed later)
Designated Router (DR): Router ID of the DR, if any
Backup Designated Router (BDR): Router ID of the BDR, if any
List of Neighbors: lists the OSPF Router ID of the neighboring router(s)

Hello Protocol
OSPF Hello Packet are sent
every 10 seconds on
multiaccess networks and
point-to-point segment

On non-broadcast multiaccess (NBMA) segments (Frame


Relay, X.25, ATM), Hello Packets are send every 30 seconds
8

OSPF Link-state Updates

OSPF Algorithm
OSPF Uses Dijsktras SPF Algorithm

10

Administrative Distance

11

Authentication

Like RIPv2 and EIGRP, OSPF also supports authentication routing.


Purpose is to encrypt & authenticate routing information
This is an interface specific configuration
Routers will only accept routing information from other routers that have
been configured with the same password or authentication information
12

Basic OSPF Configuration

Lab Topology

14

The router ospf command


1. Enable OSPF on a router use the following command:
Router(config)#router ospf process-id

process-id is:
a number between 1 and 65535
locally significant
does not have to match other OSPF routers
2. Propagate Routers networks:
Router(config-router)#network network-address wildcard-mask area area-id

wildcard-mask: the inverse of the subnet mask. combination of


network-address and wildcard-mask similar to that which can be used
by EIGRP
area-id: refers to the OSPF area. OSPF area is a group of routers
that share link state information

15

The router ospf command

Router(config)#router ospf process-id


Router(config-router)#network network-address wildcard-mask area area-id
16

OSPF Router ID

Router ID is determined in the following order:


1. Use the IP address configured with the OSPF router-id command.
Router(config)#router ospf process-id
Router(config-router)#router-id ip-address
2. If the router-id is not configured, then the router chooses highest IP
address of any of its Ioopback interfaces.
Router(config)#interface loopback number
Router(config-if)#ip address ip-address subnet-mask
3. If no Ioopback interfaces are configured, then the router chooses
highest active IP address of any of its physical interfaces.

Commands used to verify current router ID included: show ip


protocols, show ip ospf, show ip ospf interface

17

OSPF Router ID
Verifying Router ID

18

Verifying OSPF
Verifying Neighbor Adjacency

19

Verifying OSPF
The show ip protocols Command

20

Verifying OSPF
The show ip ospf Command

21

Verifying OSPF
The show ip ospf interface Command

22

Examining the Routing Table

Use the show ip route command to display the routing table which:
O at the beginning of a route indicates that the router source is
OSPF
Unlike RIPv2 and EIGRP, OSPF does not automatically summarize at
major network boundaries. OSPF is inherently classless
23

The OSPF Metric

OSPF Metric
Cisco OSPF Cost Value

OSPF uses cost as the metric for determining the best route:
Cost = 108/bandwidth (bps)
The Cisco IOS uses the cumulative bandwidths of the outgoing
interfaces from the router to the destination network as the cost value

25

OSPF Metric

26

OSPF Metric

27

Modifying the Cost of the Link

28

Modifying the Cost of the Link

29

OSPF and Multiaccess Networks

Challenges in Multiaccess Networks


Broadcast MultiAccess vs. Poit-to-Point Network

Multiaccess network is a
network with more than two
devices on the same shared
media

Point to point network there


are only two devices on the
network, one at each end

31

Challenges in Multiaccess Networks

OSPF defines five network types:


Point-to-point
Broadcast Multiaccess
Nonbroadcast Multiaccess (NBMA)
Point-to-multipoint
Virtual links

32

Challenges in Multiaccess Networks

33

Challenges in Multiaccess Networks


LSA Flooding Scenario

Flooding of LSAs: Every router in a multiaccess network had to flood


and acknowledge all received LSAs to all other routers on that same
multiaccess network -> network traffic would become quite chaotic.
34

DR/BDR Election Process

35

DR/BDR Election Process

DR/BDR elections do not occur in point to point networks


36

DR/BDR Election Process

The DR/BDR elections will take place on this multi-access networks.

37

DR/BDR Election Process

DR/BDR Election
1. DR: Router with the highest OSPF interface priority.
2. BDR: Router with the second highest OSPF interface priority.
3. If OSPF interface priorities are equal, the highest router ID is used to break the tie.

38

DR/BDR Election Process


Old BDR

New DR

New
BDR

The DR and BDR election process takes place as soon as the first router with an
OSPF enabled interface is active on the multiaccess network
And when the DR is elected, it still remains the DR until one of the following
conditions occurs:
The DR itself fails.
The OSPF process on the DR itself fails.
The multiaccess interface on the DR itself fails.
If the DR fails, the BDR assumes the role of DR and an election is held to choose
a new BDR

39

DR/BDR Election Process

RouterB remains the DR even when new router


(RouterD) with higher RouterID is added

40

DR/BDR Election Process

Former DR

RouterB remains the DR even when


former DR (RouterC) returns
41

DR/BDR Election Process

BDR fails, highest router among


DROthers become new BDR

42

DR/BDR Election Process

DR fails, the BDR assumes the new DR and


an election is held to choose a new BDR
43

OSPF Interface Priority

44

More OSPF Configuration

Redistributing an OSPF Default Route

46

Redistributing an OSPF Default Route

47

Redistributing an OSPF Default Route

48

Fine-Tuning OSPF

49

Fine-Tuning OSPF

Before

After

50

Fine-Tuning OSPF

Note:
OSPF requires that the Hello and Dead intervals match between two
routers for them to become adjacent.

51

Fine-Tuning OSPF

52

Good luck with this module!

Você também pode gostar