Вы находитесь на странице: 1из 32

OSPF

NET1005

OSPF
CCNA Exploration Semester 2
Chapter 11

Linda Crane
With material from many sources including David Bray, Cisco.

Algonquin College

NET1005

Topics

ƒ Background and features of OSPF


ƒ Configure basic OSPF
ƒ OSPF metric
ƒ Designated router/backup designated router elections
ƒ Default information originate

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 2 Algonquin College2

NET1005 - L. Crane 1
OSPF

NET1005

Routing protocols

Interior Exterior

Distance vector Link state


RIP v1 OSPF EGP
RIP v2 IS-IS BGP
IGRP
EIGRP

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 3 Algonquin College3

NET1005

OSPF background

ƒ Developed by IETF to replace RIP


ƒ Better metric
ƒ Fast convergence
ƒ Scales to large networks by using areas

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 4 Algonquin College4

NET1005 - L. Crane 2
OSPF

NET1005

Link State Info of Other Routers


RouterB:
RouterA’s Topological ƒ Connected to RouterA on network 11.0.0.0/16, cost of 15
Data Base (Link State ƒ Connected to RouterE on network 15.0.0.0/16, cost of 2
Database) ƒ Has a “leaf” network 14.0.0.0/16, cost of 2
RouterC:
ƒ Connected to RouterA on network 12.0.0.0/16, cost of 2
ƒ Connected to RouterD on network 16.0.0.0/16, cost of 2
All other routers flood ƒ Has a “leaf” network 17.0.0.0/16, cost of 2
their own link state RouterD:
ƒ Connected to RouterA on network 13.0.0.0/16, cost of 5
information to all other ƒ Connected to RouterC on network 16.0.0.0/16, cost of 2
routers. ƒ Connected to RouterE on network 18.0.0.0/16, cost of 2
ƒ Has a “leaf” network 19.0.0.0/16, cost of 2
RouterE:
RouterA stores this ƒ Connected to RouterB on network 15.0.0.0/16, cost of 2
information in its LSD ƒ Connected to RouterD on network 18.0.0.0/16, cost of 10
(Link State Database). ƒ Has a “leaf” network 20.0.0.0/16, cost of 2

The Dijkstra algorithm is


then run to create an
SPFT, which is used to
create the Forwarding
DB (Routing Table).

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 5 Algonquin College5

NET1005

Link State information from RouterB


We obtain the following link-state information from RouterB:
ƒ Connected to RouterA on network 11.0.0.0/16, cost of 15 14.0.0.0/16
ƒ Connected to RouterE on network 15.0.0.0/16, cost of 2 2
ƒ Has a “leaf” network 14.0.0.0/16, cost of 2
11.0.0.0/16 B 15.0.0.0/16
2
15

A E

Now, RouterA attaches the two graphs… 14.0.0.0/16


2
B
11.0.0.0/16 14.0.0.0/16 B
15
11.0.0.0/16 15.0.0.0/16
2 2
15
10.0.0.0/16
A
12.0.0.0/16
2
C
+ B 15.0.0.0/16 =
10.0.0.0/16
12.0.0.0/16
2
2 E
2 15 A C
5 2
5
13.0.0.0/16 D A E
13.0.0.0/16
D

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 6 Algonquin College6

NET1005 - L. Crane 3
OSPF

NET1005

Link State information from RouterC

12.0.0.0/16
We obtain the following link-state information from RouterC: 17.0.0.0/16
2
ƒ Connected to RouterA on network 12.0.0.0/16, cost of 2 A C
2
ƒ Connected to RouterD on network 16.0.0.0/16, cost of 2
ƒ Has a “leaf” network 17.0.0.0/16, cost of 2 16.0.0.0/16 2
D

14.0.0.0/16
2 Now, RouterA attaches the two graphs…
11.0.0.0/16 B
15.0.0.0/16
15
2 17.0.0.0/16 14.0.0.0/16
2
A C
12.0.0.0/16 2 2
10.0.0.0/16
2
A
2
C E + 16.0.0.0/16 2
11.0.0.0/16 B
15.0.0.0/16
5 D 2
15
13.0.0.0/16 D 10.0.0.0/16 12.0.0.0/16 17.0.0.0/16
= 2
A
2
C E

