Sie sind auf Seite 1von 63

OSPF

Routing Protocols and Concepts – Chapter 11


Agenda

11.1 Introduction to OSPF


– Introduction, packet types & message format, OSPF
algorithm & process, AD, authentication
11.2 Basic OSPF Configuration
– Topology, router & network command, router ID,
examination & verification commands
11.3 The OSPF Metric
– Metric & modification
11.4 OSPF and Multiaccess Networks
– DR/BDR election and their use in multiaccess networks
11.5 More OSPF Configuration
– Redistributing an OSPF default route, fine-tuning
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 2
Introduction

 OSPF: a link-state, classless routing protocol


– Developed as the robust solution to overcome the RIP’s
limitation in the larger networks
• Scalability to much larger network using the concept of areas
• Fast convergence
– OSPF metric as an arbitrary value called cost
• The Cisco IOS uses bandwidth

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 3


Introduction

 Key concepts
1.Introduction to OSPF (11.1)
• Scalable,
Scalable robust link-state routing protocol
• Supports hierarchical design using multiple areas
– Reduces overhead, speeds up convergence, confines network
instability to one area, improves performance
• Build a complete topological database
• Uses Dijkstra’s SPF algorithm to build routing table
• Uses cost as metric
2.Basic OSPF configuration (11.2)
• Parameters to be configured
– Process-id, network address & wildcard-mask, area number
• Adjustable OSPF parameters
– Hello & dead interval timing, router priority, metric

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 4


Introduction

3.The OSPF metric (11.3) is cost


• Cisco IOS uses accumulated bandwidth for an entire route as the
cost
• Administrator can modify the cost of a link
4.OSPF in multi-access network (11.4)
• Use DR/BDR to reduce update packet between neighbors
• Router priority affects the process of DR/BDR election
– Administrator can adjust the router priority

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 5


Objectives

 Describe the background and basic features of OSPF


 Identify and apply the basic OSPF configuration commands
 Describe, modify and calculate the metric used by OSPF
 Describe the Designated Router/Backup Designated Router
(DR/BDR)
DR/BDR election process in multiaccess networks
 Describe the uses of additional configuration commands in
OSPF

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 6


Introduction to OSPF
11.1 Introduction to OSPF
11.1.1 Background of OSPF
11.1.2 OSPF Message Encapsulation
11.1.3 OSPF Packet Types
11.1.4 Hello Protocol
11.1.5 OSPF Link-State Updates
11.1.6 OSPF Algorithm
11.1.7 Administrative Distance
11.1.8 Authentication
11.2 Basic OSPF Configuration
11.3 The OSPF Metric
11.4 OSPF and Multiaccess Networks
11.5 More OSPF Configuration
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 7
Background of OSPF

 Began in 1987 by IETF


 1989 OSPFv1 released in RFC 1131
– This version was experimental & never deployed
 1991 OSPFv2 released in RFC 1247
 1998 OSPFv2 updated in RFC 2328
 1999 OSPFv3 for IPv6 published in RFC 2740

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 8


OSPF Message Encapsulation

Header Data

OSPF packet

Header
Header

OSPF packet
Data

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 9


OSPF Packet Types
 Packet types defined by the type code in the packet header
1. Hello packet (type=0x01)
• Establishes and maintains adjacency with other OSPF routers
2. The Database Description (DBD, DD) packet (type=0x02)
• An abbreviated list of the sending router's link-state database
• Used by receiving routers to check against the local link-state
database.
3. Link-State Request (LSR) packet (type=0x03)
• Receiving routers request more information about specific entry in
the DBD
4. Link-State Update (LSU) packet (type=0x04)
• Replies to specific LSRs or announces new information
• Contains 11 different types of Link-State Advertisements (LSAs)
5. Link-State Acknowledgement (LSAck) packet (type=0x05)
• Acknowledges the receipt of other types of OSPF packet

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 10


Hello Protocol

 Purpose of OSPF hello packet


