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

Module 5

Configuring OSPF in
a Single Area
2001, Cisco Systems, Inc.

5-1

Objectives
Upon completing this lesson, you will be
able to:
Explain why OSPF is better than RIP in a
large internetwork
Explain how OSPF discovers, chooses, and
maintains routes
Explain how OSPF operates in a single-area
NBMA environment
Configure OSPF for proper operation in a
single area
2001, Cisco Systems, Inc.

BSCI v1.2 5-2

Objectives (cont.)
Configure a single-area OSPF environment
and verify proper operation (within described
guidelines) of your routers, given an
addressing scheme and other laboratory
parameters
Configure single-area OSPF in an NBMA
environment and verify proper operation
(within described guidelines) of your routers,
given an addressing scheme and other
laboratory parameters
2001, Cisco Systems, Inc.

BSCI v1.2 5-3

OSPF Overview

2001, Cisco Systems, Inc.

5-4

What Is OSPF?

Has fast convergence


Supports VLSM
Processes updates efficiently
Selects paths based on bandwidth
Supports equal-cost multipath

2001, Cisco Systems, Inc.

BSCI v1.2 5-5

OSPF in IP Packets
89OSPF
6TCP
17UDP
Frame
Header

Frame Payload

IP
Header

Protocol
Number

Packet Payload

C
R
C

OSPF is a link-state routing protocol


Relies on IP packets for delivery of
routing information
Uses protocol number 89
2001, Cisco Systems, Inc.

BSCI v1.2 5-6

OSPF Terminology

2001, Cisco Systems, Inc.

5-7

OSPF Terminology (cont.)


Autonomous System

Neighbors

Area 1

Interfaces

Cost = 10
Token
Ring

Cost = 1785
Neighborship
Database
Lists Neighbors

2001, Cisco Systems, Inc.

Area 0

Cost = 6

Topology
Database
Lists All Routes

Routing
Table
Lists Best Routes

BSCI v1.2 5-8

OSPF Operation in a Broadcast


Multiaccess Topology

2001, Cisco Systems, Inc.

5-9

Neighborship
D

E
Hello

A
afadjfjorqpoeru
39547439070713

Hello

Router ID
Hello/dead intervals
Neighbors
Area-ID
Router priority
DR IP address
BDR IP address
Authentication password
Stub area flag

* Entry must match on neighboring routers


2001, Cisco Systems, Inc.

BSCI v1.2 5-10

Neighborship (cont.)
D

E
Hello

A
afadjfjorqpoeru
39547439070713

Hello

Router ID
Hello/dead intervals
Neighbors
Area-ID
Router priority
DR IP address
BDR IP address
Authentication password
Stub area flag

* Entry must match on neighboring routers


2001, Cisco Systems, Inc.

BSCI v1.2 5-11

DR and BDR
DR

BDR

Hellos elect DR and BDR to represent segment


Each router then forms adjacency with DR
and BDR
2001, Cisco Systems, Inc.

BSCI v1.2 5-12

Electing the DR and BDR


P=3

P=2

DR

BDR

Hello

P=1

P=1

P=0

Hello packets exchanged via IP multicast


Router with highest OSPF priority elected
2001, Cisco Systems, Inc.

BSCI v1.2 5-13

Exchange Process
A

172.16.5.1/24
E0

172.16.5.2/24
E1

Down State

2001, Cisco Systems, Inc.

BSCI v1.2 5-14

Exchange Process
A

172.16.5.1/24
E0

172.16.5.2/24
E1

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

2001, Cisco Systems, Inc.

BSCI v1.2 5-15

Exchange Process
A

172.16.5.1/24
E0

172.16.5.2/24
E1

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.

2001, Cisco Systems, Inc.

BSCI v1.2 5-16

Exchange Process
A

172.16.5.1/24
E0

172.16.5.2/24
E1

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

2001, Cisco Systems, Inc.

BSCI v1.2 5-17

Discovering Routes
DR

E0
172.16.5.1
afadjfjorqpoeru
39547439070713

Hello

E0
172.16.5.3
Exstart State

I will start exchange because I have router ID 172.16.5.1.

No, I will start exchange because I have a


higher router ID.

2001, Cisco Systems, Inc.

afadjfjorqpoeru
39547439070713

Hello

BSCI v1.2 5-18

Discovering Routes
DR

E0
172.16.5.1
afadjfjorqpoeru
39547439070713

Hello

E0
172.16.5.3
Exstart State

I will start exchange because I have router ID 172.16.5.1.

No, I will start exchange because I have a


higher router ID.
Exchange State

Here is a summary of my link-state database.

afadjfjorqpoeru
39547439070713

Hello
afadjfjorqpoeru
39547439070713

DBD

afadjfjorqpoeru
39547439070713

DBD
2001, Cisco Systems, Inc.

Here is a summary of my link-state database.


