25.6 enabling ospf

Post on 05-Apr-2018

230 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 1/54

 © 2002, Cisco Systems, Inc. All rights reserved.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 2/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-2

 © 2002, Cisco Systems, Inc. All rights reserved. 2

Enabling OSPF

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 3/54

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 4/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-4

OSPF terminology

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 5/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-5

OSPF terminology: Links

TokenRing

Links

An interface on Router

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 6/54

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 7/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-7

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 8/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-8

OSPF Areas—Example

Area 0

Area 1

Area 2

Area 3

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 9/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-9

OSPF terminology: Link Cost

The value assigned to a link. Rather thanhops, link-state protocols assign a cost toa link that is based on the speed of themedia.

Interface Output Cost.Neighbors

TokenRing

Interfaces

Cost = 10

Cost = 6Cost = 1785

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 10/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-10

OSPF terminology: Adjacencydatabase 

A listing of all the neighbors to which a router hasestablished bi-directional communication. Notevery pair of neighboring routers becomeadjacent

 Adjacency

database 

Neighbors

TokenRing

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 11/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-11

OSPF terminology: Link-statedatabase

Also known as a topological database

A list of link-state entries of all other routers in theinternetwork

Token

Ring

TopologicalDatabase 

 Adjacency

database 

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 12/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-12

OSPF terminology: Routing table

The routing table (also known as forwardingdatabase) generated when an algorithm is run onthe link-state database.

Each router’s routing table is unique 

 AdjacencyDatabase

Lists neighbors  

Token

Ring

TopologicalDatabase

Lists all routes  

RoutingTable

Lists best routes  

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 13/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-13

OSPF terminology: DR and BDRrouter

Designated router (DR) and backup designatedrouter (BDR):

• A router that is elected by all other routers onthe same LAN to represent all the routers.

• Each network has a DR and BDR

TokenRing

DR

BDR

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 14/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-14

Comparing OSPF with distance vectorrouting protocols

Distance vector OSPF• View network topology

from neighbors’perspective

• Adds distance vectors fromrouter to router

• Frequent, periodic update:Slow convergence

• Passes copies routingtables to neighbor routers

• Use flat topology

• Gets common view ofentire network topology

• Calculates the shortest

path to other routers

• Event-triggered update:Fast to convergence

• Passes link-state routing

updates to other routers

• Allow hierarchicaldesign for largeinternetworks

• Support for VLSM

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 15/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-15

Shortest path algorithm

1

4

1 4

2

22

 ABC

D

E F G

The best path is the lowest cost path.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 16/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-16

Shortest Path First Tree for node B

1

(1, B) 1 4

2

22

 A

B

C

D

E F G

(3, C)

(4, E)

2

(5, E) (6, A)

(4, B)

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 17/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-17

OSPF network types

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 18/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-18

OSPF network types: Fourth type

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 19/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-19

DR and BDR receive LSAs

•Hellos elect DR and BDR to present segment

•Each router then forms adjacency with DR and BDR 

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 20/54 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-20

OSPF Hello Protocol 

The rules that govern the exchange of OSPF hellopackets are called the Hello protocol.

Hello packets use : 224.0.0.5 (all routers).

Hello packets are sent at regular intervals (default):

• Multi access and Point-to-point: 10s• NBMA : 30s

On multi-access networks the Hello protocol elects adesignated router (DR) and a backup designated router

(BDR).The hello packet carries information that all neighborsmust agree upon before an adjacency is formed, andlink-state information is exchanged.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 21/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-21

OSPF packet header

• For the hello packet the type field is set to 1.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 22/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-22

OSPF Hello Protocol - Hello header

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 23/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-23

Steps in the operation of OSPF

5 steps of operation:

1. Establish router adjacencies.

2. Elect a DR and BDR (ifnecessary).

3. Discover routes.

4. Select the appropriate routes touse.

5. Maintain routing information.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 24/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-24

OSPF Topologies

Point-to-Point

BroadcastMultiaccess

NBMA X.25Frame Relay

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 25/54

 © 2002, Cisco Systems, Inc. All rights reserved. 25 © 2000, Cisco Systems, Inc. www.cisco.com 4-25

OSPF Operation in a

Broadcast MultiaccessTopology

Broadcast

Multiaccess

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 26/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-26

Step 1: Establish router adjacencies

First step in OSPF operation is to establish routeradjacencies

RTB sends hello packets, advertising its ownrouter ID highest IP address:10.6.0.1(no

loopback)

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 27/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-27

Step 1: Establish router adjacencies(cont.)

Router IDHello/dead intervals

NeighborsArea-ID

Router priorityDR IP address

BDR IP addressAuthentication password

Stub area flag

* *

**

* Entry must match on neighboring routers

Hello

afadjfjorqpoeru39547439070713

Hello

A

D E

CB

S

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 28/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-28

Step 2: Electing the DR and BDR (ifnecessary).

P=1 P=0P=1

P=3 P=2

DR BDR

Hello