– Ensure bi-directional communication and maintain keepalive
• Advertise parameters on which routers must agree to become
neighbors the highest ip
address configured
– Hello interval, dead interval, network type on any interface in
• Discover OSPF neighbors & establish adjacencies this router
• Elect a Designated Router (DR) and a Backup DR (BDR) used in
multi-access networks
• Type: OSPF Packet Type: Hello (1),
DBD (2), LSR (3), LSU (4), LSACK (5)
• Router ID: ID of the originating router
• Area ID: area from which the packet
originated
• Network Mask: Subnet mask
associated with the sending interface
• Hello Interval: number of seconds
between the sending router's hellos
• Router Priority: Used in DR/BDR
election
• Designated Router (DR): Router ID
of the DR, if any
• Backup Designated Router (BDR):
Router ID of the BDR, if any
• List of Neighbors: lists the OSPF
Router ID of the neighboring router(s)
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 11
Hello Protocol

 Neighbor establishment
– “Any other OSPF neighbors on any of its links?”
1. Send and receive hello on all OSPF-enabled interfaces
2. Determine the OSPF router ID of the sending router
3. Establishes adjacency with the neighbor

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 12


Hello Protocol

 OSPF Hello intervals


– Usually periodically multicast (all SPF routers; 224.0.0.5)
• 10 sec. (multiaccess & point-to-point segment) or
• 30 sec. (NBMA segments such as Frame relay, X.25, ATM)

 OSPF Dead intervals


– Time for the router to wait without receiving hello packet before it
thinks the neighbor is down
– When expired, link-state update about the down neighbor is
flooded
– Default value = 4 × hello interval

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 13


Hello Protocol

 Electing a DR (designated router) and BDR (backup DR)


– Used to reduce the amount of OSPF traffic on multicast networks
– A router with the (second) highest priority is elected as the (B)DR
 Without DR & BDR
– All OSPF routers flood link-state update packets to all others
 With DR & BDR
1. All OSPF routers send link-state update packets to DR & BDR
• Multicast to 224.0.0.6
2. DR sends them to all other routers
• Multicast to 224.0.0.5
• BDR takes over DR when DR fails

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 14


OSPF Link-State Updates

 Link-state update (LSU) packet


– Used for OSPF routing updates
• Deliver link state advertisements (LSAs)
• An LSA contains information about neighbors & path costs
– An LSU packet can contain ≥ 1 LSAs
– There are 11 different types of LSAs in a LSU packet

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 15


OSPF Algorithm
 Maintains a link-state database containing the received LSAs
 Uses Dijkstra's shortest path first (SPF) algorithm to create
an SPF tree
 The SPF tree is then used to populate the IP routing table

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 16


OSPF Algorithm

 OSPF process steps summary


1. Send hello packets and wait to receive hello packets from
others (packet type=1;down→init state)
2. Using received hello packets, [elect DR/BDR in multi-access
network and] establish adjacencies (2-way state)
• In the MA networks, adjacencies are established only with DR

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 17


OSPF Algorithm

3. Go through a sequence of status


• The two neighbors determine a master/slave relationship based
on the ID (highest IP interface address) (type=1; exstart state)
• Exchange topology summary (type=2;exchange state)
– Called database description packet (DDP)
• Link-state request (LSR;type=3) → link-state update
(LSU;type=4) → link-state acknowledge (LSAck;type=5); loading
state
– LSAs in the LSU packets are multicast
» In MA network, other routers multicast LSUs to DR first (224.0.0.6)
» Next, DR multicasts them to all other routers (224.0.0.5)
» LSUs are flooded over an OSPF area
– Record LSAs in a link-state database and reply with a LSA Ack.
• Repeat the processes until the databases are complete (in full
state)
– All routers in an OSPF area have the same topological database

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 18


OSPF Algorithm

DDP

DDP
LSR

LSU
This is detailed information
I have received LSU LSAck
LSR

LSU
This is detailed information

LSAck

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 19


OSPF Algorithm

4.Apply SPF algorithm to calculate the shortest loop free route


• Routing information is recorded in a routing table

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 20


Administrative Distance

Default Administrative Distance for OSPF is 110


– OSPF is preferred over IS-IS and RIP, but not over EIGRP

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 21


Authentication

 OSPF can be configured for authentication