5 2 16.0.0.0/16

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved.
13.0.0.0/16
Page 7 D
Algonquin College7

NET1005

Link State information from RouterD

We obtain the following link-state information from RouterD: A C E


ƒ Connected to RouterA on network 13.0.0.0/16, cost of 5 16.0.0.0/16
5 10
ƒ Connected to RouterC on network 16.0.0.0/16, cost of 2 2
ƒ Connected to RouterE on network 18.0.0.0/16, cost of 10 13.0.0.0/16 18.0.0.0/16
D
ƒ Has a “leaf” network 19.0.0.0/16, cost of 2
2 19.0.0.0/16

14.0.0.0/16 Now, RouterA attaches the two graphs…


2 A C E 14.0.0.0/16
2
B
11.0.0.0/16 15.0.0.0/16 5 2 10
2 11.0.0.0/16 B 15.0.0.0/16
15 18.0.0.0/16
D 2
12.0.0.0/16 17.0.0.0/16 15
10.0.0.0/16

2
A
2
C E + 2 19.0.0.0/16
10.0.0.0/16 A
12.0.0.0/16 17.0.0.0/16
2 E
C

13.0.0.0/16
5
16.0.0.0/16
2 = 2
5 16.0.0.0/16
2 10
D
13.0.0.0/16 D 18.0.0.0/16
2
19.0.0.0/16
CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 8 Algonquin College8

NET1005 - L. Crane 4
OSPF

NET1005

Link State information from RouterE


B
15.0.0.0/16
2
We obtain the following link-state information from RouterE:
ƒ Connected to RouterB on network 15.0.0.0/16, cost of 2 20.0.0.0/16
ƒ Connected to RouterD on network 18.0.0.0/16, cost of 10 E
2
ƒ Has a “leaf” network 20.0.0.0/16, cost of 2
2 10
18.0.0.0/16
D
14.0.0.0/16
2

B B 14.0.0.0/16
11.0.0.0/16 15.0.0.0/16
2 2
2
15
B
12.0.0.0/16 11.0.0.0/16 15.0.0.0/16
10.0.0.0/16
17.0.0.0/16 E 20.0.0.0/16
2
2
A
2
C E
+ 2
15

12.0.0.0/16
20.0.0.0/16
5 16.0.0.0/16
2 10
2 10 10.0.0.0/16 A 2 17.0.0.0/16 E
C
13.0.0.0/16 18.0.0.0/16 D 2 2
D
5 16.0.0.0/16
2 10
2 19.0.0.0/16
13.0.0.0/16 18.0.0.0/16
D

2 19.0.0.0/16
CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 9 Algonquin College9

NET1005

Final Topology
ƒ Using the topological information we listed, RouterA has now built a complete
topology of the network.
ƒ The next step is for the link-state algorithm to find the best path to each node
and leaf network.

14.0.0.0/16
2

B
11.0.0.0/16 15.0.0.0/16
2
15

12.0.0.0/16
10.0.0.0/16 2 17.0.0.0/16 20.0.0.0/16
A C E
2 2 2
16.0.0.0/16
5 2 10
18.0.0.0/16
13.0.0.0/16
D

2 19.0.0.0/16
CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 10 Algonquin College10

NET1005 - L. Crane 5
OSPF

NET1005

Link State Info of Other Routers


RouterB:
RouterA’s Topological ƒ Connected to RouterA on network 11.0.0.0/16, cost of 15
Data Base (Link State ƒ Connected to RouterE on network 15.0.0.0/16, cost of 2
Database) ƒ Has a “leaf” network 14.0.0.0/16, cost of 2
RouterC:
ƒ Connected to RouterA on network 12.0.0.0/16, cost of 2
ƒ Connected to RouterD on network 16.0.0.0/16, cost of 2
All other routers flood ƒ Has a “leaf” network 17.0.0.0/16, cost of 2
their own link state RouterD:
ƒ Connected to RouterA on network 13.0.0.0/16, cost of 5
information to all other ƒ Connected to RouterC on network 16.0.0.0/16, cost of 2
routers. ƒ Connected to RouterE on network 18.0.0.0/16, cost of 2
ƒ Has a “leaf” network 19.0.0.0/16, cost of 2
RouterE:
RouterA stores this ƒ Connected to RouterB on network 15.0.0.0/16, cost of 2
information in its LSD ƒ Connected to RouterD on network 18.0.0.0/16, cost of 10
(Link State Database). ƒ Has a “leaf” network 20.0.0.0/16, cost of 2