• The router with the highest priority value is the DR.• The router with the second highest priority value isthe BDR.

• The default for the interface OSPF priority is 1. In

case of a tie, the router’s router ID is used. 

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 29/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-29

Step 3: Discover routes

On difference network have differ discover

process.• On multi-access network, the exchange of

routing information occurs between theDR or BDR and every other router on the

network.• Link partners on a point-to-point or point-

to-multipoint network also engage in theexchange process.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 30/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-30

Exchange Process

Router BNeighbors List

172.16.5.1/24, int E1

172.16.5.1/24E0

I am router ID 172.16.5.2, and I see 172.16.5.1.

Router ANeighbors List

172.16.5.2/24, int E0

172.16.5.2/24E1

I am router ID 172.16.5.1 and I see no one.

Down State

Init State

A B

Two-way State

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 31/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-31

Step 3: Discover routes (cont.)

DBD

afadjfjorqpoeru39547439070713

Here is a summary of my link-state database.

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

afadjfjorqpoeru39547439070713

E0

172.16.5.1

DR

E0

172.16.5.3

No, I will start exchange because I have ahigher router ID.

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

afadjfjorqpoeru39547439070713

Hello

afadjfjorqpoeru39547439070713

Exstart State 

Exchange State 

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 32/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-32

Step 3: Discover routes (cont.)

Full State

I need the complete entry for network 172.16.6.0/24.

Here is the entry for network 172.16.6.0/24.

Thanks for the information!

LSR

afadjfjorqpoeru39547439070713

LSAck

afadjfjorqpoeru39547439070713

LSU

afadjfjorqpoeru39547439070713

Loading State

E0

172.16.5.1

E0

172.16.5.3

LSAck

afadjfjorqpoeru39547439070713

Thanks for the information!LSAck

afadjfjorqpoeru39547439070713

DR

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 33/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-33

Step 4: Choosing Routes

Topology TableNet Cost Out Interface10.2.2.0 6 To010.3.3.0 7 To010.3.3.0 10 E0

This is the best route to 10.3.3.0.

TokenRing

Cost=10

Cost=6

FDDI

Cost=1

A B C

10.1.1.0/24 10.2.2.0/24 10.3.3.0/24

10.4.4.0/24

St 5 M i t i i R ti

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 34/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-34

Step 5: Maintaining RoutingInformation

Router A tells all OSPF DRs on 224.0.0.6

xxLSU1

Link-State ChangeDR

AB

St 5 M i t i i R ti

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 35/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-35

Step 5: Maintaining RoutingInformation

Router A tells all OSPF DRs on 224.0.0.6

DR tells all others on 224.0.0.5

LSU

2

xx

Link-State Change

LSU1

DR

AB

S M i i i R i

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 36/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-36

Step 5: Maintaining RoutingInformation

I need to updatemy routing table.

4

LSU

3

LSU

2

xx

Link-State Change

LSU1

DR

AB

Router A tells all OSPF DRs on 224.0.0.6

DR tells all others on 224.0.0.5

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 37/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-37

OSPF Operation in a Point-to-Point

Point-to-Point Neighborship

• Router dynamically detects its neighboringrouter using the Hello protocol

• No election: Adjacency is automatic as soonas the two routers can communicate

• OSPF packets are always sent as multicast224.0.0.5

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 38/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-38

OSPF Operation in an NBMA

NBMA Topology

• Single interface interconnects multiple sites

• NBMA topologies support multiple routers butwithout broadcasting capabilities

X.25

Frame Relay

ATM

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 39/54

 © 2002, Cisco Systems, Inc. All rights reserved. 39

SINGLE AREA OSPF

Configuration

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 40/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-40

<Output Omitted>

interface Ethernet0ip address 10.64.0.2 255.255.255.0!interface Serial0ip address 10.2.1.2 255.255.255.0<Output Omitted>

<Output Omitted>interface Ethernet0ip address 10.64.0.1 255.255.255.0!<Output Omitted>

router ospf 1

Basic OSPF Configuration

Can Assign Network or

Interface Address.

Broadcast Network Point-to-Point Network

E0

10.64.0.1

10.64.0.2

E0

S0

10.2.1.2 10. 2.1.1

S1A B C

network 10.0.0.0 0.255.255.255 area 0 vicardmark 

router ospf 50

network 10.2.1.2 0.0.0.0 area 0

network 10.64.0.2 0.0.0.0 area 0

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 41/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-41

Configuring OSPF loopback address

Router ID:• Number by which the router is known to OSPF

• Default: The highest IP address on an activeinterface at the moment of OSPF process startup

• Can be overridden by a loopback interface: HighestIP address of any active loopback interface

! Create the loopback 0 interface

Router(configf)#Interface loopback 0Router(configf-if)#ip address 192.168.31.33 255.255.255.255

! Remove loopback 0 interface

Router(configf)#no Interface loopback 0

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 42/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-42

Configuring OSPF router priority

Router(config-if)# ip ospf priority number

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 43/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-43

Configuring OSPF timers

