SlideShare a Scribd company logo
Configuring OSPF
Introducing the OSPF Protocol
Link-State Protocols
Link-State Data Structures
• Neighbor table:
– Also known as the adjacency database
– Contains list of recognized neighbors
• Topology table:
– Typically referred to as LSDB
– Contains all routers and their attached links in the area or network
– Identical LSDB for all routers within an area
• Routing table:
– Commonly named a forwarding database
– Contains list of best paths to destinations
Link-State Routing Protocols
• Link-state routers recognize more information about the
network than their distance vector counterparts.
• Each router has a full picture of the topology.
• Consequently, link-state routers tend to make more accurate
decisions.
Link-State Data Structure:
Network Hierarchy
• Link-state routing requires a hierachical
network structure that is enforced by OSPF.
• This two-level hierarchy consists of the following:
– Transit area (backbone or area 0)
– Regular areas (nonbackbone areas)
OSPF area
characteristics:
• Minimizes routing
table entries
• Localizes impact of
a topology change
within an area
• Detailed LSA
flooding stops at
the area boundary
• Requires a
hierarchical
network design
OSPF Areas
• Routers A and B are
backbone routers.
• Backbone routers
make up area 0.
• Routers C, D, and E are
known as area border
routers (ABRs).
• ABRs attach all other
areas to area 0.
Area Terminology
OSPF Adjacencies
• Routers discover neighbors by exchanging hello packets.
• Routers declare neighbors to be up after checking
certain parameters or options in the hello packet.
Forming OSPF Adjacencies
• Point-to-point WAN links:
– Both neighbors become fully adjacent.
• LAN links:
– Neighbors form a full adjacency with the DR and BDR.
– Routers maintain two-way state with the other routers
(DROTHERs).
• Routing updates and topology information are passed only between
adjacent routers.
• Once an adjacency is formed, LSDBs are synchronized by
exchanging LSAs.
• LSAs are flooded reliably throughout the area (or network).
OSPF Calculation
Routers find the best paths to destinations by applying
Dijkstra’s SPF algorithm to the link-state database as
follows:
• Every router in an area has the identical
link-state database.
• Each router in the area places itself into
the root of the tree that is built.
• The best path is calculated with respect to the
lowest total cost of links to a specific destination.
• Best routes are put into the forwarding database (routing table).
SPF Calculation
Assume all links are Ethernet, with an OSPF cost of 10.
Link-State Data Structures: LSA Operation
Summary
• Link-state routing protocols respond quickly to changes,
send triggered updates when changes occur, and send
periodic updates every 30 minutes.
• A two-tier hierarchical network structure is used by OSPF in
which the network is divided into areas. This area structure
is used to separate the LSDB into more manageable sizes.
• Adjacencies are built by OSPF routers using the Hello
protocol. Over these logical adjacencies, LSUs are sent to
exchange database information between adjacent OSPF
routers.
Summary (Cont.)
• Dijkstra’s SPF algorithm is used to calculate best paths for
all destinations. SPF is run against the LSDB, and the
outcome is a table of best paths, known as the routing table.
• After an LSA entry ages, the router that originated the entry
sends an LSU about the network to verify that the link is still
active. The LSU can contain one or more LSAs.
Configuring OSPF
OSPF Packet Types
OSPF Packet Types
OSPF Packet Header Format
Neighborship: The Hello Packet
Establishing Bidirectional Communication
Discovering the Network Routes
Adding the Link-State Entries
• Router A notifies all OSPF DRs on 224.0.0.6.
• DR notifies others on 224.0.0.5.
Maintaining Routing Information
LSA Sequence Numbering
• Each LSA in the LSDB maintains a sequence number.
• The sequence numbering scheme is a 4-byte number that
begins with 0x80000001 and ends with 0x7FFFFFFF.
• OSPF floods each LSA every 30 minutes to maintain proper
database synchronization. Each time the LSA is flooded, the
sequence number is incremented by one.
• Ultimately, an LSA sequence number will wrap around to
0x80000001. When this occurs, the existing LSA is
prematurely aged to the maximum age (one hour) and
flushed.
• When a router encounters two instances of an LSA, it must
determine which is more recent. The LSA having the newer
(higher) LS a sequence number is more recent.
LSA Sequence Numbers and Maximum Age
• Every OSPF router announces a router LSA for those
interfaces that it owns in that area.
• Router with link ID 192.168.1.67 has been updated eight
times; the last update was 48 seconds ago.
RTC# show ip ospf database
OSPF Router with ID (192.168.1.67) (Process ID 10)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
192.168.1.67 192.168.1.67 48 0x80000008 0xB112 2
192.168.2.130 192.168.2.130 212 0x80000006 0x3F44 2
<output omitted>
debug ip ospf packet
R1#debug ip ospf packet
OSPF packet debugging is on
R1#
*Feb 16 11:03:51.206: OSPF: rcv. v:2 t:1 l:48 rid:10.0.0.12
aid:0.0.0.1 chk:D882 aut:0 auk: from Serial0/0/0.2
Debug of a single packet
• Shows fields in OSPF header
Summary
• There are five OSPF packet types: hello, DBD, LSU, LSR, and
LSAck.
• The Hello protocol forms logical neighbor adjacency
relationships. A DR may be required to coordinate adjacency
formations.
• The exchange protocol passes through several states
(down, init, two-way, exstart, and exchange) before finally
reaching the goal of full state. Full state means that
databases are synchronized with adjacent routers.
Summary (Cont.)
• LSAs are sent on change but are also sent every 30 minutes
to ensure database integrity. The maximum time that an LSA
will stay in the database, without an update, is 1 hour. The
LSA sequence number is incremented every time it is
advertised.
• Each LSA in the LSDB has a sequence number, which is
incremented by one each time the LSA is flooded. When a
router encounters two instances of an LSA, it must
determine which is more recent. The LSA having the newer
(higher) LSA sequence number is more recent.
• Use the debug ip ospf packet command to verify that OSPF
packets are flowing properly between two routers.
Configuring OSPF
Configuring OSPF Routing
router ospf process-id [vrf vpn-name]
Router(config)#
• Enables one or more OSPF routing processes
Configuring Basic OSPF
network ip-address wildcard-mask area area-id
Router(config-router)#
• Defines the interfaces that OSPF will run on
Router(config-if)#
ip ospf process-id area area-id [secondaries none]
• Optional method to enable OSPF explicitly on an interface
Configuring OSPF on Internal Routers of a
Single Area
Configuring OSPF for Multiple Areas
OSPF Router ID
• The router is known to OSPF by the OSPF router ID number.
• LSDBs use the OSPF router ID to differentiate one router from the
next.
• By default, the router ID is the highest IP address on an active
interface at the moment of OSPF process startup.
• A loopback interface can override the OSPF router ID. If a loopback
interface exists, the router ID is the highest IP address on any active
loopback interface.
• The OSPF router-id command can be used to override the OSPF
router ID.
• Using a loopback interface or a router-id command is recommended
for stability.
Router(config)#interface loopback 0
Router(config-if)#ip address 172.16.17.5 255.255.255.255
• If the OSPF process is already running, the router must be
reloaded or the OSPF process must be removed and
reconfigured before the new loopback address will take effect.
Loopback Interfaces
router-id ip-address
• This command is configured under the router ospf [process-id]
command.
• Any unique arbitrary 32-bit value in an IP address format
(dotted decimal) can be used.
• If this command is used on an OSPF process that is already
active, then the new router ID is used after the next reload or
manual OSPF process restart using:
OSPF router-id Command
Router(config-router)#
Router(config)#router ospf 1
Router(config-router)#router-id 172.16.1.1
Router#clear ip ospf process
clear ip ospf process
Router#
OSPF Router ID Verification
RouterB#sh ip ospf
Routing Process "ospf 50" with ID 10.64.0.2
<output omitted>
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
Area BACKBONE(0)
Area BACKBONE(0)
Area has no authentication
SPF algorithm last executed 00:01:25.028 ago
SPF algorithm executed 7 times
<output omitted>
Area 1
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:00:54.636 ago
SPF algorithm executed 3 times
<output omitted>
show ip protocols
Router#
• Verifies the configured IP routing protocol processes,
parameters, and statistics
Verifying OSPF Operation
show ip route ospf [process-id ]
Router#
• Displays all OSPF routes learned by the router
show ip ospf interface [type number]
Router#
• Displays the OSPF router ID, area ID, and adjacency information
show ip ospf
Router#
• Displays the OSPF router ID, timers, and statistics
Verifying OSPF Operation (Cont.)
show ip ospf neighbor [type number] [neighbor-id]
[detail]
Router#
• Displays information about the OSPF neighbors, including DR
and BDR information on broadcast networks
Example: The show ip route ospf Command
RouterA#show ip route ospf
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O IA 10.2.1.0/24 [110/782] via 10.64.0.2, 00:03:05, FastEthernet0/0
RouterA#
Example: The show ip ospf interface
Command
RouterA#show ip ospf interface fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 10.64.0.1/24, Area 0
Process ID 1, Router ID 10.64.0.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROTHER, Priority 0
Designated Router (ID) 10.64.0.2, Interface address 10.64.0.2
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:04
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 4
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.64.0.2 (Designated Router)
Suppress hello for 0 neighbor(s)
Example: The show ip ospf neighbor
Command
RouterB# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.64.0.1 0 FULL/DROTHER 00:00:30 10.64.0.1 FastEthernet0/0
10.2.1.1 0 FULL/ - 00:00:34 10.2.1.1 Serial0/0/1
RouterB# show ip ospf neighbor detail
Neighbor 10.64.0.1, interface address 10.64.0.1
In the area 0 via interface FastEthernet0/0
Neighbor priority is 0, State is FULL, 16 state changes
DR is 10.64.0.2 BDR is 0.0.0.0
<output omitted>
Neighbor 10.2.1.1, interface address 10.2.1.1
In the area 1 via interface Serial0/0/1
Neighbor priority is 0, State is FULL, 6 state changes
DR is 0.0.0.0 BDR is 0.0.0.0
<output omitted>
Summary
• Configuration of OSPF is a two-step process:
– Enter OSPF configuration with the router ospf command.
– Use the network command to describe which interfaces will run OSPF in
which area.
• OSPF selects a router ID at startup time:
– The router ID’s specified in the router-id command under the OSPF process.
– Otherwise, the highest IP address of a loopback interface, if there are any,
is used.
– By default, the highest IP address of all active interfaces
• Use the show ip ospf command to verify the router ID.
• Use the show ip protocols, show ip route ospf, show ip ospf interface, show ip ospf,
and show ip ospf neighbor commands to verify OSPF operation.
Configuring OSPF
OSPF Network Types
OSPF Network Types
The three types of networks defined by OSPF are:
• Point-to-point: A network that joins a single pair of routers.
• Broadcast: A multiaccess broadcast network, such as
Ethernet.
• Nonbroadcast multiaccess (also called NBMA): A network
that interconnects more than two routers but that has no
broadcast capability. Frame Relay, ATM, and X.25 are
examples of NBMA networks.
– Five modes of OSPF operation are available for NBMA
networks.
Point-to-Point Links
• Usually a serial interface running either PPP or HDLC.
• May also be a point-to-point subinterface running Frame
Relay or ATM.
• No DR or BDR election required.
• OSPF autodetects this interface type.
• OSPF packets are sent using multicast 224.0.0.5.
Multiaccess Broadcast Network
• Generally these are, LAN technologies like Ethernet and
Token Ring.
• DR and BDR selection are required.
• All neighbor routers form full adjacencies with the DR and
BDR only.
• Packets to the DR and the BDR use 224.0.0.6.
• Packets from DR to all other routers use 224.0.0.5.
Electing the DR and BDR
• Hello packets are exchanged via IP multicast.
• The router with the highest OSPF priority is selected as
the DR. The router with the second-highest priority value is
the BDR.
• Use the OSPF router ID as the tiebreaker.
• The DR election is nonpreemptive.
Setting Priority for DR Election
• This interface configuration command assigns the OSPF
priority to an interface.
• Different interfaces on a router may be assigned different
values.
• The default priority is 1. The range is from 0 to 255.
• 0 means the router cannot be the DR or BDR.
• A router that is not the DR or BDR is DROTHER.
ip ospf priority number
Router(config-if)#
NBMA Topology
• A single interface interconnects multiple sites.
• NBMA topologies support multiple routers, but without
broadcasting capabilities.
DR Election in NBMA Topology
• OSPF considers NBMA to be like other broadcast media.
• The DR and BDR need to have fully meshed connectivity with
all other routers, but NBMA networks are not always fully
meshed.
• The DR and BDR need a list of neighbors.
• OSPF neighbors are not automatically discovered by the
router.
Frame Relay Topologies
OSPF over NBMA Topology Modes of
Operation
• RFC 2328-compliant modes are as follows:
– Nonbroadcast (NBMA)
– Point-to-multipoint
• Additional modes from Cisco are as follows:
– Point-to-multipoint nonbroadcast
– Broadcast
– Point-to-point
Selecting the OSPF Network Type for NBMA
Networks
ip ospf network [{broadcast | non-broadcast | point-to-
multipoint [non-broadcast] | point-to-point}]
• Defines OSPF network type
Router(config-if)#
Router(config)#interface serial 0/0/0
Router(config-if)#encapsulation frame-relay
Router(config-if)#ip ospf network broadcast
Example: Broadcast Mode
Nonbroadcast Mode (NBMA Mode)
• Treated as a broadcast
network by OSPF
(acts like a LAN).
• All serial ports are part of
the same IP subnet.
• Frame Relay, X.25, and
ATM networks default to
nonbroadcast mode.
• Neighbors must be
statically configured.
• Duplicates LSA updates.
• Complies with RFC 2328.
Using the neighbor Command
• Used to statically define neighbor relationships in an NBMA
network
neighbor ip-address [priority number] [poll-interval
number] [cost number] [database-filter all]
Router(config-router)#
neighbor Command Example
RouterA(config)# router ospf 100
RouterA(config-router)# network 192.168.0.0 0.0.255.255 area 0
RouterA(config-router)# neighbor 192.168.1.2 priority 0
RouterA(config-router)# neighbor 192.168.1.3 priority 0
RouterA(config-router)# network 172.16.0.0 0.0.255.255 area 0
RouterA# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.3 0 FULL/DROTHER 00:01:57 192.168.1.3 Serial0/0/0
192.168.1.2 0 FULL/DROTHER 00:01:33 192.168.1.2 Serial0/0/0
172.16.1.1 1 FULL/BDR 00:00:34 172.16.1.1 FastEthernet0/0
The show ip ospf neighbor Command
Point-to-Multipoint Mode
• The point-to-multipoint mode allows for NBMA networking.
• The point-to-multipoint mode fixes partial-mesh and star
topologies.
• No DR is required and only a single subnet is used.
• A 30-second hello is used.
• This mode is RFC 2328-compliant.
Point-to-Multipoint Configuration
interface Serial0/0/0
ip address 192.168.1.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
<output omitted>
router ospf 100
log-adjacency-changes
network 172.16.0.0 0.0.255.255 area 0
network 192.168.0.0 0.0.255.255 area 0
interface Serial0/0/0
ip address 192.168.1.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
ip ospf priority 0
Router A
Router C
Point-to-Multipoint Example
RouterA#sh ip ospf int s0/0/0
Serial0/0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0
Process ID 100, Router ID 192.168.1.1, Network Type POINT_TO_MULTIPOINT,
Cost: 781
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:26
Supports Link-local Signaling (LLS)
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 192.168.1.3
Adjacent with neighbor 192.168.1.2
Suppress hello for 0 neighbor(s)
RouterA#
Point-to-Multipoint Nonbroadcast
• Cisco extension to RFC-compliant point-to-multipoint mode
• Must statically define neighbors, like nonbroadcast mode
• Like point-to-multipoint mode, DR and BDR not elected
• Used in special cases where neighbors cannot be automatically
discovered
Using Subinterfaces
• The physical serial port becomes multiple logical ports.
• Each subinterface requires an IP subnet.
interface serial number.subinterface-number {multipoint |
point-to-point}
Router(config)#
Point-to-Point Subinterfaces
• Each PVC and SVC gets its own subinterface.
• OSPF point-to-point mode is the default on point-to-point
Frame Relay subinterfaces.
– No DR/BDR
– Do not need to configure neighbors
interface serial number.subinterface-number point-to-point
Router(config)#
Point-to-Point Subinterface Example
• PVCs are treated like point-to-point links.
• Each subinterface requires a subnet.
Multipoint Subinterfaces
• Multiple PVCs and SVCs are on a single subinterface.
• OSPF nonbroadcast mode is the default.
– DR and BDR are required.
– Neighbors need to be statically configured.
interface serial number.subinterface-number multipoint
Router(config)#
Multipoint Subinterface Example
• Single interface serial 0/0/0 has been logically separated into two subinterfaces:
one point-to-point (S0/0/0.1) and one point-to-multipoint (S0/0/0.2).
• Each subinterface requires a subnet.
• OSPF defaults to point-to-point mode on point-to-point subinterfaces.
• OSPF defaults to nonbroadcast mode on point-to-multipoint subinterfaces.
OSPF Mode
NBMA Preferred
Topology
Subnet Address
Hello
Timer
Adjacency
RFC or
Cisco
Broadcast
Full or partial
mesh
Same 10 sec
Automatic,
DR/BDR elected
Cisco
Nonbroadcast
(NBMA)
Full or partial
mesh
Same 30 sec
Manual
configuration,
DR/BDR elected
RFC
Point-to-
multipoint
Partial-mesh
or star
Same 30 Sec
Automatic,
no DR/BDR
RFC
Point-to-
multipoint
nonbroadcast
partial-mesh
or star
Same 30 sec
Manual
configuration,
no/DR/BDR
Cisco
Point-to-point
Partial-mesh or
star, using
subinterface
Different for Each
Subinterface
10 sec
Automatic,
no DR/BDR
Cisco
OSPF over NBMA Topology Summary
Creation of Adjacencies for Point-to-Point
Mode
RouterA# debug ip ospf adj
OSPF: Interface Serial0/0/0.1 going Up
OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000023
OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF0 opt 0x52 flag 0x7 len 32
mtu 1500 state INIT
OSPF: 2 Way Communication to 192.168.1.2 on Serial0/0/0.1, state 2WAY
OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xF4D opt 0x52 flag 0x7 len 32
OSPF: NBR Negotiation Done. We are the SLAVE
OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF0 opt 0x52 flag 0x2 len 132
OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF1 opt 0x52 flag 0x3 len 132
mtu 1500 state EXCHANGE
OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF1 opt 0x52 flag 0x0 len 32
OSPF: Database request to 192.168.1.2
OSPF: sent LS REQ packet to 192.168.1.2, length 12
OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF2 opt 0x52 flag 0x1 len 32
mtu 1500 state EXCHANGE
OSPF: Exchange Done with 192.168.1.2 on Serial0/0/0.1
OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF2 opt 0x52 flag 0x0 len 32
OSPF: Synchronized with 192.168.1.2 on Serial0/0/0.1, state FULL
%OSPF-5-ADJCHG: Process 100, Nbr 192.168.1.2 on Serial0/0/0.1 from LOADING to FULL,
Loading Done
OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000024
Creation of Adjacencies for Broadcast
Mode
RouterA# debug ip ospf adj
OSPF: Interface FastEthernet0/0 going Up
OSPF: Build router LSA for area 0, router ID 192.168.1.1,seq 0x80000008
OSPF: 2 Way Communication to 172.16.1.1 on FastEthernet0/0, state 2WAY
OSPF: end of Wait on interface FastEthernet0/0
<output omitted>
OSPF: Neighbor change Event on interface FastEthernet0/0
OSPF: DR/BDR election on FastEthernet0/0
OSPF: Elect BDR 172.16.1.1
OSPF: Elect DR 192.168.1.1
DR: 192.168.1.1 (Id) BDR: 172.16.1.1 (Id)
OSPF: Rcv DBD from 172.16.1.1 on FastEthernet0/0 seq 0x14B 7 opt 0x52 flag
0x7 len 32 mtu 1500 state EXSTART
OSPF: First DBD and we are not SLAVE-if)#
OSPF: Send DBD to 172.16.1.1 on FastEthernet0/0 seq 0xDCE opt 0x52 flag 0x7
len 32
OSPF: Retransmitting DBD to 172.16.1.1 on FastEthernet0/0[1]
OSPF: Rcv DBD from 172.16.1.1 on FastEthernet0/0 seq 0xDCE
opt 0x52 flag 0x2 len 152 mtu 1500 state EXSTART
<output omitted>
Summary
• OSPF defines three types of networks: point-to-point, broadcast, and
NBMA.
• On point-to-point links, adjacency is dynamic, uses multicast
addresses, and has no DR or BDR.
• On broadcast links, adjacency is dynamic and includes election of a
DR and BDR. All updates are sent to the DR, which forwards the
updates to all routers.
• The router with the highest OSPF priority is selected as
the DR. The router with the second-highest priority value is the BDR.
• By default on NBMA links, adjacency requires manual definition of
neighbors for the DR and BDR because OSPF will consider the
network similar to broadcast media.
Summary (Cont.)
• The OSPF mode of operation on Frame Relay depends on the underlying
Frame Relay network. OSPF mode options include nonbroadcast,
broadcast, point-to-multipoint, point-to-multipoint nonbroadcast, and
point-to-point.
• In nonbroadcast mode, a DR and BDR are elected, and neighbors must
be statically configured.
• In point-to-multipoint mode, no DR and BDR are needed and neighbors
are automatically discovered. In point-to-multipoint nonbroadcast mode,
no DR and BDR are needed, but neighbors must be statically
configured.
• A physical interface can be split into multiple logical interfaces called
subinterfaces. Each subinterface requires an IP subnet.
• Using the debug ip ospf adj command enables you to see OSPF packet
exchanges and the status of neighbor adjacencies.
Configuring OSPF
Link-State Advertisements
Issues with Maintaining a Large OSPF
Network
The Solution: OSPF Hierarchical Routing
• Consists of areas and autonomous systems
• Minimizes routing update traffic
Types of OSPF Routers
• Virtual links are used to connect a discontiguous area to
area 0.
• A logical connection is built between router A and router B.
• Virtual links are recommended for backup or temporary
connections.
Defining Virtual Links
Configuring Virtual Links
area area-id virtual-link router-id [authentication
[message-digest | null]] [hello-interval seconds]
[retransmit-interval seconds] [transmit-delay
seconds] [dead-interval seconds] [[authentication-
key key] | [message-digest-key key-id md5 key]]
Router(config-router)#
Creates a virtual link
remoterouter#sh ip ospf
Routing Process "ospf 1000" with ID 10.2.2.2
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an area border router
<output omitted>
OSPF Virtual Link Configuration
Example
RouterA#sh ip ospf virtual-links
Virtual Link OSPF_VL0 to router 10.2.2.2 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Serial0/0/1, Cost of using 781
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:07
Adjacency State FULL (Hello suppressed)
Index 1/2, retransmission queue length 0, number of retransmission 1
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec
RouterA#
The show ip ospf virtual-links Command
LSA Type Description
1 Router LSAs
2 Network LSAs
3 or 4 Summary LSAs
5
Autonomous system
external LSAs
6 Multicast OSPF LSA
7 Defined for not-so-stubby areas
8
External attributes LSA for
Border Gateway Protocol (BGP)
9, 10, 11 Opaque LSAs
LSA Types
LSA Type 1: Router LSA
• One router LSA (type 1) for every router in an area
– Includes list of directly attached links
– Each link identified by IP prefix assigned to link and link type
• Identified by the router ID of the originating router
• Floods within its area only; does not cross ABR
LSA Type 2: Network LSA
• One network (type 2) LSA for each transit broadcast or NBMA network in
an area
– Includes list of attached routers on the transit link
– Includes subnet mask of link
• Advertised by the DR of the broadcast network
• Floods within its area only; does not cross ABR
LSA Type 3: Summary LSA
• Type 3 LSAs are used to flood network information to areas outside the
originating area (interarea)
– Describes network number and mask of link.
• Advertised by the ABR of originating area.
• Regenerated by subsequent ABRs to flood throughout the autonomous
system.
• By default, routes are not summarized, and type 3 LSA is advertised for every
subnet.
LSA Type 4: Summary LSA
• Summary (type 4) LSAs are used to advertise an ASBR to all other areas in
the autonomous system.
• They are generated by the ABR of the originating area.
• They are regenerated by all subsequent ABRs to flood throughout the
autonomous system.
• Type 4 LSAs contain the router ID of the ASBR.
LSA Type 5: External LSA
• External (type 5) LSAs are used to advertise networks from other autonomous
systems.
• Type 5 LSAs are advertised and owned by the originating ASBR.
• Type 5 LSAs flood throughout the entire autonomous system.
• The advertising router ID (ASBR) is unchanged throughout the autonomous
system.
• Type 4 LSA is needed to find the ASBR.
• By default, routes are not summarized.
Interpreting the OSPF Database
RouterA#show ip ospf database
OSPF Router with ID (10.0.0.11) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.0.0.11 10.0.0.11 548 0x80000002 0x00401A 1
10.0.0.12 10.0.0.12 549 0x80000004 0x003A1B 1
100.100.100.100 100.100.100.100 548 0x800002D7 0x00EEA9 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
172.31.1.3 100.100.100.100 549 0x80000001 0x004EC9
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.1.0.0 10.0.0.11 654 0x80000001 0x00FB11
10.1.0.0 10.0.0.12 601 0x80000001 0x00F516
<output omitted>
Interpreting the Routing Table: Types of
Routes
Router Designator Description
O
OSPF intra-area
(router LSA) and
network LSA
• Networks from within the area of
the router
• Advertised by way of router LSAs
and network LSA
O IA
OSPF interarea
(summary LSA)
• Networks from outside the area of
the router, but within the OSPF
autonomous system
• Advertised by way of
summary LSAs
O E1 Type 1 external routes
• Networks outside of the
autonomous system of the router
• Advertised by way of external
LSAs
O E2 Type 2 external routes
Calculating Costs for E1 and E2 Routes
The show ip route Command
RouterB>show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.31.0.0/24 is subnetted, 2 subnets
O IA 172.31.2.0 [110/1563] via 10.1.1.1, 00:12:35, FastEthernet0/0
O IA 172.31.1.0 [110/782] via 10.1.1.1, 00:12:35, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 10.200.200.13/32 is directly connected, Loopback0
C 10.1.3.0/24 is directly connected, Serial0/0/0
O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:12:35, Serial0/0/0
C 10.1.1.0/24 is directly connected, FastEthernet0/0
O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:12:37, FastEthernet0/0
O E2 10.254.0.0/24 [110/50] via 10.1.1.1, 00:12:37, FastEthernet0/0
OSPF LSDB Overload Protection
• Excessive LSAs generated by other routers can drain local
router resources.
• This feature can limit the processing of non-self-generated
LSAs for a defined OSPF process.
max-lsa maximum-number [threshold-percentage] [warning-
only] [ignore-time minutes] [ignore-count count-number]
[reset-time minutes]
Router(config-router)#
ip ospf cost interface-cost
• Overrides the default cost calculation. Values from 1 to 65535
can be defined.
Changing the Cost Metric
auto-cost reference-bandwidth ref-bw
• Sets the reference bandwidth to values other than 100 Mbps
(legal values range from 1 to 4,294,967 in megabits per second).
• Dijkstra’s algorithm determines the best path by adding all link
costs along a path.
• The cost, or metric, is an indication of the overhead to send
packets over an interface. Default = (100 Mbps) / (bandwidth in
Mbps).
RouterA(config-if)#
RouterA(config-router)#
Summary
• There are four OSPF router types: internal routers, backbone routers,
ABRs, and ASBRs.
• A virtual link allows discontiguous area 0’ to be connected, or a
disconnected area to be connected to area 0, via a transit area. Virtual
links should be used only for temporary connections or backup after a
failure, not as a primary backbone design feature.
• There are 11 OSPF LSA types. The first five are the most commonly used:
– Type 1 router
– Type 2 network
– Type 3 and 4 summary
– Type 5 external
Summary (Cont.)
• In the IP routing table, OSPF routes are classified as either
intra-area, interarea, or external; external routes are
subdivided into E1 and E2.
• OSPF LSDB overload protection limits the processing of
non-self-generated LSAs.
• The OSPF cost defaults to (100 Mbps) / (bandwidth in
megabits per second). The cost can be changed on a per-
interface basis, and the reference bandwidth (100 Mbps) can
also be changed.
Configuring OSPF
OSPF Route Summarization
Benefits of Route Summarization
• Minimizes number of routing table entries
• Localizes impact of a topology change
• Reduces LSA type 3 and 5 flooding and saves CPU resources
Using Route Summarization
• Interarea summary link carries mask.
• One or more entries can represent several subnets.
area area-id range address mask [advertise | not-
advertise] [cost cost]
Router(config-router)#
• Consolidates interarea routes on an ABR
Configuring Route Summarization
summary-address ip-address mask [not-advertise] [tag tag]
Router(config-router)#
• Consolidates external routes, usually on an ASBR
Route Summarization Configuration
Example at ABR
Route Summarization Configuration
Example at ASBR
Default Routes in OSPF
• A default route is injected into OSPF as an external LSA
type 5.
• Default route distribution is not on by default; use the
default-information originate command under the OSPF routing
process.
• Normally, this command advertises a 0.0.0.0 default into the
OSPF network only if the default route already exists in the
routing table.
• The always keyword allows the 0.0.0.0 default to be advertised
even when the default route does not exist in the routing table.
default-information originate [always] [metric metric-
value] [metric-type type-value] [route-map map-name]
Router(config-router)#
Configuring OSPF Default Routes
Default Route Configuration Example
Summary
• Route summarization improves CPU utilization, reduces LSA
flooding, and reduces routing table sizes.
• The area range command is used to summarize at
the ABR. The summary-address command is used to
summarize at the ASBR.
• Default routes can be used in OSPF to prevent the need for a
specific route to all destination networks. The benefits
include a much smaller routing table and LSDB, with
complete reachability.
• OSPF uses the default-information originate command to inject
a default route.
Configuring OSPF
Configuring OSPF Special Area Types
Types of Areas
Stub and Totally Stub Area Rules
An area can be stub or totally stub if:
• There is a single ABR, or if there is more than one ABR,
suboptimal routing paths to other areas or external
autonomous systems are acceptable.
• All routers in the area are configured as stub routers.
• There is no ASBR in the area.
• The area is not area 0.
• No virtual links go through the area.
• External LSAs
are stopped.
• Default route
is advertised
into stub area
by the ABR.
• All routers in
area 50 must
be configured
as stub.
Using Stub Areas
Stub Area Configuration
area area-id stub [no-summary]
• This command turns on stub area networking.
• All routers in a stub area must use the stub command.
RouterA(config-router)#
area area-id default-cost cost
• This command defines the cost of a default route sent into the
stub area.
• The default cost is 1.
RouterA(config-router)#
OSPF Stub Area Configuration Example
• External LSAs
are stopped.
• Summary LSAs
are stopped.
• Routing table
is reduced to
a minimum.
• All routers must
be configured
as stub.
• ABR must be
configured as
totally stubby.
• This is a Cisco
proprietary
feature.
Using Totally Stubby Areas
area area-id stub no-summary
• The addition of no-summary on the ABR creates a totally stubby
area and prevents all summary LSAs from entering the stub
area.
Totally Stubby Configuration
RouterA(config-router)#
Totally Stubby Configuration Example
Routing Table in a Standard Area
P1R3#sh ip route
<output omitted>
Gateway of last resort is not set
172.31.0.0/32 is subnetted, 4 subnets
O IA 172.31.22.4 [110/782] via 10.1.1.1, 00:02:44, FastEthernet0/0
O IA 172.31.11.1 [110/1] via 10.1.1.1, 00:02:44, FastEthernet0/0
O IA 172.31.11.2 [110/782] via 10.1.3.4, 00:02:52, Serial0/0/0
[110/782] via 10.1.1.1, 00:02:52, FastEthernet0/0
O IA 172.31.11.4 [110/782] via 10.1.1.1, 00:02:44, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O 10.11.0.0/24 [110/782] via 10.1.1.1, 00:03:22, FastEthernet0/0
C 10.200.200.13/32 is directly connected, Loopback0
C 10.1.3.0/24 is directly connected, Serial0/0/0
O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:03:23, Serial0/0/0
C 10.1.1.0/24 is directly connected, FastEthernet0/0
O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:03:23, FastEthernet0/0
O E2 10.254.0.0/24 [110/50] via 10.1.1.1, 00:02:39, FastEthernet0/0
P1R3#
Routing Table in a Stub Area
P1R3#sh ip route
<output omitted>
Gateway of last resort is 10.1.1.1 to network 0.0.0.0
172.31.0.0/32 is subnetted, 4 subnets
O IA 172.31.22.4 [110/782] via 10.1.1.1, 00:01:49, FastEthernet0/0
O IA 172.31.11.1 [110/1] via 10.1.1.1, 00:01:49, FastEthernet0/0
O IA 172.31.11.2 [110/782] via 10.1.3.4, 00:01:49, Serial0/0/0
[110/782] via 10.1.1.1, 00:01:49, FastEthernet0/0
O IA 172.31.11.4 [110/782] via 10.1.1.1, 00:01:49, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O 10.11.0.0/24 [110/782] via 10.1.1.1, 00:01:50, FastEthernet0/0
C 10.200.200.13/32 is directly connected, Loopback0
C 10.1.3.0/24 is directly connected, Serial0/0/0
O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:01:50, Serial0/0/0
C 10.1.1.0/24 is directly connected, FastEthernet0/0
O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:01:50, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 10.1.1.1, 00:01:51, FastEthernet0/0
P1R3#
Routing Table in a Stub Area with
Summarization
P1R3#sh ip route
<output omitted>
Gateway of last resort is 10.1.1.1 to network 0.0.0.0
172.31.0.0/16 is variably subnetted, 2 subnets, 2 masks
O IA 172.31.22.4/32 [110/782] via 10.1.1.1, 00:13:08, FastEthernet0/0
O IA 172.31.11.0/24 [110/1] via 10.1.1.1, 00:02:39, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O 10.11.0.0/24 [110/782] via 10.1.1.1, 00:13:08, FastEthernet0/0
C 10.200.200.13/32 is directly connected, Loopback0
C 10.1.3.0/24 is directly connected, Serial0/0/0
O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:13:09, Serial0/0/0
C 10.1.1.0/24 is directly connected, FastEthernet0/0
O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:13:09, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 10.1.1.1, 00:13:09, FastEthernet0/0
P1R3#
Routing Table in a Totally Stubby Area
P1R3#sh ip route
<output omitted>
Gateway of last resort is 10.1.1.1 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O 10.11.0.0/24 [110/782] via 10.1.1.1, 00:16:53, FastEthernet0/0
C 10.200.200.13/32 is directly connected, Loopback0
C 10.1.3.0/24 is directly connected, Serial0/0/0
O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:16:53, Serial0/0/0
C 10.1.1.0/24 is directly connected, FastEthernet0/0
O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:16:53, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 10.1.1.1, 00:00:48, FastEthernet0/0
P1R3#
• NSSA breaks stub area
rules.
• ASBR (R1) is allowed in
NSSA.
• Special LSA type 7
defined, sent by ASBR.
• ABR (R2) converts LSA type 7
to LSA type 5.
• ABR sends default route into
NSSA instead of external
routes from other ASBRs.
• NSSA is an RFC addendum.
Not-So-Stubby Areas
area area-id nssa [no-redistribution] [default-
information-originate [metric metric-value] [metric-
type type-value]] [no-summary]
• Use this command instead of the area stub command to define
the area as NSSA.
• The no-summary keyword creates an NSSA totally stubby area;
this is a Cisco proprietary feature.
NSSA Configuration
RouterA(config-router)#
Example: NSSA Configuration
NSSA Totally Stubby Configuration
• NSSA totally stubby area is a Cisco proprietary feature.
show ip ospf
• Displays which areas are normal, stub, or NSSA
show Commands for Stub and NSSA
show ip ospf database
• Displays details of LSAs
show ip ospf database nssa-external
• Displays specific details of each LSA type 7 update in database
show ip route
• Displays all routes
RouterA#
RouterA#
RouterA#
RouterA#
Summary
• There are several OSPF area types: standard, backbone, stub,
totally stubby, and NSSA.
• Use the area area-id stub command to define an area as stubby.
• Use the area area-id stub command with the no-summary keyword
on the ABR only to define an area as totally stubby.
• For stub areas, external routes are not visible in the routing table,
but are accessible via the intra-area default route. For totally
stubby areas, interarea and external routes are not visible in the
routing table, but are accessible via the intra-area default route.
• Use the area area-id nssa command to define an area as NSSA.
• Use show ip ospf, show ip ospf database, show ip route commands
to verify all types of stub areas. Use the show ip ospf database
nssa-external command to display details of type 7 LSAs.
Configuring OSPF
Configuring OSPF Authentication
OSPF Authentication Types
• OSPF supports 2 types of authentication:
– Simple password (or plain text) authentication
– MD5 authentication
• Router generates and checks every OSPF packet. Router
authenticates the source of each routing update packet that
it receives.
• Configure a “key” (password); each participating neighbor
must have same key configured.
Configuring OSPF Simple Password
Authentication
ip ospf authentication-key password
Router(config-if)#
• Assigns a password to be used with neighboring routers
Router(config-if)#
ip ospf authentication [message-digest | null]
• Specifies the authentication type for an interface
(since Cisco IOS software 12.0)
Router(config-router)#
area area-id authentication [message-digest]
• Specifies the authentication type for an area (was in Cisco
IOS software before 12.0)
Example Simple Password Authentication
Configuration
Loopback 0
10.2.2.2
R2 Configuration for Simple Password
Authentication
<output omitted>
interface Loopback0
ip address 10.2.2.2 255.255.255.0
<output omitted>
interface Serial0/0/1
ip address 192.168.1.102 255.255.255.224
ip ospf authentication
ip ospf authentication-key plainpas
<output omitted>
router ospf 10
log-adjacency-changes
network 10.2.2.2 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
Verifying Simple Password Authentication
R1#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.2.2.2 0 FULL/ - 00:00:32 192.168.1.102 Serial0/0/1
R1#show ip route
<output omitted>
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 10.2.2.2/32 [110/782] via 192.168.1.102, 00:01:17, Serial0/0/1
C 10.1.1.0/24 is directly connected, Loopback0
192.168.1.0/27 is subnetted, 1 subnets
C 192.168.1.96 is directly connected, Serial0/0/1
R1#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
Configuring OSPF MD5 Authentication
ip ospf message-digest-key key-id md5 key
Router(config-if)#
• Assigns a key ID and key to be used with neighboring routers
Router(config-if)#
ip ospf authentication [message-digest | null]
• Specifies the authentication type for an interface
(since Cisco IOS software 12.0)
Router(config-router)#
area area-id authentication [message-digest]
• Specifies the authentication type for an area (was in Cisco
IOS software before 12.0)
Example MD5 Authentication Configuration
R2 Configuration for MD5 Authentication
<output omitted>
interface Loopback0
ip address 10.2.2.2 255.255.255.0
<output omitted>
interface Serial0/0/1
ip address 192.168.1.102 255.255.255.224
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 secretpass
<output omitted>
router ospf 10
log-adjacency-changes
network 10.2.2.2 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
Verifying MD5 Authentication
R1#sho ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.2.2.2 0 FULL/ - 00:00:31 192.168.1.102 Serial0/0/1
R1#show ip route
<output omitted>
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 10.2.2.2/32 [110/782] via 192.168.1.102, 00:00:37, Serial0/0/1
C 10.1.1.0/24 is directly connected, Loopback0
192.168.1.0/27 is subnetted, 1 subnets
C 192.168.1.96 is directly connected, Serial0/0/1
R1#ping 10.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms
Troubleshooting Simple Password
Authentication
R1#debug ip ospf adj
OSPF adjacency events debugging is on
R1#
<output omitted>
*Feb 17 18:42:01.250: OSPF: 2 Way Communication to 10.2.2.2 on Serial0/0/1,
state 2WAY
*Feb 17 18:42:01.250: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0x9B6 opt
0x52 flag 0x7 len 32
*Feb 17 18:42:01.262: OSPF: Rcv DBD from 10.2.2.2 on Serial0/0/1 seq 0x23ED
opt0x52 flag 0x7 len 32 mtu 1500 state EXSTART
*Feb 17 18:42:01.262: OSPF: NBR Negotiation Done. We are the SLAVE
*Feb 17 18:42:01.262: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0x23ED opt
0x52 flag 0x2 len 72
<output omitted>
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.2.2.2 0 FULL/ - 00:00:34 192.168.1.102 Serial0/0/1
debug ip ospf adj
Router#
• Displays the OSPF adjacency-related events
Troubleshooting Simple Password
Authentication Problems
R1#
*Feb 17 18:51:31.242: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 :
Mismatch Authentication type. Input packet specified type 0, we use type 1
R2#
*Feb 17 18:50:43.046: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 :
Mismatch Authentication type. Input packet specified type 1, we use type 0
Simple authentication on R1, no authentication on R2
R1#
*Feb 17 18:54:01.238: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 :
Mismatch Authentication Key - Clear Text
R2#
*Feb 17 18:53:13.050: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 :
Mismatch Authentication Key - Clear Text
Simple authentication on R1 and R2, but different
passwords
Troubleshooting MD5 Authentication
R1#debug ip ospf adj
OSPF adjacency events debugging is on
<output omitted>
*Feb 17 17:14:06.530: OSPF: Send with youngest Key 1
*Feb 17 17:14:06.546: OSPF: 2 Way Communication to 10.2.2.2 on Serial0/0/1,
state 2WAY
*Feb 17 17:14:06.546: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0xB37 opt
0x52 flag 0x7 len 32
*Feb 17 17:14:06.546: OSPF: Send with youngest Key 1
*Feb 17 17:14:06.562: OSPF: Rcv DBD from 10.2.2.2 on Serial0/0/1 seq 0x32F opt
0x52 flag 0x7 len 32 mtu 1500 state EXSTART
*Feb 17 17:14:06.562: OSPF: NBR Negotiation Done. We are the SLAVE
*Feb 17 17:14:06.562: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0x32F opt
0x52 flag 0x2 len 72
*Feb 17 17:14:06.562: OSPF: Send with youngest Key 1
<output omitted>
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.2.2.2 0 FULL/ - 00:00:35 192.168.1.102 Serial0/0/1
Troubleshooting MD5 Authentication
Problems
R1#
*Feb 17 17:56:16.530: OSPF: Send with youngest Key 1
*Feb 17 17:56:26.502: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 :
Mismatch Authentication Key - No message digest key 2 on interface
*Feb 17 17:56:26.530: OSPF: Send with youngest Key 1
R2#
*Feb 17 17:55:28.226: OSPF: Send with youngest Key 2
*Feb 17 17:55:28.286: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 :
Mismatch Authentication Key - No message digest key 1 on interface
*Feb 17 17:55:38.226: OSPF: Send with youngest Key 2
MD5 authentication on both R1 and R2, but R1 has
key 1 and R2 has key 2, both with the same
passwords:
Summary
• When authentication is configured, the router generates and
checks every OSPF packet and authenticates the source of each
routing update packet that it receives. OSPF supports two types of
authentication:
– Simple password (or plain text) authentication: The router sends
an OSPF packet and key.
– MD5 authentication: The router generates a message digest, or
hash, of the key, key ID, and message. The message digest is
sent with the packet; the key is not sent.
• To configure simple password authentication, use the ip ospf
authentication-key password command and the ip ospf authentication
command.
Summary (Cont.)
• To configure MD5 authentication, use the ip ospf message-
digest-key key-id md5 key command and the ip ospf
authentication message-digest command.
• Use show ip ospf neighbor, show ip route, and debug ip ospf adj
to verify and troubleshoot both types of authentication.
• With MD5 authentication, the debug ip ospf adj command
output indicates the key ID sent.
Module Summary
• OSPF is an open-standard link-state routing protocol, offering quick
convergence and the ability to scale large networks.
• There are five OSPF packet types: hello, DBD, LSU, LSR, and LSAck.
• Configuration of OSPF is a two-step process:
– Enter OSPF configuration with the router ospf command.
– Use the network command to describe which interfaces will run
OSPF in which area.
• OSPF defines three types of networks: point-to-point, broadcast,
and NBMA. On NBMA networks, OSPF mode options include
nonbroadcast, broadcast, point-to-multipoint, point-to-multipoint
nonbroadcast, and point-to-point.
Module Summary (Cont.)
• LSAs are the building blocks of the LSDB. There are 11 types
of OSPF LSAs.
• Route summarization reduces OSPF LSA flooding and
routing table size, which reduces memory and CPU
utilization on routers.
• Stub area techniques improve OSPF performance by
reducing the LSA flooding.
• OSPF supports two types of authentication:
– Simple password (or plain text) authentication
– MD5 authentication
BSCI30S03 OSPF open shortest path first .ppt