The Dijkstra algorithm is


then run to create an
SPFT, which is used to
create the Forwarding
DB (Routing Table).

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 11 Algonquin College11

NET1005

Choosing the Best Path


• Now RouterA uses the SPF algorithm to find the best path to each network,
creating an SPFT (Shortest Path First Tree).

14.0.0.0/16
2

B
11.0.0.0/16 15.0.0.0/16
2
15
12.0.0.0/16
17.0.0.0/16 20.0.0.0/16
10.0.0.0/16 2 E
A C 2 2
16.0.0.0/16
5 2 10
13.0.0.0/16 18.0.0.0/16
D
2 19.0.0.0/16
CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 12 Algonquin College12

NET1005 - L. Crane 6
OSPF

NET1005

SPFT Results Build a Routing Table


RouterA’s Routing Table
10.0.0.0/16 connected e0
14.0.0.0/16
11.0.0.0/16 connected s0 2
12.0.0.0/16 connected s1
13.0.0.0/16 connected s2 B
11.0.0.0/16 15.0.0.0/16
2
14.0.0.0/16 17 s0
15
15.0.0.0/16 16 s1
16.0.0.0/16 4 s1 12.0.0.0/16
s0
17.0.0.0/16 4 s1 17.0.0.0/16 20.0.0.0/16
10.0.0.0/16 s1 2 E
18.0.0.0/16 14 s1
e0
A C 2 2
19.0.0.0/16 6 s1 s2
16.0.0.0/16
20.0.0.0/16 16 s1 5 2 10
13.0.0.0/16 18.0.0.0/16
D
2 19.0.0.0/16

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Algonquin College13

NET1005

OSPF packets
ƒ 0x01 Hello establishes and maintains adjacency
ƒ 0x02 Database Description (DBD) summary of database
for other routers to check
ƒ 0x03 Link State Request (LSR) use to request more
detailed information
ƒ 0x04 Link State Update (LSU) reply to LSR and send new
information
ƒ 0x05 Link State Acknowledgement (LSAck)

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 14 Algonquin College14

NET1005 - L. Crane 7
OSPF

NET1005

OSPF encapsulation

Data link IP packet OSPF packet Data


frame header header header

MAC destination address


Multicast 01-00-5E-00-00-05
or 01-00-5E-00-00-06

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 15 Algonquin College15

NET1005

OSPF encapsulation

Data link IP packet OSPF packet Data


frame header header header

IP destination address
Multicast 224.0.0.5 or 224.0.0.6
Protocol field 89

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 16 Algonquin College16

NET1005 - L. Crane 8
OSPF

NET1005

OSPF encapsulation

Data link IP packet OSPF packet Data


frame header header header

Type code for packet type (0x01 etc)


Router ID and Area ID

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 17 Algonquin College17

NET1005

Hello, OSPF packet type 1

ƒ Discover OSPF neighbours and establish adjacencies.


ƒ Advertise parameters on which two routers must agree to
become neighbors.
ƒ Elect the Designated Router (DR) and Backup
Designated Router (BDR) on multiaccess networks like
Ethernet and Frame Relay.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 18 Algonquin College18

NET1005 - L. Crane 9
OSPF

NET1005

Fields in Hello packet


ƒ Type (=1), Router ID, Area ID
ƒ Subnet mask of sending interface
ƒ Hello Interval, Dead Interval
ƒ Router Priority: Used in DR/BDR election
ƒ 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)

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 19 Algonquin College19

NET1005

Sending Hellos
ƒ By default, OSPF Hello packets are sent every 10
seconds on multiaccess and point-to-point segments and
every 30 seconds on non-broadcast multiaccess (NBMA)
segments (Frame Relay, X.25, ATM).
ƒ In most cases, OSPF Hello packets are sent as multicast
to 224.0.0.5.
ƒ Router waits for Dead interval before declaring the
neighbor "down." Default is four times the Hello interval.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 20 Algonquin College20

NET1005 - L. Crane 10
OSPF

NET1005

Matching

ƒ Before two routers can form an OSPF neighbour


