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

Only For Educational Purpose, Not For Commercial

OSPF Routing Protocol Tutorial

Kyaw Swa Lin


1

Table of Contents

1. INTRODUCTION
1.1 Routing Protocol, Routed Protocol and Routable Protocol
1.2 Routing protocol
1.3 Routed protocol and Rouable protocol
1.4 Interior gateway routing protocol (IGP) and Exterior gateway routing protocol (EGP)
1.5 Autonomous System (AS)
1.6 OSPF Operation
2. OSPF Neighbor Relationship
2.1 Router-ID (RID)
2.2 OSPF Aadjacency
2.3 OSPF 2-way State
2.4 Choosing a Designated Router
2.5 OSPF Network Types
2.6 DR, BDR Election
2.7 OSPF Database Exchange Process
2.8 OSPF Link-state Packets (LSP)
2.9 Meeting Neighbors
3. OSPF Tables
3.1 Neighbor Table
3.2 Topology Table (LSDB)
3.2.1 OSPF Cost
3.3 Routing Table
4. Link-State Advertisements (LSAs)
4.1 Router LSA (Type 1 LSA)
4.2 Network LSA (Type 2 LSA)
4.3 Summary LSAs for ABRs (Type 3 LSA)
4.4 Summary LSA for ASBRs (Type 4 LSA)
4.5 Autonomous System External LSAs (Type 5 LSA)
4.5.1 Two External Metrics Types
4.6 Group Membership LSA (Type 6 LSA)
4.7 NSSA external LSA (Type 7 LSA)
4.8 BGP LSA or Link LSA (Type 8)
4.9 Opaque LSAs (Type 9, 10, 11 LSAs)
5. OSPF Areas
6. OSPF Routers and Routes
7. OSPF Area Types
7.1 Backbone Area (Area 0)
7.2 Standard Area
7.3 Stub Area
7.4 Totally Stubby Area
7.5 Not-So-Stubby-Area (NSSA)
8. Administrative Distance
9. OSPFv2 Authentication
10. OSPF Load Balancing
11. OSPF Default Routes
12. OSPF Configuration in Single Area
12.1 OSPF Process ID
12.2 OSPF Network Command
12.3 Wildcard Mask
13. OSPF Configuration in Multi-Area
14. Troubleshooting OSPFv2 routing protocol
14.1 Interface Troubleshooting
14.2 Area Troubleshooting
14.3 Neighbor Troubleshooting
2

14.4 Other issuees


15. OSPF Multiple Area Types Configuration
15.1 Configuration
15.2 Verification
16. OSPFv3 (OSPF Version 3)
16.1 OSPFv2 and OSPFv3
16.2 OSPFv2 and OSPFv3 Configuration
16.3 OSPFv2 network subcommand
16.4 OSPFv3 Router-id
16.5 Configuring Single-Area OSPFv3
16.6 Sample OSPFv3 Configuration Steps
16.7 OSPFv3 Configuration Checking
16.8 OSPFv3 Passive Interfaces
17. References

Typical OSPF Network Topologys


3

OSPF ROUTING PROTOCOL TUTORIAL

1. INTRODUCTION

Open Shortest Path First (OSPF) Interior Gatewa


routi OSPF open source (non-proprietary) public routing protocol
OSPF protocol Interior G
Autonomous
OSPF OSPF, EIGRP, IS-IS,
route
E BGP protocol

1.1 Routing Protocol, Routed Protocol and Routable Protocol

Router

Connected route
Static route
Dynamic route

r routing protocol, routed protocol routable protocol

1.2 Routing protocol

R algorithm
exchange
Router

routing protocol RIP, EIGRP, OSPF, BGP

1.3 Routed protocol and Rouable protocol


Router
4