– Routers will only accept routing information from other routers
configured with the same password or authentication
information
– RIPv2, EIGRP, OSPF, IS-IS, & BGP all supports encryption
and authentication
• This is an interface specific configuration
• Authentication does not encrypt the router's routing table

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 22


Basic OSPF Configuration
11.1 Introduction to OSPF
11.2 Basic OSPF Configuration
11.2.1 Lab Topology
11.2.2 The router ospf Command
11.2.3 The network Command
11.2.4 OSPF Router ID
11.2.5 Verifying OSPF
11.2.6 Examining the Routing Table
11.3 The OSPF Metric
11.4 OSPF and Multiaccess Networks
11.5 More OSPF Configuration

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 23


Lab Topology

 Discontiguous & VLSM IP addressing scheme


 Serial links of various bandwidths (not now, yet…)
 Multiple paths to each remote network

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 24


The router ospf Command

 Enabling OSPF on a router


– R1(config)#router ospf process_id
• 1 ≤ process_id ≤ 65,535, chosen by the administrator
– A router can have multiple OSPF processes (unusual & expensive)
– Used to identify each OSPF process on a router (local to the router)
– Locally significant
» No need to match other OSPF routers in order to establish adjacencies with
those neighbors

– Ex: On R1~R3, enable OSPF with the process id of 1


R1(config)#router ospf 1

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 25


The network Command

 The function of the network command


– Any interfaces matching the network address in the network
command will be enabled to send and receive OSPF packets.
– This network (or subnet) will be included in OSPF routing
updates.
 Syntax
– R1(config)#network network-address wildcard-mask
area area-id
• OSPF always requires the wildcard mask configured
– Specify the [range of] interfaces that will be enabled for OSPF
» Can be 0.0.0.0 if the single interface is to be specified
• area area-id refers to the OSPF area
– An OSPF area is a group of routers that share link-state information
– Only single area OSPF is covered in CCNA
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 26
The network Command

 Configure R1~R3 with network command:


– Use area_id of 0
– Apply appropriate wildcard-mask for each subnet

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 27


OSPF Router ID

 Determining the router ID


– An IP address used to identify a router used in DR/BDR election
– Must be unique for each router in an OSPF area
– 3 rule for deriving the router ID
1. Use IP address configured with OSPF router-id command
– R1(config-router)#router–id ip_address
– It takes precedence over loopback and physical interface addresses
– It is used at the next reload or at a manual OSPF process restart
2. If not configured, router chooses highest IP address of any
loopback interfaces
3. If no loopback interfaces are configured, then the highest IP
address on any active interface is used
– Ex: Using the criteria described above, determine the router IDs
for R1~R3 and verify them
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 28
OSPF Router ID

 Verifying current router ID


R1#sh ip protocol

Routing Protocol is "ospf 1"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.10.5
Number of areas in this router is 0. 0 normal 0 stub 0 nssa
<output omitted>

R1#show ip ospf
Routing Process "ospf 1" with ID 192.168.10.5
Supports only single TOS(TOS0) routes
<output omitted>

R1#show ip ospf interface s0/0/0


Serial0/0/0 is up, line protocol is up
Internet address is 192.168.10.1/30, Area 0
Process ID 1, Router ID 192.168.10.5, Network Type POINT-TO-
POINT, Cost: 64
<output omitted>

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 29


OSPF Router ID

 Router ID & loopback addresses


– Once configured, loopback interface is always ‘up’ and never fails
– It is always preferred over any IP address of real interfaces
– Ex: Configure loopback 0 of R1~R3 with 10.1.1.1, 10.2.2.2,
10.3.3.3 with the subnet mask of /32 (Are router IDs changed?)
 Modifying the router ID
– The router ID is selected when OSPF is configured with its first
OSPF network command
– After that moment, modifying the router ID requires reload or
restarting the OSPF process
R1#reload OR, effective only for
R1#clear ip ospf process router-id command

– Ex: Apply the modifications in the above example and verify them

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 30


Verifying OSPF

 show ip ospf neighbor command