adjacency, they must agree on three values:
ƒ Hello interval,
ƒ Dead interval,
ƒ Network type (e.g. point to point, Ethernet, NBMA.)

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 21 Algonquin College21

NET1005

Election

ƒ On multi-access networks (Ethernet, NBMA) the routers


elect a designated router and a backup designated router
ƒ This saves on overhead
ƒ Each router becomes adjacent to the designated router
and swaps updates with it
ƒ If the designated router fails, the backup designated
router takes over

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 22 Algonquin College22

NET1005 - L. Crane 11
OSPF

NET1005

Finding best routes

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 23 Algonquin College23

NET1005

Administrative Distance

ƒ Preferred to IS-IS or RIP but not to EIGRP

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 24 Algonquin College24

NET1005 - L. Crane 12
OSPF

NET1005

Configuring OSPF

ƒ R1(config)#router ospf 1
ƒ R1(config-router)#
ƒ The process-id is between 1 and 65535
ƒ It does not have to match the process-id on neighbour
routers (unlike EIGRP)

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 25 Algonquin College25

NET1005

Configuring OSPF

ƒ Router(config-router)#network 192.168.1.0 0.0.0.255


area 0
ƒ Address as usual
ƒ Wildcard mask is required (optional for EIGRP), some
routers accept subnet mask
ƒ We always use a single area 0 for CCNA, this would be
the backbone if there are multiple areas.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 26 Algonquin College26

NET1005 - L. Crane 13
OSPF

NET1005

Choosing the Router ID

1. Use the IP address configured with the OSPF router-id


command.
2. If the router-id is not configured, use the highest IP
address of any of the loopback interfaces.
3. If no loopback interfaces are configured, use the highest
active IP address of any physical interface. The
interface must be up. It need not be in a network
command.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 27 Algonquin College27

NET1005

Show the router ID

ƒ #show ip protocols (on most routers).


ƒ #show ip ospf
ƒ #show ip ospf interface

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 28 Algonquin College28

NET1005 - L. Crane 14
OSPF

NET1005

Loopback address

ƒ Highest loopback address is used in preference to a real


interface address
ƒ A loopback address is a virtual interface and is
automatically up, so it cannot fail – this makes it more
stable.
ƒ Router(config)#interface loopback 0
ƒ Router(config-if)#ip address 10.0.0.1 255.255.255.255

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 29 Algonquin College29

NET1005

OSPF router-id command

ƒ Introduced in IOS 12.0(T) and is the first choice for


determining router ID.

ƒ Router(config)#router ospf 1
ƒ Router(config-router)#router-id 172.16.0.1

ƒ Many networks still use the loopback address method of


assigning router IDs.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 30 Algonquin College30

NET1005 - L. Crane 15
OSPF

NET1005

Changing router ID
ƒ The router ID is fixed when OSPF is configured and given
its first network command.
ƒ Any loopback addresses or router-id commands should
be given before configuring OSPF.
ƒ Router#clear ip ospf process can be used, set the ID,
then configure OSPF again.
ƒ The router may need to be reloaded

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 31 Algonquin College31

NET1005

Show ip ospf neighbor

Neighbor ID Pri state Dead Time Address Interface

10.3.3.3 1 FULL/ 00:00:30 192.168.10.6 Serial0/1

10.2.2.2 1 FULL/ 00:00:33 192.168.10.2 Serial0/0

Of
OSPF neighbour
priority On this
Fully
adjacent router

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 32 Algonquin College32

NET1005 - L. Crane 16
OSPF

NET1005

Other show commands

ƒ show ip protocols
ƒ show ip ospf
ƒ show ip ospf interface
ƒ Show ip route

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 33 Algonquin College33

NET1005

Summary?

ƒ OSPF does not summarise to class boundaries by


default.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 34 Algonquin College34

NET1005 - L. Crane 17
OSPF

NET1005

OSPF metric

ƒ The OSPF specification says that cost is the metric, does


not say how cost is found.
ƒ Cisco uses bandwidth
ƒ Cost = 108 = 100,000,000
bandwidth bandwidth
ƒ Then finds cumulative cost for all links on a path.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 35 Algonquin College35

NET1005

Standard costs
Interface type 108/bps = Cost
Fast Ethernet and faster 108/100,000,000bps = 1