More Related Content

Similar to BSCI30S03 OSPF open shortest path first .ppt (20)

ospf.ppt
ospf.pptospf.ppt
ospf.ppt
parthashee3
 
Ospf
OspfOspf
Ospf
Alp isik
 
Dynamic Routing Protocol OSPF
Dynamic Routing Protocol OSPFDynamic Routing Protocol OSPF
Dynamic Routing Protocol OSPF
Atakan ATAK
 
OSPF Configuration
OSPF ConfigurationOSPF Configuration
OSPF Configuration
Hafiz Muhammad Attaullah
 
Layer3protocols
Layer3protocolsLayer3protocols
Layer3protocols
assinha
 
Ospf
 Ospf Ospf
Ospf
DeeN Mohammad
 
OSPF by Abdullah Mukhtar
OSPF by Abdullah MukhtarOSPF by Abdullah Mukhtar
OSPF by Abdullah Mukhtar
Abdullah Mukhtar
 
Allwyn ospf ppt
Allwyn ospf pptAllwyn ospf ppt
Allwyn ospf ppt
Allwyngeorge4
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
Reetesh Gupta
 
Ccna ppt1
Ccna ppt1Ccna ppt1
Ccna ppt1
AIRTEL
 
Chapter7ccna
Chapter7ccnaChapter7ccna
Chapter7ccna
ernestlithur
 