– Used to verify and troubleshoot OSPF neighbor relationships
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.1.1.1 1 FULL/- 00:00:35 192.168.10.5 Serial0/0/0
10.2.2.2 1 FULL/- 00:00:36 192.168.10.9 Serial0/0/1

– Two routers may not form an OSPF adjacency if:


• Unmatched subnet masks, causing the routers to be on separate
networks.
• Unmatched Hello or Dead timers.
• Unmatched OSPF Network types.
• Missing or incorrect OSPF
network command.
– Ex: Verify the neighbors at
R1~R2
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 31
Verifying OSPF

 Additional OSPF troubleshooting commands


Command Description
Displays OSPF process ID, router ID,
show ip protocols networks router is advertising & administrative
distance
Displays OSPF process ID, router ID, OSPF
show ip ospf area information & the last time SPF algorithm
calculated
show ip ospf Displays hello interval and dead interval
interface
 Ex: Apply above commands on R1~R3 and examine the outputs

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 32


Verifying OSPF

R1#show ip protocols

Routing Protocol is "ospf 1"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.1.1.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.16.1.16 0.0.0.15 area 0
192.168.10.0 0.0.0.3 area 0
192.168.10.4 0.0.0.3 area 0
Routing Information Sources:
Gateway Distance Last Update
192.168.10.2 110 00:17:06
192.168.10.6 110 00:17:06
Distance: (default is 110)

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 33


Verifying OSPF
R2#show ip ospf
Routing Process "ospf 1" with ID 10.2.2.2
Supports only single TOS(TOS0) routes
Supports opaque LSA
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 3
Area has no authentication
SPF algorithm executed 3 times
Area ranges are
Number of LSA 6. Checksum Sum 0x04734e
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 34


Verifying OSPF

R3#show ip ospf interface serial 0/0/1


Serial0/0/1 is up, line protocol is up
Internet address is 192.168.10.10/30, Area 0
Process ID 1, Router ID 10.3.3.3, Network Type POINT-TO-POINT, Cost:
64
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:08
Index 3/3, flood queue length 0 Must match to
Next 0x0(0)/0x0(0) form adjacency
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1 , Adjacent neighbor count is 1
Adjacent with neighbor 192.168.10.9
Suppress hello for 0 neighbor(s)

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 35


Examining the Routing Table

R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Not advertised
Gateway of last resort is not set by OSPF
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.1/32 is directly connected, Loopback0
O 10.10.10.0/24 [110/65] via 192.168.10.2, 00:54:26, Serial0/0/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.16/28 is directly connected, FastEthernet0/0
O 172.16.1.32/29 [110/65] via 192.168.10.6, 01:03:15, Serial0/0/1
192.168.10.0/30 is subnetted, 3 subnets
C 192.168.10.0 is directly connected, Serial0/0/0 Not automatically
C 192.168.10.4 is directly connected, Serial0/0/1 summarized
O 192.168.10.8 [110/128] via 192.168.10.6, 00:54:26, Serial0/0/1
[110/128] via 192.168.10.2, 00:54:26, Serial0/0/0
Equal-cost
load balancing
Examine the routing table of R1~R3
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 36
The OSPF Metric
11.1 Introduction to OSPF
11.2 Basic OSPF Configuration
11.3 The OSPF Metric
11.3.1 OSPF Metric
11.3.2 Modifying the Cost of the Link
11.4 OSPF and Multiaccess Networks
11.5 More OSPF Configuration

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 37


OSPF Metric

 The OSPF metric is defined as cost in RFC 2328:


– A cost is associated with the output side of each router interface
– This cost is configurable by the system administrator
– The lower the cost, the more likely the interface is to be used to
forward data traffic.
– Values to be used to determine the cost are not specified by RFC
 The cost in Cisco IOS
– The cumulative bandwidths of the outgoing interfaces from the
router to the destination network
• In EIGRP, minimum bandwidth is used Rate in Mbps (1 ~ 4294967)
Default = 100
– Cost = 108 / bandwidth [bps]
• 108 is the reference bandwidth
– Can be modified to accommodate links with the bandwidth > 108
» R1(config-router)#auto-cost reference-bandwidth ref-bw
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 38
OSPF Metric

 Cisco cost values for several types of link

 Verifying the cost (calculated bandwidth) of a link