r
routing protocol (RIP, EIGRP, OSPF forwarding (routing)

()

1.4 Interior gateway routing protocol (IGP) and Exterior gateway routing protocol (EGP)

Interior gateway routing protocol (IGP) Exterior gateway routing protocol (EGP)

IGP
OSPF, EIGRP, RIP

EGP Border Gateway Protocol (BGP)


inter

enterprise company () ( )

Figure 1.1 Multiple Autonomous Systems connected by BGP protocol

1.5 Autonomous System (AS)

Autonomous System (AS) School, University, Companies, Government Ministries, Internet


Service Provider (ISP)
ASN AS N AS N Public IP Address
Internet Assigned Numbers Authority (IANA)
IANA (http://www.iana.org)
5

Regional Internet Registries (RIRs)


American Registry for Internet Number (ARIN)
IP
distribution and registration Asia Pacific Network Information Centre
(APNIC)

Figure 1.2 Regional Internet Registries (RIRs)

1.6 OSPF Operation

OSPF protocol link s OSPF net


topology change
link link change detect device
(Router or multilayer switch create
Area multicast addresses (224.0.0.5 for IPv4 or FF02::5 for
IPv6) OSPF Router Router LSA
LSDB update Router LSA
Area
LSA
LSDB (Link-State Databa
link-state topology tabl LSDB (Topology T
OSPF LSDB
6

Figure 1.3 Flooding Link state Advertisement (LSA)

Router OSPF Router OSPF


LSDB Router

2. OSPF Neighbor Relationship

2.1 Router-ID (RID)

OSPF Router neighbor relati

OSPF Router OSPF Router hip


router-id router-id Router
OSPF
Router neighbor establi Hello
Hello router-id OSPF Router router-id

Router loopback IP Address


OSPF Router router-id

(Step 1) OSPF Router router-id

(Step 2) IP Address
IP Address router-id
IP Address Router router-id
7

(Step 3) Router Router


Router physical inte
interface (shutdow router-id

(Step 4) IP Address
router-id

OSPF Router router-id


physical interfa
h loopback

R1 Router router-id

+ Loopback 0: 10.0.0.1

+ Loopback 1: 12.0.0.1

+ Fa0/0: 192.168.1.1

+ Fa0/1: 200.200.200.1

IP Address
OSPF router-id
IP Address router-id

Figure 1.4 Choosing router-id

R2 Router loopb

+ Fa0/0: 210.0.0.1 but it is shut down


8

+ Fa0/1: 192.168.1.2 (is active)

router-id Fa0/0 interface IP Address


router-id IP Address router-id

Figure 1.5 Choosing router-id

OSPF router OSPF manually assi

router-id command

Router (config-router) #router-id 10.1.1.1


9

2.3 OSPF 2-way State

Figure 1.6 2-way state or early neighbor states

Down dead Hello

Attempt Router neighbor command

Init
- 2-way state or
bidirecti

2-way -
-

neighbor
-
10

-
- n

DR,
BDR -

Full St
ExStart > Exchange > Loading > Full State

Table 1.0 Difference between 2-way and Full States

2.4 Choosing a Designated Router

OSPF Router Link-State Database (LSDB)


OSPF Network type (OSPF
OSPF data-

Router (config-if) #ip ospf network type


command Router configure

2.5 OSPF Network Types


OSPF Network Type ( )
11

Point-to-point
Point-to-multipoint
Broadcast
Non-Broadcast(NBMA)

Point-to-Point networks - - - -
Router Router
Router - -
DR, BDR

Figure 1.7 Point-To-Point Network

Broadcast networks Token Ring, FDDI network


Broadcast Broadcast dev packet
OSPF Hello multicast addr
DR, DR, BDR Router DRO
multicast addre LSA
Router mult

Figure 1.8 BroadcastNetwork

NBMA networks (non-Broadcast) X


Broadcast
Router unicast , broadcast Router OSPF
DR, BDR network
OSPF
unica Hub and S
12

DR, BDR Router Router Hub


Router

Figure 1.9 NBMA Network (Non-Broadcast)

Point-to-Multipoint Network Router


stat DR, BDR

Figure 2.0 Point-To-Multipoint Network

2.6 DR, BDR Election

Point-to-point point-to-multipoint DR, BDR neighbo Router


topology information (LSDB

Broadcast NBMA topology information DR, BDR


neighboring Router Hello ld () (criteria)
Router
13

OSPF Router

Router router-id Router

Router
Router
Router

Router DR, DR,

DR, BDR

DR, BDR DR Router Router


Router DR Router
DR Router

Figure 2.1 DR, BDR Election

Figure 2.2 Database exchange to and from the DR on and Ethernet network

2.7 OSPF Database Exchange Process

- DR, Broadcast
( ) ExStart, Exchange,
Full state

ExStart Router DD master/ s router-id


Router DD
14

Exchange Router DD

Loading Router link-state information (missing or outdated LSA)


(link-state request LSR packet)
Router Link-State Update (LSU) p Router
-
Request<->Update<->Ack OSPF

Full OSPF Router -state information


fully adjacent Router

Figure 2.3 OSPF Database Exchange Process

2.2 OSPF Aadjacency


-
-

2-
- - -To-Multipoi
Broadcast
15

-
Hello pac

Figure 2.4 DR and BDR Election and Operation

Full state or fully adjacent (adja

Figure 1.1 Showing OSPF Neighbor Table


16

2-way sta

2.8 OSPF Link-state Packets (LSP)

OSPF -

Hello Packet

Database Description (DBD or DD)

Link-State Request (LSR)

Link-State Update (LSU)

Link-State Acknowledgement (LSAck)

Hello Packet OSPF Router ighbor) establish and maintain


OSPF Hello Multiaccess
network (Ethe network

Figure 2.5 OSPF Hello packet

Database Description (DBD or DD) LSDB (Link-State Database or Topology Table)


database packet (contents of LSDB or OSPF Router
- state -
Router Router LSDB
LSDB

Link-State Request (LSR) Router Hello

link state infromation Router


link-state reques

Link-State Update (LSU) Router -


Router
17

Link-State Acknowledgement (LSAck) Router (LSR Router route information

2.9 Meeting Neighbors

OSPF link-stat
OSPF Router router-id Hello
OSPF Router
- Broadcast
- Full State (fully adjacent state) -
database exc
Router
full adjacency relationship or Full state

Router router-id Router


Router Router router-id OSPF on


Hello
OSPF Router Hello R

Figure 2.6 Sending Hello packet from R1

Hello R Hello mess

OSPF Router
OSPF Router OSPF Router
Hello Router Router
Hello

Router Hello Hello pa Router


Router Router
18

requirement parameter

1. Subnet mask used on the subnet


2. Subnet number
3. Hello interval
4. Dead interval
5. OSPF Area ID
6. Must pass authentication checks (if used)
7. Value of the stub Area flag
neighbor adjacency 2way state
parameter ( )

1. Subnet mask used on the subnet OSPF Router

2. Subnet number OSPF Router

3. Hello interval OSPF Router Hello packet


OSPF Router Hello pac -
non-Broadcast -

4. Dead interval ou
(Hello mess )

Down reconvergence
(neighbor table, topology table-LSDB

5. OSPF Area ID
5. OSPF Areas

6. Must pass authentication checks


configure
9. OSPFv2
Authentication

7. Value of the stub Area flag

error
19

7. OSPF Area Types

(*

Figure 2.7 Sending Hello packet from R2

Router

2-
OSPF DR, Broadcast
- -
dr, DD
exstart, exchange, loading,

database exchange OSPF Router

DD Router Maste Router

router-id Router router-id Router master, sl


OSPF

master Router

router-id master
R1
20

Figure 2.8 Sending Database Description from R2

Figure 2.9 Sending Database Description from R1

router-id
DD R2

Figure 3.0 Sending Request from R2


21

LSDB link
informatio link state request (LSR packet) li

OSPF

1. Hello

2. Database description (DBD or DD)

3. Link state request (LSR)

4. Link state update (LSU)

5. Link-State Acknowledgement (LSAck)

Hello OSPF Router neighbor relation


Hello router-id

DD Router tabase (link state or route


information) DD link state data LSDB
Router

LSDB Router
LSA Router
LSDB

R2 Router
LSDB

Figure 3.1 Sending Update from R1

R link state
reque
22

Figure 3.2 Sending Acknowledgement from R2

OSPF Router
ackn

R R

reliable transmission - OSPF protocol EIGRP


protoc

OSPF TCP Exterior Gateway


P

3. OSPF Tables

OSPF Router

Neighbor Table
Topology Table
Routing Table

3.1 Neighbor Table


Neighbor Router

Router#show ip ospf neighbor


23

command

Figure 1.1 OSPF Neighbor Table

3.2 Topology Table (LSDB)

OSPF Router

link state database (LSDB)

OSPF
Router Area
OSPF
OSPF Router
netwo

Router#show ip ospf database

Figure 1.1 OSPF Topology Table

topolog

3.2.1 OSPF Cost


destinat

p
24

EIGRP

OSPF Router OSPF Router Router

(best route)

Router Router R7
Router R5 R6
-
OSP

Figure 3.3 Choosing the best route

R1 OSPF subnet 172.16.3.0/24 (R8)


25

Route R1 R7 R8 : cost 10 + 180 + 10 = 200

Route R1 R5 R6 R8 : cost 20 + 30 + 40 + 10 = 100

Route R1 R2 R3 R4 R8 : cost 30+ 60+ 20+ 5 + 10 = 125

R1 R5 R6 R8

R1 Ro R5 IP Address next hop IP Address


R1 R5 R6 R8

OSPF

OSPF cost metric c

cost 10

cost=reference bandwidth/interface bandwidth

reference bandwidth Router outgoing interface bandwidth

100 (100Mbps) or 10^8 Router ther


FastE b

100/100=1

FastEth

100/10=10

E cost

C
Gigabit Ethernet
interface ba
26

Router(config-router)#auto-cost reference-bandwidth 1000

reference bandwi Fast Ethernet interfac


Gigabit E
(

in
co

Router(config-if)#bandwidth 1000000

co

cos

Router(config-if)#ip ospf cost 100

neighbor com
point to multi

Router(config-router)#neighbor 10.1.1.1 cost 200


27

Router#show ip ospf interface fastEthernet 0/0

Router#show ip ospf interface brief

Table 1.1 OSPF default cost of multiple interface types

Dijkstra Algorithm (SPF) Intermediate


System to Intermediate System (IS-IS)
Level 1
(I -
28

3.3 Routing Table


Dijkstra algorithm

OSPF Router

Router#show ip route

Figure 3.4 OSPF Routing Table showing multiple routes

Figure 3.5 OSPF Routing Table showing only OSPF routes


29

4. Link-State Advertisements (LSAs)

OSPF Router Link-State Datab


LSA (Link-State Advert OSPF
Router Router

(Type 1 LSA) Router LSA


(Type 2 LSA) Network LSA
(Type 3 LSA) Summary LSAs For ABRs
(Type 4 LSA) Summary LSA For ASBRs
(Type 5 LSA) Autonomous System External LSAs
(Type 6 LSA) Group Membership LSA
(Type 7 LSA) NSSA external LSA
(Type 8 LSA) BGP LSA
(Type 9, 10, 11 LSAs) Opaque LSAs
30

Figure 3.6 An Example Enterprise Network with Seven IPv4 Subnets

4.1 Router LSA (Type 1 LSA)

Figure 3.7 Type 1 LSAs in a single Area

R1, R2, R3, R4 Router OSPF Area Router


Router Area OSPF devices

Area ABR Router


Area Router
Router router-id active IP Address

Router

Router#show ip ospf database


command Router ink-State Database Link-State Database
(LSDB) Router Link States (Area
Area Router
router-id R1 Router Area
Router router-id ADV Router router-id
Router
31

Router router-id router-id


R2 (2.2.2.2) Router

Figure 3.8 Type 1 and Type 2 LSAs in a single Area

4.2 Network LSA (Type 2 LSA)


Designated Router (FULL STATE) Router
database description (DD)
Area Broadcast -Broadcast

- - - - Area -
- - - - Non-
Broadcast BDR network
(Broadcast, Non-Broadcast

R1 Router

R1#show ip ospf neighbor


command - Broadcast
- -
- - DR, BDR electio
32

Net Link States (Area Router Area

router-id IP Address

ADV Router Link ID IP Address) Router router-id

Area
33

4.3 Summary LSAs For ABRs (Type 3 LSA)

Figure 3.9 A Multi-Area Network with Seven Subnets

Figure 4.0 ABR (R1) advertise Type 3 LSAs to Area 4 LSDB

Area Router R1 Area 4 Area


Router
Area R4 Router Area
R1 Router ABR Area 0, Area Area
) Area Router R1-R4 segment (non-BroadcastNBMA network)
Area Area
ABR Router Type 3 LSA Area
34

Area

Area 4 sub

Area 0

Area Router Area


Area Area Area ABR R1 Router Area
Area topology Area Router

OSPF

topology Area
summary

R1 Router Area (Area 23 & Area 4) subne Area


Type 3 LSA R1 Router Area
Area (Area 23 & Area 4) Type 3 LSA

R4 Router Summary Net Link States (Area Area

Area ADV Router


Router router-id
35

ABR Router R1 Router Area Area


0, Area 23, Area Area
Area Area Area

ABR Router R2 Router Area Area


Area Area Area
Area flooding

Figure 4.1 Type 3 LSAs Flooding


36

4.4 Summary LSA For ASBRs (Type 4 LSA)


ASBR Router ASBR
fo ASBR OSPF
Router OSPF Router
ASBR ASBR
Router
ASBR Router ASBR Router
ASBR Router Router ASBR
Router Router

Figure 4.2 Type 4 LSAs Flooding

R8 Router OSPF Autonomous System (OSPF Router R8


Router Router Router OSPF
ASBR Router
OSPF Router R3 Router OSPF
OSPF Router EIGRP

Router OSPF

R3 (config-router) #redistribute eigrp 100 subnets


command command
OSPF

Router -
R3 Router ASBR OSPF
R3 Router Area
ASBR Area
ASBR Area
Router ABR Area
Backbone Area ABR
Router Area
ASBR ADV Router
37

Router ASBR Area ADV Router


ASBR Router

R7 Router - BR Router
ADV Router (Advertising Router ASBR Router next hop
Router OSPF Router ASBR Router
ASBR Router Router

ASBR Router router-id R3 Router


ASBR Area Router

ASBR Area R4
38

Router

Router#show ip ospf database asbr-summary


command
39

4.5 Autonomous System External LSAs (Type 5 LSA)


OSPF Autonomous System (OSPF OSPF domain
redistribu ASBR OSPF
OSPF Router ASBR

ASBR Router OSPF domain route (external network OSPF


OSPF Area Router
advertise Stub Area OSPF Autonomous System (OSPF
Area Router OSPF
external network
ASBR
40

R7 Router -

ASBR ASBR R3 (router-id


R7 Router
ASBR
Type Area
R7 Router Type 1 LSA

{ Type 4 L
external network Router

Router ASBR Router

OSPF Area Router


41

Figure 4.3 Type 5 LSAs Flooding

Router

Router#show ip ospf database external


command command

Router

O E1 O E2
42

R6 Router

R6#show ip route
command

4.5.1 Two External Metrics Types


OSPF

Type 1 external metrics


Type 2 external metrics (IOS default)

Type 1 external metrics OSPF Router


OSPF
ASBR OSPF

internal

R1 Router external metrics


43

Figure 4.4 Type 1 external metrics

Type 2 external metrics Router external

ASBR Router R2, R3)


OSPF ASBR

Figure 4.5 Type 2 external metrics

ad external routes (paths)


O E1 O E2
O OSPF

O E1 External Type 1 route

O E2 External Type 2 route

4.6 Group Membership LSA (Type 6 LSA)


OSPF
44

4.7 NSSA external LSA (Type 7 LSA)


OSPF external route Not-So-Stubby-
Area (NSSA) advertise
NSSA Area NSSA Area
Area ABR Router
Area

Figure 4.6 Type 7 LSAs Flooding

(OSPF Area

Stub Area Stub Area


Stub Area

Stub Area OSPF exte


Stub Area Area
Stub Area Totally Stubby Area Area

Area ABR
Area

Stub Area Stub Area OSPF


45

Stub Area St Area

Router Area
ABR Area

ABR Router Router


Totally Stubby NSS Router Area

R3 Router OSPF

R3 (config-router) #area 1 nssa


command Area Area Area Router
command

Area Area Router


Area Router

Area R4 Router Type-7 AS External Link States (Area


ADV Router
ASBR R3 (router-id
46

Type 7 LS routes (paths) Router

Area R2 Router
47

O N1 extre NSSA Type 1 route


Type 1 external metrics

O N2 NSSA Type 2 route Type 2


external metrics

4.8 BGP LSA or Link LSA (Type 8)


Type 8 LSA OSPF OSPF OSPF
OSPF -
OSPF
Type 8 LS External-Attributes-LSA

OSPF Router
48

4.9 Opaque LSAs (Type 9, 10, 11 LSAs)


LSA
- Router
OSPF Ty Intra-Area
Area Area
Area (inter-Area Auto (Stub Area
Router
flood
49
50

5. OSPF Areas

OSPF Area Area (Single Area Router OSPF

Figure 4.7 OSPF Single Area Design

n Router LSDB

Area Router
network

( )

Router Router link-state database


LSDB

link-state D
Router

OSPF Router up or
OSPF Router
multicast address LSA link
Router Area Area 1 Router LSA
Area Router Router Router
LSA Router
Router SPF
co

Area d
Hierarchical D

OSPF Area Area Router Area


(detail) Area
su
Router link-state database
51

l -
CPU

Figure 4.8 OSPF Multi Area Design

Area Backbone Area OSPF Hierarchic OSPF domain (OSPF Autonomous System)
Area backbone Area Area Area Backbone Area
Standard Area

Backbone Area Backbone Router (BR)


Area Area Border Router (ABR) ABR
Area Area Area Border Router (ABR

Backbone Area Area Router Internal Router


(IR) ABR Area Area

Area 1, Area 0, Area OSPF Autonomous System (OSPF OSPF


domain OSPF network
Router Autonomous System Border Router (ASBR)

6. OSPF Routers and Routes

Area Border Router (ABR) Router Area R3 Router


Area Area OSPF Area Design OSPF network (OSPF Area
Backbone Area ABR Router Backbone Area Area

Autonomous System Border Router (ASBR) OSPF network ( EIGRP network


Router OSPF Autonomous System (OSPF Domain)
BR
52

Backbone Router (BR) Backbone Area Router BR Area


Area

Internal Router (IR) Area Router BR


Area

OSPF Area D

External route OSPF domain (OSPF OSPF


OSPF Router OSPF
Router ASBR

(O) Intra-Area route Area Router

(intra-Area OSPF

(O IA) InterArea route OSPF d Area Router

(interArea OSPF

(O E1) External Type 1 route


OSPF ASBR Router
Router

Autonomous System OSPF Router OSPF


OSPF Do OSPF Area

Area border Router Router Area


Area Router summary topology
info

Area Router Area Router (R6, R7, R8,


R9) Area Router Area
Area Router

OSPF Area LSDB memory


CPU Area
top Area
OSPF Area

Router Area (1 and 0 Area Border Router (ABR


Area Area Area
SPF

Router Memory, CPU OSPF ABR


Router Router
53

7. OSPF Area Types

OSPF Area Type

1. Backbone Area
2. Standard Area
3. Stub Area
4. Totally Stubby Area
5. Not-So-Stubby-Area (NSSA)

7.1 Backbone Area (Area 0)


Backbone Area Area OSPF Autonomous System (OSPF Area
Backbone Area OSPF non-backbone Area
backbone Area Area
Area Backbone Area Area Area
Area Backbone Area Area

Figure 4.9 OSPF Area Types

7.2 Standard Area


Backbone Area stub Area normal Area Standard Area
Backbone Area Area Standard Area
54

7.3 Stub Area


OSPF Stub Area OSPF
Stub Area Area
LSA (Type 3 LSA) Stub Area Router
Backbone Area ABR Router stub Area

Area Stub Area Backbone Area

Stut Area Router ASBR Stub Area Type 5 LSA


Stub Area advertise
Stub Area Router

Stub Area Stub


Area Stub Area
Stub Area Router OSPF Area
Area Router Stub Area Router
Stub Area Stub Area
Router (traffic)
Stub Area

Stub Area Global configuration mode Router configuration mode

Router (config-router) #area 10 stub

command (10 Area

Figure 5.0 Stub Areas LSAs flooding


55

7.4 Totally Stubby Area


Totally Stubby Area Stub Area Stub Area OSPF

stub Area Router


Stub Area OSPF Area
Stub Area external routes (OSPF
internal routes (OSPF Area routes)

Totally Stubby Area Totally Stubby Area exter


Area Totally Stubby
Area Router OSPF Area
Totally Stubby Area Stub Area

Totally Stubby Area

Router (config-router) # area 10 stub no-summary

command
Area command no-

Figure 5.1 Totally Stubby Areas LSAs flooding

7.5 Not-So-Stubby-Area (NSSA)


Stub Area Stub Area
Stub Area OSPF
Stub Area Area
RFC 1587 Stub Area Stub Area

floo
Area ABR
Area
56

Figure 5.2 NSSAs LSAs flooding

Stub Area Totally Stubby Area

Stub Area Stub Area OSPF

Stub Area Stub NSSA Area Totally Stubby NSSA

Stub NSSA Router Area


ABR Area

Router (config-router) #area 10 nssa


command

Stub Area Stub Area Stub Area ABR


Router ABR
default route ABR Area Router
Router Area
networ BR Router
command

Router (config-router) #area 10 nssa default-information-originate


command BR Router inst ABR Router
Router
Router ABR Router forwar

Totally Stubby NSSA


57

T ABR Router Router


Router Area

Stub Area Totally Stubby Area

Router (config-router) #area 10 nssa no-summary


command Totally Stubby Area

ABR Router

8. Administrative Distance

OSPF

Router OSPF
Router OSPF
OSPF
R R

R
(parameter)
OSPF cost (sum of Router

Router

Router OSPF ol (
Router OSPF
OSPF protocol EIGRP protocol
Cisco Router ()
58

Administrative Distance (AD)

OSPF
Router

Router OSPF
Administrative D
Router Router
default Administrative D
Adminis Router
EIGRP route OSPF OSPF
D
OSPF

Route T ype Administr ative Distance


Connected 0
Static 1
BGP (external routes) 20
BGP (internal routes) 200
EIGRP (internal routes) 90
EIGRP (external routes) 170
EIGRP (summary routes) 5
IGRP 100
OSPF 110
IS-IS 115
RIP 120
Unusable or Unknown* 255

Table 1.2 Administrative Distances of Multiple route types

[ Router u
routing
59

9. OSPFv2 Authentication

Figure 5.3 OSPFv2 Authentication

OSPFv2 Authentication T

- -
Router
Router fo

Router message attack

OSPFv2

Null authentication
Clear Text authentication
MD5 authentication

Null authentication (

Clear Text authentication

MD5 authentication securi


60

OSPFv2 configuration command

Table 1.3 OSPFv2 Authentication Types

interface configuration
interface subcommand Router
command command

Router

OSPF
Router

( service password-encryption command


clear text

Router
command -
command authentication key ( cisco123
R1 Router Router

R1#show ip ospf interface gigabitEthernet 0/1


command command -
61

OSPFv2 Type 0 authentication

con Area
OSPF process

R1 (config-router) #area 0 authentication message-digest


command Router configuration configu Area 0
Area

R1 (config-if) #ip ospf authentication message-digest


command Area
OSPF

R1 (config-router) #area 0 authentication


command Area 0 Area

(*OSPF A IPsec (IP Security) protocol


OSPF OSPF
EIGR
62

10. OSPF Load Balancing

OSPF
routi OSPF

Router link redundancy (backup l

OSPF

Router (config-router) #maximum-path 6


command Router configuration mode OSPF configuration mode Router OSPF command

Router Router
Router

Router
- per-destination IP Address

Figure OSPF equal cost path load balancing

OSPF

Router

equal cost path load


IGRP EIGRP protocol equal cost path unequal
cost path load load
63

11. OSPF Default Routes

Default route Company Internet connection ISP


Router local network Router forwarding
local network forward Router default route

Company local network Internet Router (ISP Router


company Gateway Router) default route configure Internet
(packet destination address company local network default route Internet

Company network Router (B1, B2, B3) default route configure Router (R1)
default route dynamically learn dynamically learn (B1, B2, B3) Router
Internet R1 forward

( dynamically learn default route network Router manually


configure default route configure Router OSPF protocol
default route network OSPF Router advertise
)

Figure 5.4 OSPF default route advertising

OSPF network default route R1 Router


company Internet connection ISP Gateway Router B1, B2, B3
Branch Router Company network engineer R1 Router
Global configuration mode Router configuration mode OSPF process id

R1 (config-router) #default-information originate

command default route configure (Step 1)

configure R1 Router default route OSPF Company Network


Branch Router (B1, B2, B3) (Step 2)
64

Figure 5.5 OSPF default route advertising

Branch Router OSPF protocol R1 default route Internet


default route R1 forward

B1, B2, B3 Router Internet packet (traffic)


R1 Router R1 ISP Router forward
route Router R1 ISP default route (static route or learned
from ISP) BRanch Router Internet R1
R1 ISP

default-information originate command R1 default route Router advertise


R1 default route (ISP route) OSPF R1 default route Router
advertise ( R1 ISP route
)

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

command R1 configure R1 default route fail (R1 ISP


connection ) OSPF R1 default route B1, B2, B3 Router advertise
65

12. OSPF Configuration in Single Area

Figure 5.6 Sample OSPF Single Area Network

(
)
https://drive.google.com/file/d/0B2tglCgu24N3X0ZKNERFUTlzaW8/view?usp=sharing

https://drive.google.com/file/d/0B2tglCgu24N3RzJxYXlPOEs1SVU/view?usp=sharing
66

12.1 OSPF Process ID


Router OSPF protocol Router Global configuration mode
Router configuration mode OSPF Router

Router (config) #router ospf 1


command OSPF process

Router OSPF 1 command 1 OSPF - Router OSPF process


- OSPF
OSPF process-id OSPF - locally
significant OSPF Router -
OSPF Router neighbor re -

OSPFv2 (OSPF OSPF Router OSPF protocol


indirect I OSPF
IP Address network subcommand (OSPF network
command OSPF directly enable

(OSPF ver OSPF OSPF


OSPF Router

Router (config-if) #ipv6 ospf 1 Area 0


67

Command OSPF

command 1 OSPF process-id OSPF Router


OSPF - network command OSPF

12.2 OSPF Network Command


Albuquerque Router router ospf command OSPF process OSPF
OSPF network subcommand

Albuquerque Router Router

Albuquerque (config) #router ospf 1


command OSPF (Step 1)

Albuquerque (config-router) #router-id 1.1.1.1


command router-id (Step 2)

network command (Step 3)

Albuquerque (config-router) #network 10.1.1.0 0.0.0.255 area 0


command network command network command
IP Address Router OSPF
Albuquerque Router networ IP Address
network command OSPF
68

OSPF neighbor Router Hello


network command Area
interface FastEthernet 0/0 Area as

network command network command IP Address


Router IP Address

12.3 Wildcard Mask


wildcard network command IP Address
c IP Address
oct
IP Address
IP Address

wildcard 0.0.0.0 IP Address network


command IP Address IP Address
OSPF

wildcard 0.0.0.255 IP Address octet

wildcard 0.0.255.255 IP Address octet

wildcard 0.255.255.255 IP Address octet

wildcard 255.255.255.255 IP Address

network 10.1.33.1 configur IP Address


- network 10.1.33.1 0.0.255.255 area 0 network
10.1.0.0 0.0.255.255 area 0 IP Address 0

Albuquerque Router
69

Seville Router OSPF network command network command


network command IP Address int OSPF

Seville Router Albuquerque Router Seville Router


Albuquerque Router

Seville Router running-configuration


70

Yosemite Router network command configuration Yosemite Router (RID 2.2.2.2)


Albuquerque Router (RID 1.1.1.1) Full State neighbor message

Yosemite Router running-configuration


71

Albuquerque Router routing table

Albuquerque#show ip route

( )

Albuquerque#show ip route ospf

command

show ip route command show ip route ospf


command OSPF C
connected route O OSPF Intra-Area route OSPF
Chapter 6. OSPF Routers and Routes
72

Albuquerque Router

Albuquerque#show ip ospf neighbor

command OSPF neighbor Router Yosemite (2.2.2.2) Seville (3.3.3.3)


Yosemite Seville Router Albuquerque Router Full State neighbor
(State C )

Seville Router

Seville#show ip ospf database

command Seville Router Topology Table ( ) Link-State Database Seville Router


LSDB Router Link States (Area 0) Type 1 LSA Link ID column
router-id ADV Router column advertise
Router Router router-id Area 0 Type 1 LSA flood
73

Yosemite Router show ip ospf neighbor command OSPF neighboring Router

Albuquerque Yosemite Router serial point-to-point link Router


network point-to-point DR, BDR election Neighbor ID column Albuquerque
Router router-id 1.1.1.1 State column FULL Albuquerque Yosemite Full
state neighbor (fully adjacent) database exchange

Yosemite Router show ip route command routing table O OSPF Intra-Area


Route (Area [110/65] 110 route OSPF protocol
Administrative Distance 65 metric
74

12.4 OSPF Protocol Configuration & Operation Overview

configuration & show

Figure 5.7 OSPF Protocol Configuration & Operation Overview

global configuration mode OSPF router configuration mode network command


OSPF enable OSPF enable network
neighbor discovery Router neighbor Router
neighbor verification check (hello interval,dead interval,area-
neighbor neighbor

Dijkstra (SPF) algorithm Router best route Router SPF


best route routing table best route forward
configuration operation
75

13. OSPF Configuration in Multi-Area

Figure 5.8 Sample OSPF Multi-Area Network

packet tracer Instructor version 6.1.1 download Lab file packet tracer
version
https://drive.google.com/file/d/0B2tglCgu24N3X0ZKNERFUTlzaW8/view?usp=sharing

OSPFv2 multi-area configuration lab file download


https://drive.google.com/file/d/0B2tglCgu24N3MDh2RmduMGQ5dnM/view?usp=sharing

Area Area 0 VLAN (VLAN 11, VLAN 12) VLAN route


intervlan routing (Router on a stick) feature Area 0 Area
OSPF multi-Area configure Area 0 subnet Area 23
subnet Area 4 subnet

R1 Router configuration OSPF configuration R1 Router Switch SW1


interface FastEthernet 1/0 sub-interface configure

R1 Router interface FastEthernet 1/0 Vlan 11 Vlan 12 sub-interface Vlan 11


sub-interface FastEthernet 1/0.11 Vlan 12 sub-interface FastEthernet 1/0.12 configure

- configure Vlan 11 sub-interface


1/0.11 1/0.43 sub-interface Vlan
troubleshooting

- forward encapulation type (ISL or dot1q)


configure
76

R1 (config-subif) #encapsulation dot1q 11

Command encapsulation type dot1q 11 encapsulation


Vlan encapsulation Vlan
R1 Router Area 0 route inter-vlan routing

(OSPF Muti-Area configuration inter-vlan routing


)

OSPF configuration

Network diagram R1 Router Area Area Border Router (ABR)


Router R1 Area 0, Area 23, Area 4 interf OSPF enable
OSPF enable OSPF - network command indirectly
enable OSPF Single Area configuration OSPF interface enable directly
indirectly

OSPF configure OSPF process create Router OSPF


create run

R1 (config) #router ospf 1

command OSPF process 1 create process 1 router-id (R1


router-id)

R1 (config-router) #router-id 1.1.1.1

command configure interface OSPF indirectly enable

R1 (config-router) #network 10.1.1.1 0.0.0.0 area 0

network command configure (network command


wildcard mask interface OSPF indirectly enable
subnet range IP Address network command OSPF
IP
77

Network command R1 OSPF enable R4 (router-id 4.4.4.4) R2 (router-id


2.2.2.2) R3 (router-id 3.3.3.3) R1 (router-id 1.1.1.1) message
(R2, R3 R4 Router OSPF configuration R2, R3 R4
Router configuration R1 Router configuration Router
show running-configuration command lab file download link
)

Router OSPF configuration Area 0 Switch SW1 configuration


Area 0 add (Area 0 route
inter-vlan routing )

Area 0 Vlan 11 Vlan 12 Vlan Swithc SW1 vlan 11 vlan 12

SW1 (config) #vlan 11

SW1 (config) #vlan 12

command switch vlan database add

SW1#show vlan brief

Command SW1 create V information Switch


SW1 Vlan Database Vlan 11 Vlan 12 active
78

Switch SW1 FastEthernet 0/3 vlan 11 FastEthernet 0/2 vlan 12 Switch


Vlan assign Global configuration
(interface )

SW1 (config-if) #switchport access vlan 11

SW1 (config-if) #switchport access vlan 12

command configure Switch SW1 Router R1 interface FastEthernet 0/1

SW1 (config-if) #switchport mode trunk

command trunk mode configuration interface (SW1 R1 link)


V (Vlan 11 and Vlan 12) pass interface FastEthernet 0/1 trunk mode
access mode Router R1 Vlan access (pass)
interface trunk mode configure interface Vlan pass
inter-vlan routing Area 0 Vlan 11 (10.1.1.0/24) Vlan
12 (10.1.2.0/24) vlan vlan forward Vlan
Router R1 route
79

SW1#show interface trunk

command trunk configure Fa0/1 interface pass


1 Native vlan

R4 Router Routing table show ip route command routing table output


O IA ( ) O IA OSPF InterArea
10.1.1.0 Area O IA
R4 Router Area C
Router R4 s Network Diagram R4
routing table
80

Router R1 routing table Router R1 Area Area Border


Router (ABR) Area R1 routing
table 10.1.4.0
R1 ABR

R1 10.1.23.0 subnet 10.1.13.0 subnet (R3 Router


) 10.1.12.0 subnet (R2 Router ) R1
(Serial 0/1
cost

R3 Router topology table Router Link States (Area 23) R1


Router Link-State Database Area 23 flood R1 Router ABR
LSDB Area 0, Area 23, Area 4 Area Net Link
States (Area 23) Type 2 LSA Network Diagram R2 R3 R1 point-to-point
Ethernet network (Broadcast network)
81

Type 2 LSA Ethernet network (Broadcast network) DR, BDR election


LSA R2 R3 Router R1 link - -
DR, BDR election Type 2 LSA Area 23
R2 R3 Ethernet network Broadcast network DR, BDR election
R3 topology table Link ID DR Router interface IP Address ADV Router DR
Router 10.1.23.2 R2 Router interface IP Address R1-R2
Ethernet network (segment) R2 Router DR

Summary Net Link States (Area 23) Area 23 Link ID


Area 0 Area 4 Area 23 Router (R2 & R3)
Area summary network information (subnets ADV Router
1.1.1.1, 10.1.14.1, 10.1.15.1 (R1) ABR Router R1

R1 Router show ip ospf neighbor command OSPF neighboring Router R1


Router neighbor Router R3 (3.3.3.3) R2 (2.2.2.2) - -
DR, BDR election R1 Router neighbor table State column
( ) 3.3.3.3 2.2.2.2 FULL/ - R1 R2 , R3
82

fully adjacent database exchange - R2, R3 DR, BDR


R4 (4.4.4.4) network Broadcastnetwork DR, BDR election
R4 (4.4.4.4) FULL/BDR R1 R4 fully adjacent R1-
R4 DR, BDR election BDR R1-R4 segment (network) R4 BDR R1
DR

R2 neighbor table R2 R1 (1.1.1.1) link point-to-point


network DR, BDR election R3 (3.3.3.3) link Broadcastnetwork
DR, BDR election (State column FULL/DBR)

configuration packet tracer lab


Area 4 PC Area 0 Vlan 12 PC (10.1.2.2) ping reply
Area 4 Area 0 route
83

14. Troubleshooting OSPFv2 routing protocol

OSPFv2 Troubles category ( )

Interface Troubleshooting

Area Troubleshooting

Neighbor Troubleshooting

Other issuees

Figure 5.9 OSPFv2 Troubleshooting

OSPF Troubleshooting download

(Lab file with errors)


https://drive.google.com/file/d/0B2tglCgu24N3VzZkelUtZVRYcjQ/view

(Lab file with fixed)


https://drive.google.com/file/d/0B2tglCgu24N3QXk5NnROSmVYazA/view?usp=sharing

14.1 Interface Troubleshooting

Finding duplicate OSPF router-id

R3 Router R1 router-id configure

R1 Router

R1#debug ip ospf adj

command OSPF
84

R3 Router 10.1.1.3 IP Address assign interface FastEthernet0/0 router-id 1.1.1.1


duplicate message ( )

OSPF debug

R1#undebug all

command debug

Router R3

R3#show ip ospf

command router-id Router R3 router-id ID 1.1.1.1

Router R3 router-id configure router-id configure

R3 Router OSPF protocol process 3 router-id 1.1.1.1 3.3.3.3

R3 (config) #router ospf 3

R3 (config-router) #router-id 3.3.3.3

command configure
85

c Router R3 OSPF process 3 router-id 3.3.3.3


Router R3 OSPF

R3#clear ip ospf process

command reset OSPF reset Router R3


Router neighbor relationship Router R3 neighbor R1 FULL state
Down state neighbor relationship

Router R3 router-id 3.3.3.3 configure R3 router-id 3.3.3.3


R1

R1#show ip ospf neighbor

command Neighbor ID column R3 router-id 3.3.3.3 State column


R3 R1 FULL state (database DD can be exchange) FULL /BDR
R3 Broadcast network database exchange DR / BDR role

14.2 Area Troubleshooting

Finding Area Mismatches

OSPF network Router Area configure troubleshoot


OSPF network BroadcastEthernet network Router R1, R2, R3, R4 Area 0
86

R2 Router Area configure R1 Router neighbor relationship

R1 Router

R1#debug ip ospf adj

command OSPF Router R2 interface FastEthernet


(10.1.1.2) Area mismatch

R2

R2#show ip ospf interface brief

command OSPF enable Area

Area interface fastEthernet 0/0

R1#show ip ospf interface fastEthernet 0/0

command detail
87

Router R2 OSPF process 2 network 10.1.1.2 0.0.0.0 Area 1 command

R2 (config-router) #no network 10.1.1.2 0.0.0.0 area 1

command global configuration mode OSPF mode

R2 (config-router) #network 10.1.1.2 0.0.0.0 area 0

command 10.1.1.2 IP Address asign FastEthernet 0/0 interface Area 0

Router R2 Router R1, R3, R4 Area 0 R2 Area 0 network


R1, R3, R4 neighbor

R1 Router

R1#show ip ospf neighbor

command neighbor Router Neighbor ID (router-id) 2.2.2.2 R2 Router R1 neighbor


list

------------------------------------------------------------------------------------------------------------------------------------------------

14.3 Neighbor Troubleshooting

Finding OSPF Hello and Dead Timer Mismatches

R4 Router neighbor relationship error troubleshoot


R4 Router

R4#debug ip ospf hello

command R4 Router Hello

R4 Router Hello events debug on


88

D Dead R 40 C 10 R 40
R4 Dead timer 40 Router packet R received
value C configured value C 10 local Router R4
configure dead timer value 10 R4 Router received dead
timer value 40 configured dead timer value 10

Hello R 10 C 5 R 10 R4 Router Hello timer 10 packet


received value 10 Router Hello timer value C5
R4 Router Hello timer 5 C 5 local Router
configure configured value

R4#show ip ospf interface fastEthernet 0/0

Command detail Hello

R4 FastEthernet 0/0 Area R1 FastEthernet 0/0 detail R1 FastEthernet


0/0 Hello

R4 Hello, Dead timers (5, 10) R1 Hello, Dead timers (10, 40) R1 R4
neighbor
89

R4 FastEthernet 0/0 Hello R1 configure


G interface configuration

R4 (config-if) #ip ospf hello-interval 10

R4 (config-if) #ip ospf dead-interval 40

command configure configuration command R4 Hello


change R4 network Router (R2, R3) neighbor
R4 R2 (2.2.2.2) R3 (3.3.3.3) neighbor relationship

R1 Router

R1#show ip ospf neighbor

command neighbor list R4 (4.4.4.4)


90

14.4 Other issuees

Mismatched OSPF Network Types

OSPF OSPF protocol Router network


type concept interface -
serial interface point-to-point protocol (PPP, HDLC) network
default interface network type point-to-point OSPF Ethernet
(or) FastEthernet interface network default network type Broadcast OSPF

Router

Attached link dynamically discover


point-to-point network DR, BDR Broadcast


OSPF protocol default
Router network type neighbor error

R3 Router FastEthernet 0/0 network type neighbor

R3 Router interface FastEthernet 0/0 network type

R3#show ip ospf interface fastEthernet 0/0

command FastEthernet 0/0 network type point-to-point


91

R3 Area 0 R1 FastEthernet 0/0 interface R1 FastEthernet 0/0 network


type Broadcast Router network type
Broadcast R3 Router FastEthernet 0/0 network type Broadcast configure

R3 interface FastEthernet 0/0 network type point-to-point Broadcast

R3 (config-if) #ip ospf network broadcast

command configure
92

configuration copy run sta (copy running-config startup-config) command save R3


Router network neighbor

Router R1 neighbor table Router R3 (3.3.3.3) neighbor Router


93

15. OSPF Multiple Area Types Configuration

Figure 6.0 Sample OSPF Network with Multiple Area Types

OSPF Multi Area Types Configuration GNS3 version 0.8.5


download
https://drive.google.com/file/d/0B2tglCgu24N3WE44bDNkR21OMEk/view?usp=sharing

GNS3 version 0.8.5 (all-in-one) software setup file download


https://drive.google.com/file/d/0B2tglCgu24N3YzdyMnUtU3hhS28/view?usp=sharing

GNS3 Cisco IOS I download


http://commonerrors.blogspot.com/2013/10/download-cisco-7200-series-router-ios.html
94

15.1 Configuration

IR-1

IR-1 Router running configuration running-configuration IR-1


router-id IR-1 Backbone Area Backbone Router
ABR-1, ABR-2, ABR-3 OSPF enable
Area 0

ABR-1

ABR-1 running configuration ABR-1 NSSA Backbone Area Area


Border Router (ABR) ABR-1 NSSA

ABR-1 (config-router) #area 1 nssa

command NSSA enable command NSSA (BR ASBR


) configure ABR-1 Area Border Router
95

ABR-1 network command OSPF enable

ABR-2

ABR-2 running configuration ABR-2 Standard


Area Border Router ABR-2 Area 3 ABR-4 Router

ABR-2 (config-router) #area 3 virtual-link 10.0.0.9

command virtual-link (virtual link ) command 10.0.0.9


ABR-4 Router Loopback interface ABR-2 ABR-4 Area 3 Loopback interface
virtual link command area 3 Loopback
interface ABR-2 Loopback interface 10.0.0.5 IP Addr

ABR-3

ABR-3 Backbone Area Totally Stubby Area Area Border Router ABR-3 Totally
Stubby Area

ABR-3 (config-router) #area 2 stub no-summary

command Totally Stubby Area command no-summary Stub


Area configure Totally Stubby Area ABR-3 IR-2 Router area 2
stub no-summary command configure
96

IR-2

IR-2 Totally Stubby Area Router configuration IR-2


Router ABR-3 area 2 stub no-summary command OSPF
enable network command configure

IR-3

IR-3 Standard Area Router running configuration


97

ABR-4

ABR-4 Router Standard Area Stub Area Router ABR-2 virtual


link virtual link command

ABR-4 (config-router) #area 3 virtual-link 10.0.0.5

10.0.0.5 ABR-2 Loopback interface ABR-4 IR-4 Stub Area

ABR-4 (config-router) #area 4 stub

command Stub Area configure


98

IR-4

IR-4 Stub Area Router Stub Area configure ABR-4

IR-4 (config-router) #area 4 stub

command OSPF process 1 configure

IR-5

IR-5 ASBR, ABR-1 Not-So-Stubby-Area (NSSA) IR-5 Router NSSA

IR-5 (config-router) #area 1 nssa

command OSPF process 1 configure


99

ASBR

ASBR OSPF AS (OSPF Domain) external network (e.g, EIGRP network) Autonomous
System Border Router ASBR Router EIGRP Router EIGRP protocol
EIGRP protocol configuration

ASBR (config) #router eigrp 10

ASBR (config-router) #eigrp router-id 10.0.0.1

ASBR (config-router) #network 200.128.1.0

ASBR (config-router) #no auto-summary

command 10 EIGRP AS number router-id


network command EIGRP network command OSPF network command IP
Address wildcard mask subnet mask

ASBR Router EIGRP protocol OSPF protocol redistribute


EIGRP Router OSPF Domain forward redistribute

ASBR (config-router) #redistribute eigrp 10 subnets

command configure eigrp 10 subnets key word OSPF protocol EIGRP


redistribute

ASBR Router OSPF Area 1 NSSA

ASBR (config-router) #area 1 nssa

command OSPF process 1 configure


100

EIGRP

EIGRP Router EIGRP AS 10 Router EIGRP Router

EIGRP (config-router) #network 192.168.1.0

EIGRP (config-router) #network 200.128.1.0

network command configure running configuration

15.2 Verification

IR-1 Router

IR-1#show ip ospf neighbor

command IR-1 neighbor table IR-1 Area 0 10.0.0.3 ,


10.0.0.5, 10.0.0.6 neighbor table

ABR-2 Router neighbor table ABR-2 10.0.0.9 (ABR-4) virtual link


OSPF_VL0
101

IR-2 Router neighbor table IR-2 neighbor table Area 2


ABR-3 (10.0.0.6)

ABR-4 neighbor table ABR-2 (10.0.0.5) virtual link


Interface column OSPF_VL0

ASBR neighbor table ASBR neighbor table IR-5 Router


router-id (10.0.0.2)

ABR-1 Router

ABR-1#show ip route

command routing table


102

IR-2 routing table IR-2 routing table external network (


default route O*IA IR-2 ABR-3 default route
forward

IR-3 routing table routing table O E2


(Type 5 LSA O E1 and O E2
)

O E2 200.128.1.0 [110/20] via 10.244.7.1,

O E2 192.168.1.0/24 [110/20] via 10.244.7.1,


103

200.128.1.0, 192.168.1.0 OSPF domain EIGRP Router


via 10.244.7.1 IR-3 Router next
hop Router (ABR-2) interface IP Address

ASBR Router routing table O IA OSPF Domain


(10.244.3.0, 10.244.4.0, 10.244.5.0, 10.244.6.0, 10.244.7.0, 10.244.8.0, 10.244.9.0)
network diagram )

10.244.1.0 network ASBR Router network (OSPF enable


) connected route C

10.244.2.0 network ASBR Router Area route O

route D route EIGRP


protocol external network (EIGRP network) 192.168.1.0 route
104

EIGRP Router routing table D EIGRP protocol


105

IR-1 Router

IR-1#show ip ospf database

command link-state databse

IR-1 Router Type 1 LSA Router Link States Area 0 virtual link
Summary Net Link States
Type 5 LSA AS External Link States
106

IR-2 Router link-state database

Summary Net Link States ABR-3 (10.0.0.6) default route (0.0.0.0) IR-2 Totally
Stubby Area Router Area Area Border Router
default route

IR-4 Router link state database IR-4 Router Stub Area Router
OSPF Domain
Type 4 ype
4 Stub Area pass Stub Area
forward ABR default route
107

Summary Net Link States (Area 4) IR-4 Stub Area ABR Router ABR-4 (10.0.0.9)
default route (0.0.0.0)

OSPF Domain OSPF Domain


Type 3 LSA IR-4 LSDB
(Topology Table) ABR-4 Type 3 LSA summary network information

Summary Net Link States (Area 4) ABR Router ABR-4 (10.0.0.9) default
route OSPF domain ADV Router
(Advertise Router

IR-5 Router LSDB IR-5 NSSA Router IR-5 Router LSDB


Type 1 LSA Router Link States (Area 1) Type 2 LSA Net Link States (Area 1) Type 3
LSA Type 7 LSA
Type-7 AS External Link States (Area 1)
NSSA NSSA IR-5 Area
1 Stub Area NSSA (Stub NSSA) configure
Type 1, Type 2, Type 3 Type 4
108

ASBR OSPF Domain


advertise Area Type 5 LSA
flood (advertise)

ASBR Type 5 LSA Type 7 LSA


LSA Type NSSA ABR Router Type 5 LSA
convert forward network diagram IR-5
ABR-1 Type 5 LSA Area
flood IR-5 LSDB Area
Router ( IR-1) Type 5 LSA IR-1 Type 5 LSA

NSSA Type 4 LSA Type 4 LSA


ASBR Router LSA ASBR Router NSSA
NSSA ASBR Type 1 LSA
109

16. OSPFv3 (OSPF Version 3)

OSPFv3 IPv6 support OSPF


OSPF version 2 (OSPFv2) OSPF version 1 implement
OSPF version 2
OSPF (OSPFv2) IPv6 support

Enterprise network IPv4 IPv6 migrate technology ( )

Dual-stacks
Tunneling (6 To 4 Tunnel)
NAT Protocol Translator (NAT-PT)

16.1 OSPFv2 and OSPFv3

Protocol -
Area design concept
Protocol interface enable
Interface enable OSPF protocol () neighbor discovery
Protocol neighbor Area Number, Hello Interval, Dead Inte
( OSPFv2 OSPFv3 )
Protocol Router neighbor LSDB
LSDB exchange SPF Algorithm best route
Protocol cost concept
Protocol LSA topology table

16.2 OSPFv2 and OSPFv3 Configuration

16.3 OSPFv2 network subcommand

Global configuration mode>


o Router configuration mode>
network subcommand
110

OSPFv2 network subcommand interface IP Address OSPFv2 OSPF


interface indirectly enable

OSPFv3 OSPF interface subcommand configure OSPFv3


Router network subcommand

Router (config-if) #ipv6 ospf 1 area 0

interface subcommand command OSPF interface directly enable

16.4 OSPFv3 Router-ID

OSPFv3 OSPFv2 32bit router-id OSPFv3 router-id IPv4 Address


router-id OSPFv2 OSPFv2 router-id OSPF configuration mode (OSPF
- ) router-id command manually assign OSPFv3
Router router-id manually assign IPv4 address interface OSPFv3
router-id IPv6 Address 128bit OSPFv3 32bit router-id
router-id selection
IP

16.5 Configuring Single-Area OSPFv3

1) Step 1 assign

2) Step 2 forward Global configuration mode


ipv6 unicast-routing
command configure

3) Step 3 G OSPFv3 process


ipv6 router ospf process-id
command create

4) Step 4 router-id
111

5) Step 5 OSPFv3 enable Router


ipv6 ospf process-id area area-number
command OSPFv3 enable

*( OSPFv3 configuration OSPFv2 network command )

Configuration

Single Area Design (Area 0) Router Area 0

OSPFv2 OSPFv3 protocol Router neighbor database exchange (fully


adjacent) OSPF process-id Router
-

router-id 1.1.1.1, 2.2.2.2 3.3.3.3

Router IPv4 Address IPv6 Address

Figure 6.1 OSPFv3 Single Area Network

16.6 Sample OSPFv3 Configuration Steps

OSPFv3 configuration lab file download


https://drive.google.com/file/d/0B2tglCgu24N3cVY4anZYWUNWVlE/view?usp=sharing

configure configuration topology lab file

https://drive.google.com/file/d/0B2tglCgu24N3VGd1dkJSc2E0THc/view?usp=sharing

OSPFv3 configuration R1 Router configure


112

(Step 1) Router configure

R1 (config-if) #ipv6 address 2001:db8:1111:4::1/64

command configure ipv6 address command 2001:db8:1111:4::1/64

IPv6 Address IPv4 Address configuration /64 prefixe


range

Cisco IOS software default shutdown IPv6 Address


configure interface configuration mode (config-if) #

R1 (config-if) #no shutdown

command interface enable


113

(Step 2) Router Glocal configuration mode

R1 (config) #ipv6 unicast-routing

command ipv6 routing protocol (OSPFv3) enable OSPF


forwarding command configure

(Step 3) Router Global configuration mode (config) #

R1 (config) #ipv6 router ospf 1

command OSPFv3 process create

OSPFv3 router-id 32bit router-id 32bit


IPv4 Address R1 Router IPv4 address interface router-id
manually configure router-id manually configure message
)

(Step 4) Global configuration mode (config) # OSPF protocol Router configuration mode (config-rtr) #

R1 (config-rtr) #router-id 1.1.1.1

command OSPFv3 process 1 router-id

(Step 5) OSPFv3 OSPFv2 network command OSPFv3 enable interface


process-id Area-id configure OSPFv3 directly enable

R1 (config-if) #ipv6 ospf 1 area 0

command Interface Interface configuration mode (config-if) # OSPFv3


enable

( R1 Router OSPFv3 sample configuration )


114

(OSPFv3 IPv6 Address OSPFv3 IPv6 protocol


IPv6 Protocol
IPv6 Address )

16.7 OSPFv3 Configuration Checking

OSPFv3 configuration network engineer configuration


Router OSPFv3 configuration checking parameter
() process-id Area number

Router Global configuration mode OSPFv3 process-id interface


process-id

configure Area N OSPFv2


Area Number Router configuration mode (OSPF - ) network command
configure OSPFv3 interface interface configuration mode
configure interface Area Number assign (Multiple
Area Design OSPF Area ABR Router Area
Number asign )

Router () neighbor Area Hello interval dead interval

[*OSPFv2 OSPFv3 OSPFv3 Router neighbor IPv6 prefixes


(subnets) ]
115

R1 configuration R2 Router configuration ( R2


confiugure running-configuration )

R3 Router running-configuration
116
117

R1 Router

R1#show ipv6 ospf

command OSPF command OSPFv3 1


OSPFv3 process 1 ID 1.1.1.1 R1 router-id (
)

Area BACKBONE (0) OSPFv3 assign Area


Number of interfaces in this area is 3 Area 0 assign interface

OSPFv3 show ipv6 ospf OSPFv2 show ip ospf command OSPFv2


show ip ospf command output

R3 Router configuration

R1

R1#show ipv6 ospf neighbor

command OSPF neighboring Routers R3 (3.3.3.3) R2 (2.2.2.2) R1


(1.1.1.1) FULL State neighbor (FULL/ ) database exchange

R2, R3 Router OSPFv3 neighbor table


118

R1#show ipv6 ospf database

command R1 Router LSDB

R1 Link-State Database Router Link States (Area 0) OSPFv3 LSDB


OSPFv2 LSA Type () Link LSA Intra-Area Prefix LSA
Link LSA (Type 8 LSA) flooding LSA Type
link-local address Link (Type-8) Link States (Area 0) Link LSA
Intra-Area Prefix LSA (Type 9 LSA) Area net flooding
OSPFv2 Type 2 LSA

R2 Neighbor Table -
119
120

R1 Router

R1#show ipv6 route

command routing table

R1 Routing Table O (OSPF intra-Area FE80::


- Router IPv6 enable Lin -
assign - local network automatic
configuration, neighbor discovery, Router discovery range FE80::/10
IPv4 169.254.x.x
IPv4 Protocol IP Address

Figure 6.2 OSPFv3 and its use of link local address


121

FF00::/8
IPv6 Broadcast Address

OSPFv3 Broadcast DROther Router (all SPF Router routing information (DD of LSDB)
DR Router (Designated Router

(*OSPF DROther Router multicast address DR Router

R1, R2, R3 Router


122

16.8 OSPFv3 Passive Interfaces

Router interface OSPF enable Router interface


OSPF discover network
Hello Hello interval ( ) Router OSPF enable
interface network Hello neighboring device OSPF
Hello interface Router
neighboring device OSPF Router
Hello Router
Hello CPU cycle (CPU usuage)
OSPF Router neighboring device passive
interface configure

(*OSPFv2 OSPFv3 OSPF enable interface passive interface )

IP Router

Figure 6.3 OSPFv3 network with passive interfaces

Router R1 subnet 1 R1 subnet 1 neighbor relationship


Router R1 subnet 1 interface
passive interface configure R1 subnet 1 Router
advertise subnet 1 interface Hello neighbor discovery

Interface passive interface

interface OSPF Hello


Interface Hello ignore
interface OSPF Router neighbor relationship
123

passive interface Router


advertise

Passive interface configuration OSPFv2 OSPFv3

Passive interface configuration () interface passive


interface interface default passive interface
neighboring device

Router (config-if) #no passive-interface

command passive interface network


OSPF Router neighboring device passive-
interface default command Router (sub-interface ) passive
interface OSPF neighboring device interface no passive-interface
command passive interface Router
passive interface

Router interface
124

17. REFERENCES

> offical cert guide by WENDELL ODOM, CCIE No. 1624

>https://supportforums.cisco.com

> https://www.informit.com

>http://www.ccieuniversity.com

>https://networklessons.com

>http://packetlife.net

>http://www.cisco.com

>http://www.learncisco.net

>http://study-ccna.com

>http://www.itcertnotes.com

>http://www.9tut.com

>http://www.getnetworking.net

>http://wiki.nil.com

Kyaw Swa Lin

IP Core Optimization Engineer (current) @ Ooredoo Myanmar

Network Engineer (former) @ Yatanarpon Teleport

Email: kyawswalin10@gmail.com

Skype: kyawswar711

Facebook Page: https://www.facebook.com/Networking-Knowledge-843141505772184/


125
126

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