Chapter7ccna
Chapter7ccnaChapter7ccna
Chapter7ccna
robertoxe
 
Open Shortest Path First (OSPF) || 2020 || Ser-2
Open Shortest Path First (OSPF) || 2020 || Ser-2Open Shortest Path First (OSPF) || 2020 || Ser-2
Open Shortest Path First (OSPF) || 2020 || Ser-2
Nutan Singh
 
Osp fv3 cs
Osp fv3 csOsp fv3 cs
Osp fv3 cs
Fred Bovy
 
Ccna day3-140715152337-phpapp01
Ccna day3-140715152337-phpapp01Ccna day3-140715152337-phpapp01
Ccna day3-140715152337-phpapp01
Sachin Morya
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
Sabiulla Barkathullah
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
danishrafiq
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
AHMED NADIM JILANI
 
OSPF - Copie.pptx
OSPF - Copie.pptxOSPF - Copie.pptx
OSPF - Copie.pptx
MAROUANEAZZA3
 
Ospf
OspfOspf
Ospf
Sasi Reddy
 

Recently uploaded (15)

basic to advance network security concepts
basic to advance network security conceptsbasic to advance network security concepts
basic to advance network security concepts
amansinght675
 
AI REPLACING HUMANS /FATHER OF AI/BIRTH OF AI
AI REPLACING HUMANS /FATHER OF AI/BIRTH OF AIAI REPLACING HUMANS /FATHER OF AI/BIRTH OF AI
AI REPLACING HUMANS /FATHER OF AI/BIRTH OF AI
skdav34
 