R1#show ip ospf interface s0/0/0
Serial0/0/0 is up, line protocol is up
Internet address is 192.168.10.1/30, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT-TO-POINT, Cost: 64
Transmit Delay is 1 sec, State POINT-TO-POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<output omitted>

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 39


OSPF Metric

 OSPF accumulates costs


– The accumulated value from a router to the destination network
– Ex: Cost from R1 to R2’s LAN Cost2=1
= Cost1 + Cost2
= 64+1 = 65
Cost1=64

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


C 10.1.1.1/32 is directly connected, Loopback0
O 10.10.10.0/24 [110/65] via 192.168.10.2, 00:54:26, Serial0/0/0
<output omitted>

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 40


OSPF Metric

 Default bandwidth on serial interfaces


– Most serial link default to 1.544Mbps
• Some are 128kbps
– Does not actually affect nor reflect the speed of the link
– Need to configure the interface with the actual link speed

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 41


Modifying the Cost of the Link

 Two alternatives in modifying the cost of a link


1. Modifying bandwidth of the interface
• Router(config-if)#bandwidth bandwidth-kbps
• Cost is calculated by the formula cost = 108/bandwidth
2. Modifying the cost of the interface itself
• Router(config-if)#ip ospf cost cost
• 1 ≤ cost ≤ 65,535
• Useful in multi-vendor environment, where bandwidth is not used
as the cost
– Must be modified on all interfaces of a link

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 42


Modifying the Cost of the Link

 The bandwidth command vs. the ip ospf cost command

 Ex: Modify the cost as shown in the topology, using either of


the commands. Then verify changes in the routing table of
each router
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 43
OSPF and Multiaccess Networks
11.1 Introduction to OSPF
11.2 Basic OSPF Configuration
11.3 The OSPF Metric
11.4 OSPF and Multiaccess Networks
11.4.1 Challenges in Multiaccess Networks
11.4.2 DR/BDR Election Process
11.4.3 OSPF Interface Priority
11.5 More OSPF Configuration

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 44


Challenges in Multiaccess
Networks
 Five network types defined in OSPF :
1. Broadcast Multiaccess
• Ethernet, Token Ring, or FDDI
2. Point-to-point
• Point-to-point serial link, HDLC
3. Nonbroadcast Multiaccess (NBMA)
• Frame Relay, X.25, ATM
4. Point-to-multipoint
5. Virtual links Point-to-multipoint

• For connecting discontiguous backbone area


(area 0) in multi-area OSPF

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 45


Challenges in Multiaccess
Networks
 Two challenges in the flooding of LSAs in mulitaccess
networks:
1.Multiple adjacencies, one adjacency for every pair of routers.
2.Extensive flooding of LSAs
 Multiple Adjacencies
– For N routers in a multiaccess network, every router make
adjacencies with N-1 routers
– Total adjacencies = N(N-1)/2

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 46


Challenges in Multiaccess
Networks
 Flooding of LSAs
– N(N-1) LSAs are needed (see the animation in 11.4.1 of the
curriculum)
 Solution: Designated Router (DR)
– Elect a DR & backup DR (BDR) in the multiaccess network
• BDR acts as DR when DR fails
– All other routers (DROthers) make adjacencies only with DR &
BDR
• Only 2N-3 adjacencies are made (including DR↔BDR adjacency)
– A router sends LSAs only to DR & BDR (2 LSAs)
• Multicast to 224.0.0.6 (ALLDRouters - All DR routers)
– Only DR floods received LSAs to all other routers (N-1 LSAs)
• Multicast to 224.0.0.5 (AllSPFRouters - All OSPF routers)
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 47
DR/BDR Election Process

 Changes in the scenario topology


– DR/BDR elections do not occur in point-to-point networks
– Multiaccess topology scenario is needed
– Configure OSPF with process ID 1 & area 0

D Fa0/0 192.168.1.4/24

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 48


DR/BDR Election Process

 DR/BDR Election