Ethernet 108/10,000,000bps = 10
E1 108/2,048,000bps = 48
T1 108/1,544,000bps = 64
128 Kbps 108/128,000bps = 781
64 Kbps 108/64,000bps = 1562
56 Kbps 108/56,000bps = 1785

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 36 Algonquin College36

NET1005 - L. Crane 18
OSPF

NET1005

Faster than 100 Mbps

ƒ By default, the cost metric for all interfaces operating at


100Mbps or more is 1.
ƒ This uses the reference bandwidth of 100Mbps.
ƒ To distinguish between links of higher bandwidths, configure
all routers in the area e.g.
ƒ auto-cost reference-bandwidth 1000
ƒ This would multiply costs by 10 and allow for faster
bandwidths to have costs below 10.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 37 Algonquin College37

NET1005

Serial link bandwidths

ƒ Serial links often have a default bandwidth of T1 (1.544


Mbps), but it could be 128 kbps.
ƒ This may not be the actual bandwidth.
ƒ show interface will give the default value.
ƒ show ip ospf interface gives the calculated cost.
ƒ Give it the right bandwidth.
ƒ Router(config-if)#bandwidth 64

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 38 Algonquin College38

NET1005 - L. Crane 19
OSPF

NET1005

Configure the cost directly

ƒ Alternative to configuring the bandwidth:


ƒ Configure the cost directly.
ƒ R1(config)#interface serial 0/0
ƒ R1(config-if)#ip ospf cost 1562
ƒ Configure cost if there are non-Cisco routers in the area
that calculate costs in different ways.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 39 Algonquin College39

NET1005

Point to point network


ƒ Only two routers on network
ƒ They become fully adjacent with each other

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 40 Algonquin College40

NET1005 - L. Crane 20
OSPF

NET1005

Multiaccess networks

ƒ Networks where there could possibly be more than 2


routers, e.g. Ethernet, Frame Relay.
ƒ These have a method of cutting down on adjacencies and
the number of updates exchanged.
ƒ 5 routers:
10 adjacencies?

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 41 Algonquin College41

NET1005

Multiaccess network

ƒ Not efficient if they every router becomes fully adjacent to


every other router
ƒ Designated router (DR) becomes fully adjacent to all
other routers
ƒ Backup designated router (BDR) does too – in case
designated router fails

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 42 Algonquin College42

NET1005 - L. Crane 21
OSPF

NET1005

Multiaccess
ƒ All routers send LSUs to DR and BDR but not to other routers
ƒ Use multicast address 224.0.0.6

DROther DROther DROther


CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 43 Algonquin College43

NET1005

Multiaccess

ƒ DR then sends LSUs to all routers


ƒ Use multicast address 224.0.0.5

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 44 Algonquin College44

NET1005 - L. Crane 22
OSPF

NET1005

Router detects change


ƒ A router knows that a link is down if it does not receive a timed
Hello from a partner

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 45 Algonquin College45

NET1005

Send update
ƒ The router sends a LSU (link state update) on multicast
224.0.0.6 to DR/BDR

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 46 Algonquin College46

NET1005 - L. Crane 23
OSPF

NET1005

Update all routers


ƒ DR sends to 224.0.0.5, all OSPF routers
ƒ BDR does not send unless DR fails

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 47 Algonquin College47

NET1005

Recalculate routing table

ƒ Each router sends LSAck acknowledgement


ƒ Waits for hold time in case link comes straight back up
ƒ Runs SPF algorithm using new data
ƒ Updates routing table with new routes

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 48 Algonquin College48

NET1005 - L. Crane 24
OSPF

NET1005

OSPF network types

Network type Characteristics DR election?

Broadcast multiaccess Ethernet, token ring, Yes


FDDI

Nonbroadcast Frame relay, X.25, Yes


multiaccess ATM

Point to point PPP, HDLC No

Point to multipoint Configured by No


administrator

Virtual link Configured by No


administrator

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 49 Algonquin College49

NET1005

DR/BDR election

ƒ Happens when routers first discover each other using


Hellos.
ƒ Router with highest priority becomes DR, next highest
becomes BDR.
ƒ If they have the same priority then the highest router ID
becomes DR, next highest becomes BDR.
ƒ By default all routers have priority 1

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 50 Algonquin College50

NET1005 - L. Crane 25
OSPF

NET1005

Election where same priority

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 51 Algonquin College51