Transport Conjjjjjjjjjjjjjjjjjjjjjjjsulting by Slidesgo.pptx
Transport Conjjjjjjjjjjjjjjjjjjjjjjjsulting by Slidesgo.pptxTransport Conjjjjjjjjjjjjjjjjjjjjjjjsulting by Slidesgo.pptx
Transport Conjjjjjjjjjjjjjjjjjjjjjjjsulting by Slidesgo.pptx
ssuser80a7e81
 
Unlocking the Power of SIM Card IoT Connectivity.pdf
Unlocking the Power of SIM Card IoT Connectivity.pdfUnlocking the Power of SIM Card IoT Connectivity.pdf
Unlocking the Power of SIM Card IoT Connectivity.pdf
elite virtual staffing solutions
 
Presentation About The Buttons | Selma SALTIK
Presentation About The Buttons | Selma SALTIKPresentation About The Buttons | Selma SALTIK
Presentation About The Buttons | Selma SALTIK
SELMA SALTIK
 
Networking concepts from zero to hero that covers the security aspects
Networking concepts from zero to hero that covers the security aspectsNetworking concepts from zero to hero that covers the security aspects
Networking concepts from zero to hero that covers the security aspects
amansinght675
 
All-4 Chapters-Emerging-technology-ppt.pptx
All-4 Chapters-Emerging-technology-ppt.pptxAll-4 Chapters-Emerging-technology-ppt.pptx
All-4 Chapters-Emerging-technology-ppt.pptx
beletetesfaw1
 
ARTIFICIAL INTELLIGENCE.pptx2565567765676
ARTIFICIAL INTELLIGENCE.pptx2565567765676ARTIFICIAL INTELLIGENCE.pptx2565567765676
ARTIFICIAL INTELLIGENCE.pptx2565567765676
areebaimtiazpmas
 
all Practical Project LAST summary note.docx
all Practical Project LAST summary note.docxall Practical Project LAST summary note.docx
all Practical Project LAST summary note.docx
seidjemal94
 
5 Reasons cheap WordPress hosting is costing you more | Reversed Out
5 Reasons cheap WordPress hosting is costing you more | Reversed Out5 Reasons cheap WordPress hosting is costing you more | Reversed Out
5 Reasons cheap WordPress hosting is costing you more | Reversed Out
Reversed Out Creative
 
Frontier Unlimited Internet Setup Step-by-Step Guide.pdf
Frontier Unlimited Internet Setup Step-by-Step Guide.pdfFrontier Unlimited Internet Setup Step-by-Step Guide.pdf
Frontier Unlimited Internet Setup Step-by-Step Guide.pdf
Internet Bundle Now
 
