Introduction about single area OSPF
Trang 1
UNIVERSITY OF SCIENCE, HOCHIMINH CITY, VIETNAM ELECTRONICS AND TELECOMMUNICATION FACULTY Networking
CHAPTER
Tnstructor: Nguyen Vĩ la
Trang 2Chapter 8
1 Characteristics of OSPF
2 Configuring Single-area OSPFv2
3 Configure Single-area OSPFv3
OSPF Area 0
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam Là
Trang 3hapter 8: Objectives
After completing this chapter, you will be able to:
Explain the process by which link-state routers learn about other networks
Describe the types of packets used by Cisco IOS routers to establish and maintain
an OSPF network
Explain how Cisco IOS routers achieve convergence in an OSPF network
Configure an OSPF router ID
Configure single-area OSPF v2 in a small, routed IPv4 network
Explain how OSPF uses cost to determine best path
Verify single-area OSPFv2 in a small, routed network
Compare the characteristics and operations of OSPFv2 to OSPFv3
Configure single-area OSPFv3 in a small, routed network
Verify single-area OSPFV3 in a small, routed network
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam ry
Trang 6Features of OSPF
updates
OSPF Features
Trang 8Components of OSPF
s» Data Structures
Adjacency Neighbor + List of all neighbor routers to which a router
Database Table has established bidirectional communication
+ This table is unique for each router
+ Can be viewed using the show ip ospf neighbor command
Link-state Topology Lists information about all other routers in the
(LSDB) + The database represents the network topology
+ Allrouters within an area have identical LSDB
+ Can be viewed using the show ip ospf
database command
Forwarding Routing + List of routes generated when an algorithm is
Database Table run on the link-state database
+ Each router’s routing table is unique and
contains information on how and where to
send packets to other routers
+ Can be viewed using the show ip route
command
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam
Trang 9Components of OSPF
+ Routing Protocol Messages:
o OSPF exchanges messages to convey routing information
using five types of packets
Ded tees Dee PS 000cc)
Trang 112 Single-area and Multiarea OSPF
Area 0 is also called the backbone area
gle-Area OSPF is useful in smaller networks with few routers
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam ca
Trang 12
Multiarea OSPF
Area 1 Area 0 Area 51
Implemented using a two-layer area hierarchy as all areas must connect to the backbone area (area 0)
Interconnecting routers are called Area Border Routers (ABRs)
Useful in larger network deployments to reduce processing and memory overhead
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 12
Trang 13
Single-area and Multiarea OSPF Multiarea OSPF have these advantages:
o Smaller routing tables - Fewer routing table entries
o Reduced link-state update overhead - Minimizes
processing and memory requirements
o Reduced frequency of SPF calculations - Localizes the impact of a topology change within an area
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 13
Trang 14
Link Change Impacts Local Area Only
Area 1 Area 0 Area 51
Link failure affects the local area only (area 51)
The ABR (R2) isolates the fault to area 51 only
Routers in areas 0 and 1 do not need to run the SPF algorithm
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 14
Trang 15Identify OSPF Features and Terminology
Trang 161 Characteristics of OSPF
OSPF Messages
Trang 17Encapsulating OSPF Messages
Data Link Frame OSPF Packet OSPF Packet Type- Header IP Packet Header Header Specific Database
Data Link Frame (Ethernet Fields shown here)
MAC Destination Address = Multicast: 01-00-5E-00-00-05 or 01-00-5E-00-00-06
MAC Source Address = Address of sending interface
IP Packet
IP Source Address = Address of sending interface
IP Destination Address = Multicast: 224.0.0.5 or 224.0.0.6
Protocol Field = 89 for OSPF
OSPF Packet Header Type code for OSPF Packet type Router ID and Area ID
OSPF Packet Types
0x01 Hello 0x02 Database
Description (DD) 0X03 Link State Request
0X04 Link State Update
0X05 Link State
Acknowledgment
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 7
Trang 18Types of OSPF Packets
Packet Name
adjacencies between them
synchronization between routers
records from router to router
Trang 19OSPF Hello Packets)
¢ Discover OSPF neighbors and establish neighbor adjacencies
e Advertise parameters on which two routers must agree to become neighbors
e Elect the Designated Router and Backup Designated Router
on multi-access networks such as Ethernet and Frame Relay
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 19
Trang 20Hello Packet
Data Link Frame IP Packet Header OSPF Packet Header OSPF Packet Type-Specific Data
Hello interval Option Router Priority
OSPF Hello Router Dead interval
Packatia) Designated Router (DR)
Backup Designated Router (BDR)
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 20
Trang 21Hello Packet
Data Link Frame IP Packet Header OSPF Packet Header OSPF Packet Type-Specific Data
_OSPF Packet Type: Hello (1), DD (2), LS Request (3), LS
Backup Designated Router (BDR)
Trang 22Data Link Frame
Hello Interval Option Router Priority
Router Dead Interval Designated Router (DR}
Backup Designated Router (BDR)
List of Neighbor(s}
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam
22
Trang 23Hello Packet
Data Link Frame IP Packet Header OSPF Packet Header OSPF Packet Type-Specific Data
Version 1ype= Area from which the packet originated
Backup Designated Router (BDR)
List of Neighboris)
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 23
Trang 24Data Link Frame
Router Dead Interval Designated Router (DR}
Backup Designated Router (BDR)
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam
Trang 25Hello Interval Option Router Priority
OSPF Hello Router Dead Interval
Packatia) Designated Router (DR)
Backup Designated Router (BDR)
ee treatin Miter Aesth LC es unrest
Trang 26Hello Packet
Data Link Frame IP Packet Header OSPF Packet Header OSPF Packet Type-Specific Data
_ Usedin DR/BDR election (discussed later) |
Hello Interval Router Priority OSPF Hello Router Dead interval
Backup Designated Router (BDR)
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 26
Trang 27Hello Packet
Data Link Frame IP Packet Header OSPF Packet Header OSPF Packet Type-Specific Data
OSPF Hello ee an Router iD of the DR, ifany #
Packatia) Designatea Router (DR)
Backup Designated Router (BDR)
Trang 28Hello Packet
Data Link Frame IP Packet Header OSPF Packet Header OSPF Packet Type-Specific Data
OSPF Hello Router ID of the BDR, if any |
Backup Designated Router (BDR)
List of Neighbor(s}
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam
Trang 29Hello Packet
Data Link Frame IP Packet Header OSPF Packet Header OSPF Packet Type-Specific Data
Trang 30Hello Packet Intervals
10.5.0.0/16
1020016@ fy 10.9.0.0/16 10.1.0.016 10.11.00/16
Trang 31Hello Packet Intervals
10.5.0.0/16
fy 10.9.0.0/16 10.1.0.016 10.11.00/16
104.00/16 SŠ
10800116
¢ The OSPF Dead interval is the period, expressed in seconds, that the router will wait to receive a Hello packet before declaring the neighbor “down.”
¢ Cisco uses a default of four times the Hello interval
= 40 seconds for multi-access and point-to-point links
= 120 seconds for NBMA networks
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam
Trang 32Link-State Updates
1 Hello Discovers neighbors and builds adjacencies between them
2 DBD Checks for database synchronization between routers
3 LSR Requests specific link-state records from router to router
6 Multicast OSPF LSAs
i Defined for Not-So-Stubby Areas
8 External Attributes LSA for Border
Gateway Protocol (BGP) Opaque LSAs
v OSPFv3 renamed several of these LSAs and also contains two additional LSAs
LSA: Link-State Advertisements
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam vn
Trang 33Identify the OSPF Packet Types
c
Trang 341 Characteristics of OSPF
OSPF Operation
nh ES
Trang 35OSPF Operational States
“ When an OSPF router is initially connected to a network,
it attempts to:
= Create adjacencies with neighbors
= Exchange routing information
= Calculate the best routes
= Reach convergence
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam
Trang 36OSPF Operational States
Down State Down State
+ No Hello packets received =
Establish Down
Trang 37Establish * Hello packets are received from
Trang 39OSPF Operational States @
+ The master initiates the DBD packet exchange
Trang 40OSPF Operational States @
Synchronize + Routers exchange DBD packets
+ If additional router information is
Loading; otherwise, transition to Full
Trang 41OSPF Operational States @
+ LSRs and LSUs are used to gain
additional route information
Loading State + Routes are processed using the
Trang 42ees Routers have converged
ee treatin Miter Aesth LC es unrest
University of Science, Ho Chi Minh City, Vietnam C7
Trang 43Establish Neighbor Adjacencies
s* The OSPF router ID is used by the OSPF process to uniquely identify each router in the OSPF area
“+ A router ID is an IP address assigned to identify a specific
router among OSPF peers
Trang 44Establish Neighbor Adjacencies
s* R2 receives the Hello packet from R1 and adds the R1 router
ID to its neighbor list
“* R2 then sends a Hello packet to R1
Trang 45
Establish Neighbor Adjacencies
s*1If the two adjacent neighbors are interconnected over a point-to-point link, then they immediately transition from the Two-Way state to the database synchronization phase
“If the routers are interconnected over a common Ethernet network, then a designated router DR and a BDR must be
Trang 46Establish Neighbor Adjacencies
R2 has a default priority
of 1 and the highest
R1 has a default priority
of 1 and the second
highest router ID It will
be the BDR on this link
router ID It will be the DR
Trang 47>» Extensive flooding of LSAs
Broadcast Multiaccess Network
Trang 48OSPF DR and BDR
IỀ \djacency Adjacenct bs }
Adjacencies n(n-1)/2
10
45
190 4,950
a network would cause the number of adjacencies to grow exponentially
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 48
Trang 49OSPF DR and BDR
initialized or when there is a change in the topology
¢ This would lead to an excessive number of LSAs
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 49
Trang 50OSPF DR and BDR
e The solution to managing
the number of adjacencies
and the flooding of LSAs
on a multi-access network
is the Designated Router
(DR)
e On multi-access networks,
OSPF elects aDR to be
distribution point for LSAs sent and received
e A Backup Designated Router (BDR) is also elected in case the
Trang 51Synchronizing OSPF Database
s* The Hello packet was used to establish neighbor adjacencies, the other four types of OSPF packets are used during the process of exchanging and synchronizing LSDBs
1 172 16.5.0/24 2
ExStart State R2 has the highest router ID,
becoming the master, and therefore it
prepares to send a LSDB in a DBD packet
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 51
Trang 52Synchronizing OSPF Database
s* When R1 receives the DBD, it performs the following actions:
o 1 It ACK the receipt of the DBD using the LSAck packet
o 2 R1 then sends DBD packets to R2
Trang 53Synchronizing OSPF Database
Trang 54Tdentify the OSPF States for Establishing Adjacency
Trang 55
2 Configuring Single-Area OSPFv2
OSPF Router ID
Trang 56OSPF Netwo
s All interfaces on routers R1, R2, and R3 (except the loopback
on R2) are within the OSPF backbone area
Note: In this topology the loopback interface is used to simulate the WAN link to the Internet
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam
Trang 57E5 Router OSPF Configuration Mode
e OSPF requires a Process ID
= Between 1 and 65,535 and chosen by the network
administrator
e The process ID is only locally significant
= Does not have to match on all OSPF routers
e For consistency, we will enable OSPF on all three routers using the same Process ID of 1
R1 (config-router) #
|Cisco Networking Academy, Electronics and Telecommunications Faculty, University of Science, Ho Chi Minh City, Vietnam 57