– DR: Router with the highest OSPF interface priority
– BDR: Router with the second highest OSPF interface priority
– The default OSPF interface priority is 1
• The OSPF interface priority can be modified by:
– Router(config-if)#ip ospf priority {0~255}
– The interface connected to the MA network in the election process
• For equal priority, the highest router ID is used to break the tie.
 Adjacencies
– DROthers only form FULL adjacencies with the DR and BDR
– Still form a neighbor (2way) adjacencies with any DROthers
• Still receive Hello packets from all other DROther routers

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 49


DR/BDR Election Process
A#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.31.22 1 FULL/BDR 00:00:32 192.168.1.2 FastEthernet0/0
192.168.31.33 1 FULL/DR 00:00:35 192.168.1.3 FastEthernet0/0

B#show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
192.168.31.11 1 FULL/DROTHER 00:00:37 192.168.1.1 FastEthernet0/0
192.168.31.33 1 FULL/DR 00:00:32 192.168.1.3 FastEthernet0/0

C#show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
192.168.31.11 1 FULL/DROTHER 00:00:32 192.168.1.1 FastEthernet0/0
192.168.31.22 1 FULL/BDR 00:00:35 192.168.1.2 FastEthernet0/0

 Verify the router


state and DR/BDR
using show ip
ospf interface
fa0/0 command on
A~D
D

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 50


DR/BDR Election Process
 Timing of DR/BDR election
– As soon as the 1st router with an OSPF enabled interface is
active on the multiaccess network
– A router with a lower router ID that is configured first will
become the DR
• The router enabled later with higher priority cannot be the DR/BDR
 Conditions for the changes in DR/BDR:
– Conditions for BDR → DR (promotion)
• The DR fails.
• The OSPF process on the DR fails.
• The multiaccess interface on the DR fails
 DROther with the highest priority (or router ID) among DROthers is
elected as BDR
– Conditions for DR/BDR re-election process
• Both current DR and BDR must fail at the same time
– Failed [B]DR becomes DROther when it is re-enabled
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 51
DR/BDR Election Process

 BDR → DR takeover process


A#sh ip ospf neigh

Neighbor ID Pri State Dead Time Address Interface Router C


192.168.31.22 1 FULL/BDR 00:00:33 192.168.1.2 FastEthernet0/0 down
192.168.31.33 1 FULL/DR 00:00:23 192.168.1.3 FastEthernet0/0
A#
00:15:30: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on FastEthernet0/0 from FULL to DOWN,
Neighbor Down: Dead timer expired
00:15:30: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on FastEthernet0/0 from FULL to Down:
Interface down or detached
A#
A#sh ip ospf neigh BDR DR
BDR → DR Router C
Neighbor ID Pri State Dead Time Address Interface
192.168.31.22 1 FULL/DR 00:00:39 192.168.1.2 FastEthernet0/0
re-up

A#
00:18:15: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on FastEthernet0/0 from EXCHANGE to
FULL, Exchange Done
A#sh ip ospf neigh

Neighbor ID Pri State Dead Time Address Interface


192.168.31.22 1 FULL/DR 00:00:39 192.168.1.2 FastEthernet0/0
192.168.31.33 1 FULL/DROTHER 00:00:31 192.168.1.3 FastEthernet0/0
A#

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 52


DR/BDR Election Process

 Making sure that the routers you want to be DR and BDR win
the election
– Changing the OSPF interface priority can control the elections
• OR the router ID if the priorities are identical for all routers in the
broadcast multiple access network
1. Boot up routers in the order of the DR, BDR, and all others, OR
2. Shut down the interface on all routers, then enable DR, BDR,
and then all others.

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 53


OSPF Interface Priority
 Controlling the election priority