原版西班牙马拉加大学毕业证(UMA毕业证书)如何办理
原版西班牙马拉加大学毕业证(UMA毕业证书)如何办理原版西班牙马拉加大学毕业证(UMA毕业证书)如何办理
原版西班牙马拉加大学毕业证(UMA毕业证书)如何办理
Taqyea
 
HPC_Course_Presentation_No_Images included.pptx
HPC_Course_Presentation_No_Images included.pptxHPC_Course_Presentation_No_Images included.pptx
HPC_Course_Presentation_No_Images included.pptx
naziaahmadnm
 
Essential Tech Stack for Effective Shopify Dropshipping Integration.pdf
Essential Tech Stack for Effective Shopify Dropshipping Integration.pdfEssential Tech Stack for Effective Shopify Dropshipping Integration.pdf
Essential Tech Stack for Effective Shopify Dropshipping Integration.pdf
CartCoders
 
Cloud VPS Provider in India: The Best Hosting Solution for Your Business
Cloud VPS Provider in India: The Best Hosting Solution for Your BusinessCloud VPS Provider in India: The Best Hosting Solution for Your Business
Cloud VPS Provider in India: The Best Hosting Solution for Your Business
DanaJohnson510230
 
basic to advance network security concepts
basic to advance network security conceptsbasic to advance network security concepts
basic to advance network security concepts
amansinght675
 
AI REPLACING HUMANS /FATHER OF AI/BIRTH OF AI
AI REPLACING HUMANS /FATHER OF AI/BIRTH OF AIAI REPLACING HUMANS /FATHER OF AI/BIRTH OF AI
AI REPLACING HUMANS /FATHER OF AI/BIRTH OF AI
skdav34
 
Transport Conjjjjjjjjjjjjjjjjjjjjjjjsulting by Slidesgo.pptx
Transport Conjjjjjjjjjjjjjjjjjjjjjjjsulting by Slidesgo.pptxTransport Conjjjjjjjjjjjjjjjjjjjjjjjsulting by Slidesgo.pptx
Transport Conjjjjjjjjjjjjjjjjjjjjjjjsulting by Slidesgo.pptx
ssuser80a7e81
 
Presentation About The Buttons | Selma SALTIK
Presentation About The Buttons | Selma SALTIKPresentation About The Buttons | Selma SALTIK
Presentation About The Buttons | Selma SALTIK
SELMA SALTIK
 
Networking concepts from zero to hero that covers the security aspects
Networking concepts from zero to hero that covers the security aspectsNetworking concepts from zero to hero that covers the security aspects
Networking concepts from zero to hero that covers the security aspects
amansinght675
 
All-4 Chapters-Emerging-technology-ppt.pptx
All-4 Chapters-Emerging-technology-ppt.pptxAll-4 Chapters-Emerging-technology-ppt.pptx
All-4 Chapters-Emerging-technology-ppt.pptx
beletetesfaw1
 
ARTIFICIAL INTELLIGENCE.pptx2565567765676
ARTIFICIAL INTELLIGENCE.pptx2565567765676ARTIFICIAL INTELLIGENCE.pptx2565567765676
ARTIFICIAL INTELLIGENCE.pptx2565567765676
areebaimtiazpmas
 
all Practical Project LAST summary note.docx
all Practical Project LAST summary note.docxall Practical Project LAST summary note.docx
all Practical Project LAST summary note.docx
seidjemal94
 
5 Reasons cheap WordPress hosting is costing you more | Reversed Out
5 Reasons cheap WordPress hosting is costing you more | Reversed Out5 Reasons cheap WordPress hosting is costing you more | Reversed Out
5 Reasons cheap WordPress hosting is costing you more | Reversed Out
Reversed Out Creative
 
Frontier Unlimited Internet Setup Step-by-Step Guide.pdf
Frontier Unlimited Internet Setup Step-by-Step Guide.pdfFrontier Unlimited Internet Setup Step-by-Step Guide.pdf
Frontier Unlimited Internet Setup Step-by-Step Guide.pdf
Internet Bundle Now
 
原版西班牙马拉加大学毕业证(UMA毕业证书)如何办理
原版西班牙马拉加大学毕业证(UMA毕业证书)如何办理原版西班牙马拉加大学毕业证(UMA毕业证书)如何办理
原版西班牙马拉加大学毕业证(UMA毕业证书)如何办理
Taqyea
 
HPC_Course_Presentation_No_Images included.pptx
HPC_Course_Presentation_No_Images included.pptxHPC_Course_Presentation_No_Images included.pptx
HPC_Course_Presentation_No_Images included.pptx
naziaahmadnm
 
Essential Tech Stack for Effective Shopify Dropshipping Integration.pdf
Essential Tech Stack for Effective Shopify Dropshipping Integration.pdfEssential Tech Stack for Effective Shopify Dropshipping Integration.pdf
Essential Tech Stack for Effective Shopify Dropshipping Integration.pdf
CartCoders
 
Cloud VPS Provider in India: The Best Hosting Solution for Your Business
Cloud VPS Provider in India: The Best Hosting Solution for Your BusinessCloud VPS Provider in India: The Best Hosting Solution for Your Business
Cloud VPS Provider in India: The Best Hosting Solution for Your Business
DanaJohnson510230
 