NET1005

Add a router

ƒ An election has taken place and a DR and BDR have


been chosen.
ƒ Now add another router with a higher priority. It will not
become DR if there is already a DR.
ƒ To make sure that a certain router becomes DR:
• Give it the highest priority
• Switch it on first

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 52 Algonquin College52

NET1005 - L. Crane 26
OSPF

NET1005

OSPF states

ƒ Down
ƒ Init (after receiving hello)
ƒ Two-way (election here)
ƒ ExStart (decide who initiates exchange)
ƒ Exchange (swap summary database)
ƒ Loading (link state requests and updates)
ƒ Full adjacency (know the same topology)

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 53 Algonquin College53

NET1005

Summary of OSPF Operational States


ƒ Down – no sign of anyone
ƒ Init – received an initial Hello packet
ƒ Two-Way – received a Hello packet with my own router ID (i.e. I'm recognized
by the sender as a neighbour)
ƒ ExStart – Exchange Startup mode where neighbours negotiate who's in
control of the conversation
ƒ Exchange – neighbours are actively exchanging link-state information
ƒ Loading – neighbours requesting more detailed Link State Advertisements
(LSAs) from each other
ƒ Full – neighbouring routers have the same LSD (Link State Database, or
Topological Database), and are fully adjacent

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Algonquin College54

NET1005 - L. Crane 27
OSPF

NET1005
After Neighbour Discovery
Discovering Routes and Reaching Full State
reached “2-Way” after
exchanging Type-1's
(Hello packets)

OSPF Type-2 (DBD)


OSPF Type-2 (DBD)

OSPF Type-2 (DBD)


OSPF Type-2 (DBD)

OSPF Type-5 (LSAck)

OSPF Type-3 (LSR)


OSPF Type-4 (LSU)
OSPF Type-5 (LSAck)

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Algonquin College55

NET1005

DROther routers

ƒ Routers that are not elected as DR or BDR are called


DROther.
ƒ They become fully adjacent with DR and BDR.
ƒ They stay in 2-way state with each other.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 56 Algonquin College56

NET1005 - L. Crane 28
OSPF

NET1005

Priority

ƒ Router(config-if)#ip ospf priority {0 - 255}


ƒ To force an election:
ƒ Shut down the interfaces
ƒ Bring them up again, chosen DR first, chosen BDR
second.
ƒ The DR should be a router with plenty of processing
power.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 57 Algonquin College57

NET1005

Propagate static route


ƒ R1(config-router)#default-information originate

ƒ In routing table
O*E2 0.0.0.0/0 [110/1] via 192.168.10.10, 00:05:34, Serial0/0/1
ƒ E2 means this is an OSPF External Type 2 route.
ƒ The cost will stay the same as it is propagated.
ƒ Type 1 would increase its cost at each router.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 58 Algonquin College58

NET1005 - L. Crane 29
OSPF

NET1005

Changing intervals

ƒ Router(config-if)#ip ospf hello-interval seconds


ƒ Router(config-if)#ip ospf dead-interval seconds
ƒ This needs to be done on both partners in an adjacency.
ƒ The adjacency is broken when one router is changed.

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 59 Algonquin College59

NET1005

Databases

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 60 Algonquin College60

NET1005 - L. Crane 30
OSPF

NET1005

Summary….

ƒ What is the importance of router-id in OSPF?


ƒ NOTE that the administrator SHOULD control router-id.
ƒ How is router-id set on a router?
• Why would administrator use one method over another?
ƒ How can you influence which routers are the DR or BDR?
ƒ When is DR and BDR elected…what effect does this
have?

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 61 Algonquin College61

NET1005

Comparing routing protocols

Link state Distance vector


ƒ Sends LSA updates – low ƒ Broadcasts whole routing
bandwidth use after initial tables – high bandwidth use
flooding ƒ Simple algorithms – little
ƒ Complex algorithm – powerful processing
processor ƒ One table – little memory
ƒ Three databases – large ƒ Can have loops
memory
ƒ No loops

CCNA v3.0 Update © 2003, Algonquin College. © 2002, Cisco Systems, Inc. All rights reserved. Page 62 Algonquin College62

NET1005 - L. Crane 31
OSPF

NET1005

The End

Algonquin College

NET1005 - L. Crane 32

Вам также может понравиться