– Set the interface priority higher for the preferred router
• Router(config-if)#ip ospf priority {0~255}
• The larger, the higher priority
• Router with interface priority value 0 can never participate DR/BDR
election process
– Force election
• Shutdown and re-enable all interfaces
– The order of re-enabling is still important
– Ex: Set the interface priority of fa0/0 in A to 250, B to 200, then
restart election process, then verify the priorities and identify the
DR & BDR
• Shutdown all Fa0/0s, then enable D’s and B’s, wait DR/BDR
selection, then enable A’s and C’s
• Examine neighbor tables and identify DR/BDR
• Shutdown DR’s Fa0/0, wait 40sec., re-enabe and identify DR/BDR
CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 54
More OSPF Configuration
11.1 Introduction to OSPF
11.2 Basic OSPF Configuration
11.3 The OSPF Metric
11.4 OSPF and Multiaccess Networks
11.5 More OSPF Configuration
11.5.1 Redistributing an OSPF Default Route
11.5.2 Fine-tuning OSPF

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 55


Redistributing an OSPF Default
Route
1.Configuring a static default route on R1
– R1(config)#ip route 0.0.0.0 0.0.0.0 lo1
– Exit interface is not configured as part of the OSPF routing
domain
– R1 becomes an ASBR (autonomous system boundary router)
• The router located between an OSPF routing domain and a non-
OSPF network

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 56


Redistributing an OSPF Default
Route
2.Propagating installed static default route to all the routers in
a normal OSPF area
− The OSPF router does not, by default, generate a default route
into the OSPF domain
R1(config-router)#default-information originate [metric value] [metric-type type]

Default=1 OSPF external


route type
(Default=2)

 Ex: Verify the redistributed default route in R1~R3


R2#show ip route
<output omitted>
C 192.168.10.8 is directly connected, Serial0/0/1
O*E2 0.0.0.0/0 [110/1] via 192.168.10.10, 00:00:10, Serial0/0/1

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 57


Fine-tuning OSPF

 Modifying reference bandwidth


– R1(config-router)#auto-cost reference-bandwidth ref-bw
– ref-bw is the new reference bandwidth in Mbps (1 ~ 4294967)
– Default = 100
– Make sure to configure on all routers in the OSPF routing
domain
– Ex: Modify the reference bandwidth to 10Gbps and compare
the changes in the metrics in R1

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 58


Fine-tuning OSPF

 Modifying OSPF timers


– Impact of reducing the timers
• Increase in traffic
• Faster detection of network failures and quick convergence
– Modifying OSPF Hello and Dead intervals
Router(config-if)#ip ospf hello-interval seconds
Router(config-if)#ip ospf dead-interval seconds

• Modifying Hello interval results in the automatic modification of


Dead interval
– Explicit modification is strongly recommended for the purpose of
documentation
• The Hello and Dead intervals should match between two adjacent
routers
– In EIGRP, it is not the adjacency condition

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 59


Fine-tuning OSPF
– Ex: Modify the hello & dead intervals of R1↔R2 to the half of
default value
• Verify R1 & R2’s neighbors and timers
• Modify R1’s timers
• Wait for over 20 seconds
• Examine what happens in IOS
• Examine changes R1’s neighbors and timers
• Modify R2’s timers
• Verify R1 & R2’s neighbors and timers

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 60


Summary

 RFC 2328 describes OSPF link state concepts and operations


 OSPF Characteristics
– A commonly deployed link state routing protocol
– Employs DRs & BDRs on multi-access networks
 DRs & BDRs are elected
 DR & BDRs are used to transmit and receive LSAs
– Uses 5 packet types:
• 1: HELLO
• 2: DATABASE DESCRIPTION
• 3: LINK STATE REQUEST
• 4: LINK STATE UPDATE
• 5: LINK STATE ACKNOWLEDGEMENT

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 61


Summary

 OSPF Characteristics
– Metric = cost [ = 108/bandwidth [bps] in Cisco IOS]
 Lowest cost = best path

 Configuration
– Enable OSPF on a router using the following command
 R1(config)#router ospf process-id
– Use the network command to define which interfaces
will participate in a given OSPF process
 Router(config-router)#network network-address
wildcard-mask area area-id

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 62


Summary

 Verifying OSPF configuration


– Use the following commands
 show ip protocol
 show ip route
 show ip ospf interface
 show ip ospf neighbor

 Advertising the existing 0.0.0.0/0 into the OSPF domain


– default−information originate

CCNA2 Semester 2, 2010 Dept. of Information Communications, Dongyang Mirae Univ. 63

Das könnte Ihnen auch gefallen