BSCI v1.2 5-19

Discovering Routes (cont.)


DR

E0
172.16.5.1

E0
172.16.5.3

afadjfjorqpoeru
39547439070713

LSAck

2001, Cisco Systems, Inc.

afadjfjorqpoeru
39547439070713

Thanks for the information!

LSAck

BSCI v1.2 5-20

Discovering Routes (cont.)


DR

E0
172.16.5.1

E0
172.16.5.3

afadjfjorqpoeru
39547439070713

afadjfjorqpoeru
39547439070713

LSAck

Thanks for the information!

LSAck

Loading State

afadjfjorqpoeru
39547439070713

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!


2001, Cisco Systems, Inc.

BSCI v1.2 5-21

Discovering Routes (cont.)


DR

E0
172.16.5.1

E0
172.16.5.3

afadjfjorqpoeru
39547439070713

afadjfjorqpoeru
39547439070713

LSAck

Thanks for the information!

LSAck

Loading State

afadjfjorqpoeru
39547439070713

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
2001, Cisco Systems, Inc.

BSCI v1.2 5-22

Choosing Routes
10.1.1.0/24
A

Token
Ring

10.2.2.0/24
B

Cost=6

FDDI

Cost=1

10.3.3.0/24
C

Cost=10

Cost=10
10.4.4.0/24
Topology Table
Net
Cost Out Interface
10.2.2.0
7
To0
This is the best route to 10.3.3.0.
10.3.3.0 17
To0
10.3.3.0 20
E0
2001, Cisco Systems, Inc.

BSCI v1.2 5-23

Maintaining Routing Information


Link-State Change

DR

1 LSU
A

Router A notifies all OSPF DRs on 224.0.0.6

2001, Cisco Systems, Inc.

BSCI v1.2 5-24

Maintaining Routing
Information (cont.)
2

Link-State Change
LSU

DR

1 LSU
A

Router A notifies all OSPF DRs on 224.0.0.6


DR notifies others on 224.0.0.5
2001, Cisco Systems, Inc.

BSCI v1.2 5-25

Maintaining Routing
Information (cont.)
2

Link-State Change
LSU

DR

1 LSU
A

3
LSU

Router A notifies all OSPF DRs on 224.0.0.6


DR notifies others on 224.0.0.5
2001, Cisco Systems, Inc.

BSCI v1.2 5-26

Maintaining Routing
Information (cont.)
2

Link-State Change
LSU

DR

4 I need to update
my routing table.

1 LSU
A

3
LSU

Router A notifies all OSPF DRs on 224.0.0.6


DR notifies others on 224.0.0.5
2001, Cisco Systems, Inc.

BSCI v1.2 5-27

Configuring OSPF in
a Single Area
2001, Cisco Systems, Inc.

5-28

Configuring OSPF on
Internal Routers
Broadcast Network

Point-to-Point Network
S0

E0

10.64.0.2
E0
10.64.0.1

10.2.1.2

10. 2.1.1
S1

<OutputOmitted>

<OutputOmitted>

interfaceEthernet0
ipaddress10.64.0.1255.255.255.0
!
<OutputOmitted>

interfaceEthernet0
ipaddress10.64.0.2255.255.255.0
!
interfaceSerial0
ipaddress10.2.1.2255.255.255.0
<OutputOmitted>
routerospf50
network10.2.1.20.0.0.0area0
network10.64.0.20.0.0.0area0

routerospf1

network10.0.0.00.255.255.255area0

Can assign network or


interface address.
2001, Cisco Systems, Inc.

BSCI v1.2 5-29

Configuring Optional Commands


Unadvertised Loopback Address
Ex: 192.168.255.254
Not in OSPF table
Saves address space
Cannot use ping

Advertised Loopback Address


Ex: 172.16.17.5
In OSPF table
Uses address space
Can use ping

Network
172.16.0.0

Router ID:

Number by which the router is known to OSPF


Default: The highest IP address on an active interface at the
moment of OSPF process startup
Can be overridden by a loopback interface: Highest IP address of
any active loopback interface

2001, Cisco Systems, Inc.

BSCI v1.2 5-30

Configuring Optional
Commands (cont.)
Traffic
Cisco
Router(config-if)#

Token
Ring

Non-Cisco

ip ospf cost cost

Assigns a cost to an outgoing interface


May be required for interoperability
Uses default cost between Cisco devices

2001, Cisco Systems, Inc.

BSCI v1.2 5-31

Verifying OSPF
Operation
2001, Cisco Systems, Inc.

5-32

Verifying OSPF Operation


Router#

show ip protocols

Verifies that OSPF is configured


Router#

show ip route

Displays all the routes learned by the router


Router#

show ip ospf interface

Displays area-ID and adjacency information


2001, Cisco Systems, Inc.

BSCI v1.2 5-33

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