! To configure the hello and dead intervals on an interface

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

• OSPF networks, the default• Hello interval is 10 seconds• Dead interval is 40 seconds.

• On nonbroadcast networks, the default

• Hello interval is 30 seconds• Dead interval is 120 seconds.• These timers must be configured to match those of 

any neighboring router.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 44/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-44

Common OSPF configuration issues

Failure to establish a neighbor relationship is caused by anyof 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.

In OSPF routing it is also important to ensure the following:

• All interfaces have the correct addresses and subnetmask.

• network area statements have the correct wildcard masks.

• network area statements put interfaces into the correctarea.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 45/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-45

Router#

show ip ospf interface

Verifying OSPF Operation

Displays area ID and adjacency information

Router#

show ip protocols

 Verifies that OSPF is configured

Router#

show ip route

Displays all the routes learned by the router

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 46/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-46

Displays OSPF timers and statistics

Displays information about DR, BDR and neighbors

Displays the link-state database

Verifying OSPF Operation (cont.)

Router#

show ip ospf neighbor detail

Router#

show ip ospf database

Router#

show ip ospf

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 47/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-47

 Allows you to clear the IP routing table

Router#

clear ip route *

Router#

debug ip ospf option  

Displays router interaction during the hello,exchange, and flooding processes

Verifying OSPF Operation (cont.)

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 48/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-48

show ip ospf interface

R2#sh ip ospf int e0

Ethernet0 is up, line protocol is up

Internet Address 192.168.0.12/24, Area 0

Process ID 1, Router ID 192.168.0.12, Network Type BROADCAST, Cost: 10Transmit Delay is 1 sec, State DROTHER, Priority 1

Designated Router (ID) 192.168.0.11, Interface address 192.168.0.11

Backup Designated router (ID) 192.168.0.13, Interface address

192.168.0.13

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

Hello due in 00:00:04

 Neighbor Count is 3, Adjacent neighbor count is 2 Adjacent with neighbor 192.168.0.13 (Backup Designated Router)

 Adjacent with neighbor 192.168.0.11 (Designated Router)

Suppress hello for 0 neighbor(s)

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 49/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-49

show ip ospf neighbor

 Neighbor ID Pri State Dead Time Address Interface

192.168.0.13 1 2WAY/DROTHER 00:00:31 192.168.0.13 Ethernet0

192.168.0.14 1 FULL/BDR 00:00:38 192.168.0.14 Ethernet0

192.168.0.11 1 2WAY/DROTHER 00:00:36 192.168.0.11 Ethernet0

192.168.0.12 1 FULL/DR 00:00:38 192.168.0.12 Ethernet0 

OSPF over Ethernet - Multiaccess Network

 Neighbor ID Pri State Dead Time Address Interface192.168.0.11 1 FULL/ - 00:00:39 10.1.1.2 Serial1 

OSPF over HDLC - Point-to-Point Network

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 50/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-50

R2#show ip ospf database 

OSPF Router with ID (192.168.0.12) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count

192.168.0.10 192.168.0.10 817 0x80000003 0xFF56 1

192.168.0.11 192.168.0.11 817 0x80000003 0xFD55 1

192.168.0.12 192.168.0.12 816 0x80000003 0xFB54 1

192.168.0.13 192.168.0.13 816 0x80000003 0xF953 1

192.168.0.14 192.168.0.14 817 0x80000003 0xD990 1

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

192.168.0.14 192.168.0.14 812 0x80000002 0x4AC8

show ip ospf database

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 51/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-51

OSPF debug commands

Router#debug ip ospf events

OSPF:hello with invalid timers on interface Ethernet0

hello interval received 10 configured 10

net mask received 255.255.255.0 configured 255.255.255.0

dead interval received 40 configured 30

Router# debug ip ospf packet

OSPF: rcv. v:2 t:1 l:48 rid:200.0.0.117

aid:0.0.0.0 chk:6AB2 aut:0 auk:

Router#debug ip ospf packet

OSPF: rcv. v:2 t:1 l:48 rid:200.0.0.116

aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x0

Displays router interaction during the hello,exchange, and flooding processes

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 52/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-52

Summary

• OSPF is an interior gateway protocol similar toIGRP, but based on link states rather thandistance vectors.

•OSPF advertises information about each of itslinks rather than sending routing table updateslike a distance vector protocol.

• The SPF algorithm places each router at the root

of a tree and calculates the shortest path to eachdestination based on the cumulative costrequired to reach that destination.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 53/54

 © 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—5-53

Summary (Cont.)

• Use the router ospf command to start an OSPFrouting process and the network command toassociate addresses to an OSPF area.

You can use any one of a number of showcommands to display information about anOSPF configuration.

• To display information on OSPF-related events,

such as adjacencies, flooding information,designated router selection, and SPFcalculation, use the debug ip ospf eventsprivileged EXEC command.

7/31/2019 25.6 Enabling OSPF

http://slidepdf.com/reader/full/256-enabling-ospf 54/54

top related