BSCI30S03 OSPF open shortest path first .ppt

  • 3. Link-State Data Structures • Neighbor table: – Also known as the adjacency database – Contains list of recognized neighbors • Topology table: – Typically referred to as LSDB – Contains all routers and their attached links in the area or network – Identical LSDB for all routers within an area • Routing table: – Commonly named a forwarding database – Contains list of best paths to destinations
  • 4. Link-State Routing Protocols • Link-state routers recognize more information about the network than their distance vector counterparts. • Each router has a full picture of the topology. • Consequently, link-state routers tend to make more accurate decisions.
  • 5. Link-State Data Structure: Network Hierarchy • Link-state routing requires a hierachical network structure that is enforced by OSPF. • This two-level hierarchy consists of the following: – Transit area (backbone or area 0) – Regular areas (nonbackbone areas)
  • 6. OSPF area characteristics: • Minimizes routing table entries • Localizes impact of a topology change within an area • Detailed LSA flooding stops at the area boundary • Requires a hierarchical network design OSPF Areas
  • 7. • Routers A and B are backbone routers. • Backbone routers make up area 0. • Routers C, D, and E are known as area border routers (ABRs). • ABRs attach all other areas to area 0. Area Terminology
  • 8. OSPF Adjacencies • Routers discover neighbors by exchanging hello packets. • Routers declare neighbors to be up after checking certain parameters or options in the hello packet.
  • 9. Forming OSPF Adjacencies • Point-to-point WAN links: – Both neighbors become fully adjacent. • LAN links: – Neighbors form a full adjacency with the DR and BDR. – Routers maintain two-way state with the other routers (DROTHERs). • Routing updates and topology information are passed only between adjacent routers. • Once an adjacency is formed, LSDBs are synchronized by exchanging LSAs. • LSAs are flooded reliably throughout the area (or network).
  • 10. OSPF Calculation Routers find the best paths to destinations by applying Dijkstra’s SPF algorithm to the link-state database as follows: • Every router in an area has the identical link-state database. • Each router in the area places itself into the root of the tree that is built. • The best path is calculated with respect to the lowest total cost of links to a specific destination. • Best routes are put into the forwarding database (routing table).
  • 11. SPF Calculation Assume all links are Ethernet, with an OSPF cost of 10.
  • 13. Summary • Link-state routing protocols respond quickly to changes, send triggered updates when changes occur, and send periodic updates every 30 minutes. • A two-tier hierarchical network structure is used by OSPF in which the network is divided into areas. This area structure is used to separate the LSDB into more manageable sizes. • Adjacencies are built by OSPF routers using the Hello protocol. Over these logical adjacencies, LSUs are sent to exchange database information between adjacent OSPF routers.
  • 14. Summary (Cont.) • Dijkstra’s SPF algorithm is used to calculate best paths for all destinations. SPF is run against the LSDB, and the outcome is a table of best paths, known as the routing table. • After an LSA entry ages, the router that originated the entry sends an LSU about the network to verify that the link is still active. The LSU can contain one or more LSAs.
  • 22. • Router A notifies all OSPF DRs on 224.0.0.6. • DR notifies others on 224.0.0.5. Maintaining Routing Information
  • 23. LSA Sequence Numbering • Each LSA in the LSDB maintains a sequence number. • The sequence numbering scheme is a 4-byte number that begins with 0x80000001 and ends with 0x7FFFFFFF. • OSPF floods each LSA every 30 minutes to maintain proper database synchronization. Each time the LSA is flooded, the sequence number is incremented by one. • Ultimately, an LSA sequence number will wrap around to 0x80000001. When this occurs, the existing LSA is prematurely aged to the maximum age (one hour) and flushed. • When a router encounters two instances of an LSA, it must determine which is more recent. The LSA having the newer (higher) LS a sequence number is more recent.
  • 24. LSA Sequence Numbers and Maximum Age • Every OSPF router announces a router LSA for those interfaces that it owns in that area. • Router with link ID 192.168.1.67 has been updated eight times; the last update was 48 seconds ago. RTC# show ip ospf database OSPF Router with ID (192.168.1.67) (Process ID 10) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 192.168.1.67 192.168.1.67 48 0x80000008 0xB112 2 192.168.2.130 192.168.2.130 212 0x80000006 0x3F44 2 <output omitted>
  • 25. debug ip ospf packet R1#debug ip ospf packet OSPF packet debugging is on R1# *Feb 16 11:03:51.206: OSPF: rcv. v:2 t:1 l:48 rid:10.0.0.12 aid:0.0.0.1 chk:D882 aut:0 auk: from Serial0/0/0.2 Debug of a single packet • Shows fields in OSPF header
  • 26. Summary • There are five OSPF packet types: hello, DBD, LSU, LSR, and LSAck. • The Hello protocol forms logical neighbor adjacency relationships. A DR may be required to coordinate adjacency formations. • The exchange protocol passes through several states (down, init, two-way, exstart, and exchange) before finally reaching the goal of full state. Full state means that databases are synchronized with adjacent routers.
  • 27. Summary (Cont.) • LSAs are sent on change but are also sent every 30 minutes to ensure database integrity. The maximum time that an LSA will stay in the database, without an update, is 1 hour. The LSA sequence number is incremented every time it is advertised. • Each LSA in the LSDB has a sequence number, which is incremented by one each time the LSA is flooded. When a router encounters two instances of an LSA, it must determine which is more recent. The LSA having the newer (higher) LSA sequence number is more recent. • Use the debug ip ospf packet command to verify that OSPF packets are flowing properly between two routers.
  • 29. router ospf process-id [vrf vpn-name] Router(config)# • Enables one or more OSPF routing processes Configuring Basic OSPF network ip-address wildcard-mask area area-id Router(config-router)# • Defines the interfaces that OSPF will run on Router(config-if)# ip ospf process-id area area-id [secondaries none] • Optional method to enable OSPF explicitly on an interface
  • 30. Configuring OSPF on Internal Routers of a Single Area
  • 31. Configuring OSPF for Multiple Areas
  • 32. OSPF Router ID • The router is known to OSPF by the OSPF router ID number. • LSDBs use the OSPF router ID to differentiate one router from the next. • By default, the router ID is the highest IP address on an active interface at the moment of OSPF process startup. • A loopback interface can override the OSPF router ID. If a loopback interface exists, the router ID is the highest IP address on any active loopback interface. • The OSPF router-id command can be used to override the OSPF router ID. • Using a loopback interface or a router-id command is recommended for stability.
  • 33. Router(config)#interface loopback 0 Router(config-if)#ip address 172.16.17.5 255.255.255.255 • If the OSPF process is already running, the router must be reloaded or the OSPF process must be removed and reconfigured before the new loopback address will take effect. Loopback Interfaces
  • 34. router-id ip-address • This command is configured under the router ospf [process-id] command. • Any unique arbitrary 32-bit value in an IP address format (dotted decimal) can be used. • If this command is used on an OSPF process that is already active, then the new router ID is used after the next reload or manual OSPF process restart using: OSPF router-id Command Router(config-router)# Router(config)#router ospf 1 Router(config-router)#router-id 172.16.1.1 Router#clear ip ospf process clear ip ospf process Router#
  • 35. OSPF Router ID Verification RouterB#sh ip ospf Routing Process "ospf 50" with ID 10.64.0.2 <output omitted> Number of areas in this router is 2. 2 normal 0 stub 0 nssa Number of areas transit capable is 0 External flood list length 0 Area BACKBONE(0) Area BACKBONE(0) Area has no authentication SPF algorithm last executed 00:01:25.028 ago SPF algorithm executed 7 times <output omitted> Area 1 Number of interfaces in this area is 1 Area has no authentication SPF algorithm last executed 00:00:54.636 ago SPF algorithm executed 3 times <output omitted>
  • 36. show ip protocols Router# • Verifies the configured IP routing protocol processes, parameters, and statistics Verifying OSPF Operation show ip route ospf [process-id ] Router# • Displays all OSPF routes learned by the router show ip ospf interface [type number] Router# • Displays the OSPF router ID, area ID, and adjacency information
  • 37. show ip ospf Router# • Displays the OSPF router ID, timers, and statistics Verifying OSPF Operation (Cont.) show ip ospf neighbor [type number] [neighbor-id] [detail] Router# • Displays information about the OSPF neighbors, including DR and BDR information on broadcast networks
  • 38. Example: The show ip route ospf Command RouterA#show ip route ospf 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks O IA 10.2.1.0/24 [110/782] via 10.64.0.2, 00:03:05, FastEthernet0/0 RouterA#
  • 39. Example: The show ip ospf interface Command RouterA#show ip ospf interface fastEthernet 0/0 FastEthernet0/0 is up, line protocol is up Internet Address 10.64.0.1/24, Area 0 Process ID 1, Router ID 10.64.0.1, Network Type BROADCAST, Cost: 1 Transmit Delay is 1 sec, State DROTHER, Priority 0 Designated Router (ID) 10.64.0.2, Interface address 10.64.0.2 No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:04 Supports Link-local Signaling (LLS) Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 4 Last flood scan time is 0 msec, maximum is 4 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 10.64.0.2 (Designated Router) Suppress hello for 0 neighbor(s)
  • 40. Example: The show ip ospf neighbor Command RouterB# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.64.0.1 0 FULL/DROTHER 00:00:30 10.64.0.1 FastEthernet0/0 10.2.1.1 0 FULL/ - 00:00:34 10.2.1.1 Serial0/0/1 RouterB# show ip ospf neighbor detail Neighbor 10.64.0.1, interface address 10.64.0.1 In the area 0 via interface FastEthernet0/0 Neighbor priority is 0, State is FULL, 16 state changes DR is 10.64.0.2 BDR is 0.0.0.0 <output omitted> Neighbor 10.2.1.1, interface address 10.2.1.1 In the area 1 via interface Serial0/0/1 Neighbor priority is 0, State is FULL, 6 state changes DR is 0.0.0.0 BDR is 0.0.0.0 <output omitted>
  • 41. Summary • Configuration of OSPF is a two-step process: – Enter OSPF configuration with the router ospf command. – Use the network command to describe which interfaces will run OSPF in which area. • OSPF selects a router ID at startup time: – The router ID’s specified in the router-id command under the OSPF process. – Otherwise, the highest IP address of a loopback interface, if there are any, is used. – By default, the highest IP address of all active interfaces • Use the show ip ospf command to verify the router ID. • Use the show ip protocols, show ip route ospf, show ip ospf interface, show ip ospf, and show ip ospf neighbor commands to verify OSPF operation.
  • 43. OSPF Network Types The three types of networks defined by OSPF are: • Point-to-point: A network that joins a single pair of routers. • Broadcast: A multiaccess broadcast network, such as Ethernet. • Nonbroadcast multiaccess (also called NBMA): A network that interconnects more than two routers but that has no broadcast capability. Frame Relay, ATM, and X.25 are examples of NBMA networks. – Five modes of OSPF operation are available for NBMA networks.
  • 44. Point-to-Point Links • Usually a serial interface running either PPP or HDLC. • May also be a point-to-point subinterface running Frame Relay or ATM. • No DR or BDR election required. • OSPF autodetects this interface type. • OSPF packets are sent using multicast 224.0.0.5.
  • 45. Multiaccess Broadcast Network • Generally these are, LAN technologies like Ethernet and Token Ring. • DR and BDR selection are required. • All neighbor routers form full adjacencies with the DR and BDR only. • Packets to the DR and the BDR use 224.0.0.6. • Packets from DR to all other routers use 224.0.0.5.
  • 46. Electing the DR and BDR • Hello packets are exchanged via IP multicast. • The router with the highest OSPF priority is selected as the DR. The router with the second-highest priority value is the BDR. • Use the OSPF router ID as the tiebreaker. • The DR election is nonpreemptive.
  • 47. Setting Priority for DR Election • This interface configuration command assigns the OSPF priority to an interface. • Different interfaces on a router may be assigned different values. • The default priority is 1. The range is from 0 to 255. • 0 means the router cannot be the DR or BDR. • A router that is not the DR or BDR is DROTHER. ip ospf priority number Router(config-if)#
  • 48. NBMA Topology • A single interface interconnects multiple sites. • NBMA topologies support multiple routers, but without broadcasting capabilities.
  • 49. DR Election in NBMA Topology • OSPF considers NBMA to be like other broadcast media. • The DR and BDR need to have fully meshed connectivity with all other routers, but NBMA networks are not always fully meshed. • The DR and BDR need a list of neighbors. • OSPF neighbors are not automatically discovered by the router.
  • 51. OSPF over NBMA Topology Modes of Operation • RFC 2328-compliant modes are as follows: – Nonbroadcast (NBMA) – Point-to-multipoint • Additional modes from Cisco are as follows: – Point-to-multipoint nonbroadcast – Broadcast – Point-to-point
  • 52. Selecting the OSPF Network Type for NBMA Networks ip ospf network [{broadcast | non-broadcast | point-to- multipoint [non-broadcast] | point-to-point}] • Defines OSPF network type Router(config-if)# Router(config)#interface serial 0/0/0 Router(config-if)#encapsulation frame-relay Router(config-if)#ip ospf network broadcast Example: Broadcast Mode
  • 53. Nonbroadcast Mode (NBMA Mode) • Treated as a broadcast network by OSPF (acts like a LAN). • All serial ports are part of the same IP subnet. • Frame Relay, X.25, and ATM networks default to nonbroadcast mode. • Neighbors must be statically configured. • Duplicates LSA updates. • Complies with RFC 2328.
  • 54. Using the neighbor Command • Used to statically define neighbor relationships in an NBMA network neighbor ip-address [priority number] [poll-interval number] [cost number] [database-filter all] Router(config-router)#
  • 55. neighbor Command Example RouterA(config)# router ospf 100 RouterA(config-router)# network 192.168.0.0 0.0.255.255 area 0 RouterA(config-router)# neighbor 192.168.1.2 priority 0 RouterA(config-router)# neighbor 192.168.1.3 priority 0 RouterA(config-router)# network 172.16.0.0 0.0.255.255 area 0
  • 56. RouterA# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.1.3 0 FULL/DROTHER 00:01:57 192.168.1.3 Serial0/0/0 192.168.1.2 0 FULL/DROTHER 00:01:33 192.168.1.2 Serial0/0/0 172.16.1.1 1 FULL/BDR 00:00:34 172.16.1.1 FastEthernet0/0 The show ip ospf neighbor Command
  • 57. Point-to-Multipoint Mode • The point-to-multipoint mode allows for NBMA networking. • The point-to-multipoint mode fixes partial-mesh and star topologies. • No DR is required and only a single subnet is used. • A 30-second hello is used. • This mode is RFC 2328-compliant.
  • 58. Point-to-Multipoint Configuration interface Serial0/0/0 ip address 192.168.1.1 255.255.255.0 encapsulation frame-relay ip ospf network point-to-multipoint <output omitted> router ospf 100 log-adjacency-changes network 172.16.0.0 0.0.255.255 area 0 network 192.168.0.0 0.0.255.255 area 0 interface Serial0/0/0 ip address 192.168.1.3 255.255.255.0 encapsulation frame-relay ip ospf network point-to-multipoint ip ospf priority 0 Router A Router C
  • 59. Point-to-Multipoint Example RouterA#sh ip ospf int s0/0/0 Serial0/0/0 is up, line protocol is up Internet Address 192.168.1.1/24, Area 0 Process ID 100, Router ID 192.168.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 781 Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:26 Supports Link-local Signaling (LLS) Index 2/2, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 4 msec Neighbor Count is 2, Adjacent neighbor count is 2 Adjacent with neighbor 192.168.1.3 Adjacent with neighbor 192.168.1.2 Suppress hello for 0 neighbor(s) RouterA#
  • 60. Point-to-Multipoint Nonbroadcast • Cisco extension to RFC-compliant point-to-multipoint mode • Must statically define neighbors, like nonbroadcast mode • Like point-to-multipoint mode, DR and BDR not elected • Used in special cases where neighbors cannot be automatically discovered
  • 61. Using Subinterfaces • The physical serial port becomes multiple logical ports. • Each subinterface requires an IP subnet. interface serial number.subinterface-number {multipoint | point-to-point} Router(config)#
  • 62. Point-to-Point Subinterfaces • Each PVC and SVC gets its own subinterface. • OSPF point-to-point mode is the default on point-to-point Frame Relay subinterfaces. – No DR/BDR – Do not need to configure neighbors interface serial number.subinterface-number point-to-point Router(config)#
  • 63. Point-to-Point Subinterface Example • PVCs are treated like point-to-point links. • Each subinterface requires a subnet.
  • 64. Multipoint Subinterfaces • Multiple PVCs and SVCs are on a single subinterface. • OSPF nonbroadcast mode is the default. – DR and BDR are required. – Neighbors need to be statically configured. interface serial number.subinterface-number multipoint Router(config)#
  • 65. Multipoint Subinterface Example • Single interface serial 0/0/0 has been logically separated into two subinterfaces: one point-to-point (S0/0/0.1) and one point-to-multipoint (S0/0/0.2). • Each subinterface requires a subnet. • OSPF defaults to point-to-point mode on point-to-point subinterfaces. • OSPF defaults to nonbroadcast mode on point-to-multipoint subinterfaces.
  • 66. OSPF Mode NBMA Preferred Topology Subnet Address Hello Timer Adjacency RFC or Cisco Broadcast Full or partial mesh Same 10 sec Automatic, DR/BDR elected Cisco Nonbroadcast (NBMA) Full or partial mesh Same 30 sec Manual configuration, DR/BDR elected RFC Point-to- multipoint Partial-mesh or star Same 30 Sec Automatic, no DR/BDR RFC Point-to- multipoint nonbroadcast partial-mesh or star Same 30 sec Manual configuration, no/DR/BDR Cisco Point-to-point Partial-mesh or star, using subinterface Different for Each Subinterface 10 sec Automatic, no DR/BDR Cisco OSPF over NBMA Topology Summary
  • 67. Creation of Adjacencies for Point-to-Point Mode RouterA# debug ip ospf adj OSPF: Interface Serial0/0/0.1 going Up OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000023 OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF0 opt 0x52 flag 0x7 len 32 mtu 1500 state INIT OSPF: 2 Way Communication to 192.168.1.2 on Serial0/0/0.1, state 2WAY OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xF4D opt 0x52 flag 0x7 len 32 OSPF: NBR Negotiation Done. We are the SLAVE OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF0 opt 0x52 flag 0x2 len 132 OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF1 opt 0x52 flag 0x3 len 132 mtu 1500 state EXCHANGE OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF1 opt 0x52 flag 0x0 len 32 OSPF: Database request to 192.168.1.2 OSPF: sent LS REQ packet to 192.168.1.2, length 12 OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF2 opt 0x52 flag 0x1 len 32 mtu 1500 state EXCHANGE OSPF: Exchange Done with 192.168.1.2 on Serial0/0/0.1 OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF2 opt 0x52 flag 0x0 len 32 OSPF: Synchronized with 192.168.1.2 on Serial0/0/0.1, state FULL %OSPF-5-ADJCHG: Process 100, Nbr 192.168.1.2 on Serial0/0/0.1 from LOADING to FULL, Loading Done OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000024
  • 68. Creation of Adjacencies for Broadcast Mode RouterA# debug ip ospf adj OSPF: Interface FastEthernet0/0 going Up OSPF: Build router LSA for area 0, router ID 192.168.1.1,seq 0x80000008 OSPF: 2 Way Communication to 172.16.1.1 on FastEthernet0/0, state 2WAY OSPF: end of Wait on interface FastEthernet0/0 <output omitted> OSPF: Neighbor change Event on interface FastEthernet0/0 OSPF: DR/BDR election on FastEthernet0/0 OSPF: Elect BDR 172.16.1.1 OSPF: Elect DR 192.168.1.1 DR: 192.168.1.1 (Id) BDR: 172.16.1.1 (Id) OSPF: Rcv DBD from 172.16.1.1 on FastEthernet0/0 seq 0x14B 7 opt 0x52 flag 0x7 len 32 mtu 1500 state EXSTART OSPF: First DBD and we are not SLAVE-if)# OSPF: Send DBD to 172.16.1.1 on FastEthernet0/0 seq 0xDCE opt 0x52 flag 0x7 len 32 OSPF: Retransmitting DBD to 172.16.1.1 on FastEthernet0/0[1] OSPF: Rcv DBD from 172.16.1.1 on FastEthernet0/0 seq 0xDCE opt 0x52 flag 0x2 len 152 mtu 1500 state EXSTART <output omitted>
  • 69. Summary • OSPF defines three types of networks: point-to-point, broadcast, and NBMA. • On point-to-point links, adjacency is dynamic, uses multicast addresses, and has no DR or BDR. • On broadcast links, adjacency is dynamic and includes election of a DR and BDR. All updates are sent to the DR, which forwards the updates to all routers. • The router with the highest OSPF priority is selected as the DR. The router with the second-highest priority value is the BDR. • By default on NBMA links, adjacency requires manual definition of neighbors for the DR and BDR because OSPF will consider the network similar to broadcast media.
  • 70. Summary (Cont.) • The OSPF mode of operation on Frame Relay depends on the underlying Frame Relay network. OSPF mode options include nonbroadcast, broadcast, point-to-multipoint, point-to-multipoint nonbroadcast, and point-to-point. • In nonbroadcast mode, a DR and BDR are elected, and neighbors must be statically configured. • In point-to-multipoint mode, no DR and BDR are needed and neighbors are automatically discovered. In point-to-multipoint nonbroadcast mode, no DR and BDR are needed, but neighbors must be statically configured. • A physical interface can be split into multiple logical interfaces called subinterfaces. Each subinterface requires an IP subnet. • Using the debug ip ospf adj command enables you to see OSPF packet exchanges and the status of neighbor adjacencies.
  • 72. Issues with Maintaining a Large OSPF Network
  • 73. The Solution: OSPF Hierarchical Routing • Consists of areas and autonomous systems • Minimizes routing update traffic
  • 74. Types of OSPF Routers
  • 75. • Virtual links are used to connect a discontiguous area to area 0. • A logical connection is built between router A and router B. • Virtual links are recommended for backup or temporary connections. Defining Virtual Links
  • 76. Configuring Virtual Links area area-id virtual-link router-id [authentication [message-digest | null]] [hello-interval seconds] [retransmit-interval seconds] [transmit-delay seconds] [dead-interval seconds] [[authentication- key key] | [message-digest-key key-id md5 key]] Router(config-router)# Creates a virtual link remoterouter#sh ip ospf Routing Process "ospf 1000" with ID 10.2.2.2 Supports only single TOS(TOS0) routes Supports opaque LSA Supports Link-local Signaling (LLS) Supports area transit capability It is an area border router <output omitted>
  • 77. OSPF Virtual Link Configuration Example
  • 78. RouterA#sh ip ospf virtual-links Virtual Link OSPF_VL0 to router 10.2.2.2 is up Run as demand circuit DoNotAge LSA allowed. Transit area 1, via interface Serial0/0/1, Cost of using 781 Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:07 Adjacency State FULL (Hello suppressed) Index 1/2, retransmission queue length 0, number of retransmission 1 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 1, maximum is 1 Last retransmission scan time is 0 msec, maximum is 0 msec RouterA# The show ip ospf virtual-links Command
  • 79. LSA Type Description 1 Router LSAs 2 Network LSAs 3 or 4 Summary LSAs 5 Autonomous system external LSAs 6 Multicast OSPF LSA 7 Defined for not-so-stubby areas 8 External attributes LSA for Border Gateway Protocol (BGP) 9, 10, 11 Opaque LSAs LSA Types
  • 80. LSA Type 1: Router LSA • One router LSA (type 1) for every router in an area – Includes list of directly attached links – Each link identified by IP prefix assigned to link and link type • Identified by the router ID of the originating router • Floods within its area only; does not cross ABR
  • 81. LSA Type 2: Network LSA • One network (type 2) LSA for each transit broadcast or NBMA network in an area – Includes list of attached routers on the transit link – Includes subnet mask of link • Advertised by the DR of the broadcast network • Floods within its area only; does not cross ABR
  • 82. LSA Type 3: Summary LSA • Type 3 LSAs are used to flood network information to areas outside the originating area (interarea) – Describes network number and mask of link. • Advertised by the ABR of originating area. • Regenerated by subsequent ABRs to flood throughout the autonomous system. • By default, routes are not summarized, and type 3 LSA is advertised for every subnet.
  • 83. LSA Type 4: Summary LSA • Summary (type 4) LSAs are used to advertise an ASBR to all other areas in the autonomous system. • They are generated by the ABR of the originating area. • They are regenerated by all subsequent ABRs to flood throughout the autonomous system. • Type 4 LSAs contain the router ID of the ASBR.
  • 84. LSA Type 5: External LSA • External (type 5) LSAs are used to advertise networks from other autonomous systems. • Type 5 LSAs are advertised and owned by the originating ASBR. • Type 5 LSAs flood throughout the entire autonomous system. • The advertising router ID (ASBR) is unchanged throughout the autonomous system. • Type 4 LSA is needed to find the ASBR. • By default, routes are not summarized.
  • 85. Interpreting the OSPF Database RouterA#show ip ospf database OSPF Router with ID (10.0.0.11) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 10.0.0.11 10.0.0.11 548 0x80000002 0x00401A 1 10.0.0.12 10.0.0.12 549 0x80000004 0x003A1B 1 100.100.100.100 100.100.100.100 548 0x800002D7 0x00EEA9 2 Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 172.31.1.3 100.100.100.100 549 0x80000001 0x004EC9 Summary Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 10.1.0.0 10.0.0.11 654 0x80000001 0x00FB11 10.1.0.0 10.0.0.12 601 0x80000001 0x00F516 <output omitted>
  • 86. Interpreting the Routing Table: Types of Routes Router Designator Description O OSPF intra-area (router LSA) and network LSA • Networks from within the area of the router • Advertised by way of router LSAs and network LSA O IA OSPF interarea (summary LSA) • Networks from outside the area of the router, but within the OSPF autonomous system • Advertised by way of summary LSAs O E1 Type 1 external routes • Networks outside of the autonomous system of the router • Advertised by way of external LSAs O E2 Type 2 external routes
  • 87. Calculating Costs for E1 and E2 Routes
  • 88. The show ip route Command RouterB>show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 172.31.0.0/24 is subnetted, 2 subnets O IA 172.31.2.0 [110/1563] via 10.1.1.1, 00:12:35, FastEthernet0/0 O IA 172.31.1.0 [110/782] via 10.1.1.1, 00:12:35, FastEthernet0/0 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks C 10.200.200.13/32 is directly connected, Loopback0 C 10.1.3.0/24 is directly connected, Serial0/0/0 O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:12:35, Serial0/0/0 C 10.1.1.0/24 is directly connected, FastEthernet0/0 O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:12:37, FastEthernet0/0 O E2 10.254.0.0/24 [110/50] via 10.1.1.1, 00:12:37, FastEthernet0/0
  • 89. OSPF LSDB Overload Protection • Excessive LSAs generated by other routers can drain local router resources. • This feature can limit the processing of non-self-generated LSAs for a defined OSPF process. max-lsa maximum-number [threshold-percentage] [warning- only] [ignore-time minutes] [ignore-count count-number] [reset-time minutes] Router(config-router)#
  • 90. ip ospf cost interface-cost • Overrides the default cost calculation. Values from 1 to 65535 can be defined. Changing the Cost Metric auto-cost reference-bandwidth ref-bw • Sets the reference bandwidth to values other than 100 Mbps (legal values range from 1 to 4,294,967 in megabits per second). • Dijkstra’s algorithm determines the best path by adding all link costs along a path. • The cost, or metric, is an indication of the overhead to send packets over an interface. Default = (100 Mbps) / (bandwidth in Mbps). RouterA(config-if)# RouterA(config-router)#
  • 91. Summary • There are four OSPF router types: internal routers, backbone routers, ABRs, and ASBRs. • A virtual link allows discontiguous area 0’ to be connected, or a disconnected area to be connected to area 0, via a transit area. Virtual links should be used only for temporary connections or backup after a failure, not as a primary backbone design feature. • There are 11 OSPF LSA types. The first five are the most commonly used: – Type 1 router – Type 2 network – Type 3 and 4 summary – Type 5 external
  • 92. Summary (Cont.) • In the IP routing table, OSPF routes are classified as either intra-area, interarea, or external; external routes are subdivided into E1 and E2. • OSPF LSDB overload protection limits the processing of non-self-generated LSAs. • The OSPF cost defaults to (100 Mbps) / (bandwidth in megabits per second). The cost can be changed on a per- interface basis, and the reference bandwidth (100 Mbps) can also be changed.
  • 94. Benefits of Route Summarization • Minimizes number of routing table entries • Localizes impact of a topology change • Reduces LSA type 3 and 5 flooding and saves CPU resources
  • 95. Using Route Summarization • Interarea summary link carries mask. • One or more entries can represent several subnets.
  • 96. area area-id range address mask [advertise | not- advertise] [cost cost] Router(config-router)# • Consolidates interarea routes on an ABR Configuring Route Summarization summary-address ip-address mask [not-advertise] [tag tag] Router(config-router)# • Consolidates external routes, usually on an ASBR
  • 99. Default Routes in OSPF • A default route is injected into OSPF as an external LSA type 5. • Default route distribution is not on by default; use the default-information originate command under the OSPF routing process.
  • 100. • Normally, this command advertises a 0.0.0.0 default into the OSPF network only if the default route already exists in the routing table. • The always keyword allows the 0.0.0.0 default to be advertised even when the default route does not exist in the routing table. default-information originate [always] [metric metric- value] [metric-type type-value] [route-map map-name] Router(config-router)# Configuring OSPF Default Routes
  • 102. Summary • Route summarization improves CPU utilization, reduces LSA flooding, and reduces routing table sizes. • The area range command is used to summarize at the ABR. The summary-address command is used to summarize at the ASBR. • Default routes can be used in OSPF to prevent the need for a specific route to all destination networks. The benefits include a much smaller routing table and LSDB, with complete reachability. • OSPF uses the default-information originate command to inject a default route.
  • 103. Configuring OSPF Configuring OSPF Special Area Types
  • 105. Stub and Totally Stub Area Rules An area can be stub or totally stub if: • There is a single ABR, or if there is more than one ABR, suboptimal routing paths to other areas or external autonomous systems are acceptable. • All routers in the area are configured as stub routers. • There is no ASBR in the area. • The area is not area 0. • No virtual links go through the area.
  • 106. • External LSAs are stopped. • Default route is advertised into stub area by the ABR. • All routers in area 50 must be configured as stub. Using Stub Areas
  • 107. Stub Area Configuration area area-id stub [no-summary] • This command turns on stub area networking. • All routers in a stub area must use the stub command. RouterA(config-router)# area area-id default-cost cost • This command defines the cost of a default route sent into the stub area. • The default cost is 1. RouterA(config-router)#
  • 108. OSPF Stub Area Configuration Example
  • 109. • External LSAs are stopped. • Summary LSAs are stopped. • Routing table is reduced to a minimum. • All routers must be configured as stub. • ABR must be configured as totally stubby. • This is a Cisco proprietary feature. Using Totally Stubby Areas
  • 110. area area-id stub no-summary • The addition of no-summary on the ABR creates a totally stubby area and prevents all summary LSAs from entering the stub area. Totally Stubby Configuration RouterA(config-router)#
  • 112. Routing Table in a Standard Area P1R3#sh ip route <output omitted> Gateway of last resort is not set 172.31.0.0/32 is subnetted, 4 subnets O IA 172.31.22.4 [110/782] via 10.1.1.1, 00:02:44, FastEthernet0/0 O IA 172.31.11.1 [110/1] via 10.1.1.1, 00:02:44, FastEthernet0/0 O IA 172.31.11.2 [110/782] via 10.1.3.4, 00:02:52, Serial0/0/0 [110/782] via 10.1.1.1, 00:02:52, FastEthernet0/0 O IA 172.31.11.4 [110/782] via 10.1.1.1, 00:02:44, FastEthernet0/0 10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks O 10.11.0.0/24 [110/782] via 10.1.1.1, 00:03:22, FastEthernet0/0 C 10.200.200.13/32 is directly connected, Loopback0 C 10.1.3.0/24 is directly connected, Serial0/0/0 O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:03:23, Serial0/0/0 C 10.1.1.0/24 is directly connected, FastEthernet0/0 O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:03:23, FastEthernet0/0 O E2 10.254.0.0/24 [110/50] via 10.1.1.1, 00:02:39, FastEthernet0/0 P1R3#
  • 113. Routing Table in a Stub Area P1R3#sh ip route <output omitted> Gateway of last resort is 10.1.1.1 to network 0.0.0.0 172.31.0.0/32 is subnetted, 4 subnets O IA 172.31.22.4 [110/782] via 10.1.1.1, 00:01:49, FastEthernet0/0 O IA 172.31.11.1 [110/1] via 10.1.1.1, 00:01:49, FastEthernet0/0 O IA 172.31.11.2 [110/782] via 10.1.3.4, 00:01:49, Serial0/0/0 [110/782] via 10.1.1.1, 00:01:49, FastEthernet0/0 O IA 172.31.11.4 [110/782] via 10.1.1.1, 00:01:49, FastEthernet0/0 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks O 10.11.0.0/24 [110/782] via 10.1.1.1, 00:01:50, FastEthernet0/0 C 10.200.200.13/32 is directly connected, Loopback0 C 10.1.3.0/24 is directly connected, Serial0/0/0 O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:01:50, Serial0/0/0 C 10.1.1.0/24 is directly connected, FastEthernet0/0 O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:01:50, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 10.1.1.1, 00:01:51, FastEthernet0/0 P1R3#
  • 114. Routing Table in a Stub Area with Summarization P1R3#sh ip route <output omitted> Gateway of last resort is 10.1.1.1 to network 0.0.0.0 172.31.0.0/16 is variably subnetted, 2 subnets, 2 masks O IA 172.31.22.4/32 [110/782] via 10.1.1.1, 00:13:08, FastEthernet0/0 O IA 172.31.11.0/24 [110/1] via 10.1.1.1, 00:02:39, FastEthernet0/0 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks O 10.11.0.0/24 [110/782] via 10.1.1.1, 00:13:08, FastEthernet0/0 C 10.200.200.13/32 is directly connected, Loopback0 C 10.1.3.0/24 is directly connected, Serial0/0/0 O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:13:09, Serial0/0/0 C 10.1.1.0/24 is directly connected, FastEthernet0/0 O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:13:09, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 10.1.1.1, 00:13:09, FastEthernet0/0 P1R3#
  • 115. Routing Table in a Totally Stubby Area P1R3#sh ip route <output omitted> Gateway of last resort is 10.1.1.1 to network 0.0.0.0 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks O 10.11.0.0/24 [110/782] via 10.1.1.1, 00:16:53, FastEthernet0/0 C 10.200.200.13/32 is directly connected, Loopback0 C 10.1.3.0/24 is directly connected, Serial0/0/0 O 10.1.2.0/24 [110/782] via 10.1.3.4, 00:16:53, Serial0/0/0 C 10.1.1.0/24 is directly connected, FastEthernet0/0 O 10.1.0.0/24 [110/782] via 10.1.1.1, 00:16:53, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 10.1.1.1, 00:00:48, FastEthernet0/0 P1R3#
  • 116. • NSSA breaks stub area rules. • ASBR (R1) is allowed in NSSA. • Special LSA type 7 defined, sent by ASBR. • ABR (R2) converts LSA type 7 to LSA type 5. • ABR sends default route into NSSA instead of external routes from other ASBRs. • NSSA is an RFC addendum. Not-So-Stubby Areas
  • 117. area area-id nssa [no-redistribution] [default- information-originate [metric metric-value] [metric- type type-value]] [no-summary] • Use this command instead of the area stub command to define the area as NSSA. • The no-summary keyword creates an NSSA totally stubby area; this is a Cisco proprietary feature. NSSA Configuration RouterA(config-router)#
  • 119. NSSA Totally Stubby Configuration • NSSA totally stubby area is a Cisco proprietary feature.
  • 120. show ip ospf • Displays which areas are normal, stub, or NSSA show Commands for Stub and NSSA show ip ospf database • Displays details of LSAs show ip ospf database nssa-external • Displays specific details of each LSA type 7 update in database show ip route • Displays all routes RouterA# RouterA# RouterA# RouterA#
  • 121. Summary • There are several OSPF area types: standard, backbone, stub, totally stubby, and NSSA. • Use the area area-id stub command to define an area as stubby. • Use the area area-id stub command with the no-summary keyword on the ABR only to define an area as totally stubby. • For stub areas, external routes are not visible in the routing table, but are accessible via the intra-area default route. For totally stubby areas, interarea and external routes are not visible in the routing table, but are accessible via the intra-area default route. • Use the area area-id nssa command to define an area as NSSA. • Use show ip ospf, show ip ospf database, show ip route commands to verify all types of stub areas. Use the show ip ospf database nssa-external command to display details of type 7 LSAs.
  • 123. OSPF Authentication Types • OSPF supports 2 types of authentication: – Simple password (or plain text) authentication – MD5 authentication • Router generates and checks every OSPF packet. Router authenticates the source of each routing update packet that it receives. • Configure a “key” (password); each participating neighbor must have same key configured.
  • 124. Configuring OSPF Simple Password Authentication ip ospf authentication-key password Router(config-if)# • Assigns a password to be used with neighboring routers Router(config-if)# ip ospf authentication [message-digest | null] • Specifies the authentication type for an interface (since Cisco IOS software 12.0) Router(config-router)# area area-id authentication [message-digest] • Specifies the authentication type for an area (was in Cisco IOS software before 12.0)
  • 125. Example Simple Password Authentication Configuration Loopback 0 10.2.2.2
  • 126. R2 Configuration for Simple Password Authentication <output omitted> interface Loopback0 ip address 10.2.2.2 255.255.255.0 <output omitted> interface Serial0/0/1 ip address 192.168.1.102 255.255.255.224 ip ospf authentication ip ospf authentication-key plainpas <output omitted> router ospf 10 log-adjacency-changes network 10.2.2.2 0.0.0.0 area 0 network 192.168.1.0 0.0.0.255 area 0
  • 127. Verifying Simple Password Authentication R1#sh ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.2.2.2 0 FULL/ - 00:00:32 192.168.1.102 Serial0/0/1 R1#show ip route <output omitted> Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks O 10.2.2.2/32 [110/782] via 192.168.1.102, 00:01:17, Serial0/0/1 C 10.1.1.0/24 is directly connected, Loopback0 192.168.1.0/27 is subnetted, 1 subnets C 192.168.1.96 is directly connected, Serial0/0/1 R1#ping 10.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
  • 128. Configuring OSPF MD5 Authentication ip ospf message-digest-key key-id md5 key Router(config-if)# • Assigns a key ID and key to be used with neighboring routers Router(config-if)# ip ospf authentication [message-digest | null] • Specifies the authentication type for an interface (since Cisco IOS software 12.0) Router(config-router)# area area-id authentication [message-digest] • Specifies the authentication type for an area (was in Cisco IOS software before 12.0)
  • 129. Example MD5 Authentication Configuration
  • 130. R2 Configuration for MD5 Authentication <output omitted> interface Loopback0 ip address 10.2.2.2 255.255.255.0 <output omitted> interface Serial0/0/1 ip address 192.168.1.102 255.255.255.224 ip ospf authentication message-digest ip ospf message-digest-key 1 md5 secretpass <output omitted> router ospf 10 log-adjacency-changes network 10.2.2.2 0.0.0.0 area 0 network 192.168.1.0 0.0.0.255 area 0
  • 131. Verifying MD5 Authentication R1#sho ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.2.2.2 0 FULL/ - 00:00:31 192.168.1.102 Serial0/0/1 R1#show ip route <output omitted> Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks O 10.2.2.2/32 [110/782] via 192.168.1.102, 00:00:37, Serial0/0/1 C 10.1.1.0/24 is directly connected, Loopback0 192.168.1.0/27 is subnetted, 1 subnets C 192.168.1.96 is directly connected, Serial0/0/1 R1#ping 10.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms
  • 132. Troubleshooting Simple Password Authentication R1#debug ip ospf adj OSPF adjacency events debugging is on R1# <output omitted> *Feb 17 18:42:01.250: OSPF: 2 Way Communication to 10.2.2.2 on Serial0/0/1, state 2WAY *Feb 17 18:42:01.250: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0x9B6 opt 0x52 flag 0x7 len 32 *Feb 17 18:42:01.262: OSPF: Rcv DBD from 10.2.2.2 on Serial0/0/1 seq 0x23ED opt0x52 flag 0x7 len 32 mtu 1500 state EXSTART *Feb 17 18:42:01.262: OSPF: NBR Negotiation Done. We are the SLAVE *Feb 17 18:42:01.262: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0x23ED opt 0x52 flag 0x2 len 72 <output omitted> R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.2.2.2 0 FULL/ - 00:00:34 192.168.1.102 Serial0/0/1 debug ip ospf adj Router# • Displays the OSPF adjacency-related events
  • 133. Troubleshooting Simple Password Authentication Problems R1# *Feb 17 18:51:31.242: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 : Mismatch Authentication type. Input packet specified type 0, we use type 1 R2# *Feb 17 18:50:43.046: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 : Mismatch Authentication type. Input packet specified type 1, we use type 0 Simple authentication on R1, no authentication on R2 R1# *Feb 17 18:54:01.238: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 : Mismatch Authentication Key - Clear Text R2# *Feb 17 18:53:13.050: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 : Mismatch Authentication Key - Clear Text Simple authentication on R1 and R2, but different passwords
  • 134. Troubleshooting MD5 Authentication R1#debug ip ospf adj OSPF adjacency events debugging is on <output omitted> *Feb 17 17:14:06.530: OSPF: Send with youngest Key 1 *Feb 17 17:14:06.546: OSPF: 2 Way Communication to 10.2.2.2 on Serial0/0/1, state 2WAY *Feb 17 17:14:06.546: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0xB37 opt 0x52 flag 0x7 len 32 *Feb 17 17:14:06.546: OSPF: Send with youngest Key 1 *Feb 17 17:14:06.562: OSPF: Rcv DBD from 10.2.2.2 on Serial0/0/1 seq 0x32F opt 0x52 flag 0x7 len 32 mtu 1500 state EXSTART *Feb 17 17:14:06.562: OSPF: NBR Negotiation Done. We are the SLAVE *Feb 17 17:14:06.562: OSPF: Send DBD to 10.2.2.2 on Serial0/0/1 seq 0x32F opt 0x52 flag 0x2 len 72 *Feb 17 17:14:06.562: OSPF: Send with youngest Key 1 <output omitted> R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.2.2.2 0 FULL/ - 00:00:35 192.168.1.102 Serial0/0/1
  • 135. Troubleshooting MD5 Authentication Problems R1# *Feb 17 17:56:16.530: OSPF: Send with youngest Key 1 *Feb 17 17:56:26.502: OSPF: Rcv pkt from 192.168.1.102, Serial0/0/1 : Mismatch Authentication Key - No message digest key 2 on interface *Feb 17 17:56:26.530: OSPF: Send with youngest Key 1 R2# *Feb 17 17:55:28.226: OSPF: Send with youngest Key 2 *Feb 17 17:55:28.286: OSPF: Rcv pkt from 192.168.1.101, Serial0/0/1 : Mismatch Authentication Key - No message digest key 1 on interface *Feb 17 17:55:38.226: OSPF: Send with youngest Key 2 MD5 authentication on both R1 and R2, but R1 has key 1 and R2 has key 2, both with the same passwords:
  • 136. Summary • When authentication is configured, the router generates and checks every OSPF packet and authenticates the source of each routing update packet that it receives. OSPF supports two types of authentication: – Simple password (or plain text) authentication: The router sends an OSPF packet and key. – MD5 authentication: The router generates a message digest, or hash, of the key, key ID, and message. The message digest is sent with the packet; the key is not sent. • To configure simple password authentication, use the ip ospf authentication-key password command and the ip ospf authentication command.
  • 137. Summary (Cont.) • To configure MD5 authentication, use the ip ospf message- digest-key key-id md5 key command and the ip ospf authentication message-digest command. • Use show ip ospf neighbor, show ip route, and debug ip ospf adj to verify and troubleshoot both types of authentication. • With MD5 authentication, the debug ip ospf adj command output indicates the key ID sent.
  • 138. Module Summary • OSPF is an open-standard link-state routing protocol, offering quick convergence and the ability to scale large networks. • There are five OSPF packet types: hello, DBD, LSU, LSR, and LSAck. • Configuration of OSPF is a two-step process: – Enter OSPF configuration with the router ospf command. – Use the network command to describe which interfaces will run OSPF in which area. • OSPF defines three types of networks: point-to-point, broadcast, and NBMA. On NBMA networks, OSPF mode options include nonbroadcast, broadcast, point-to-multipoint, point-to-multipoint nonbroadcast, and point-to-point.
  • 139. Module Summary (Cont.) • LSAs are the building blocks of the LSDB. There are 11 types of OSPF LSAs. • Route summarization reduces OSPF LSA flooding and routing table size, which reduces memory and CPU utilization on routers. • Stub area techniques improve OSPF performance by reducing the LSA flooding. • OSPF supports two types of authentication: – Simple password (or plain text) authentication – MD5 authentication

Editor's Notes

  • #138: Lesson Aim <Enter lesson aim here.>
  • #139: Lesson Aim <Enter lesson aim here.>