routing protocol ripv1, ripv2 eigrp o ospf · routing protocol ripv1, ripv2, eigrp ospf 2 outline o...
TRANSCRIPT
Routing Protocol
RIPv1, RIPv2, EIGRP OSPF
2
Outline
o RIPv1, RIPv2
o EIGRP
o OSPF
3
RIPv1
RIP Characteristics
• A classful, Distance Vector (DV) routing protocol
• Metric = hop count
• Routes with a hop count > 15 are unreachable
• Updates are broadcast every 30 seconds
4
RIPv1�RIP Message Format
�RIP header - divided into 3 fields
- Command field
- Version field
- Must be zero
�Route Entry - composed of 3 fields
- Address family identifier
- IP address
- Metric
5
RIPv1
RIP Operation
RIP uses 2 message types:
�Request message
• This is sent out on startup by each RIP enabled
interface
• Requests all RIP enabled neighbors to send routing
table
�Response message
• Message sent to requesting router containing routing
table6
RIP in action
RIP request
dst. 255.255.255.255
RIP reply
dst. request router every 30 sec.
7
RIPv1
o IP addresses initially
divided into classes
- Class A
- Class B
- Class C
o RIP is a classful
routing protocol
- Does not send subnet
masks in routing updates
8
Automatic SummarizationBoundary Routers
� RIP automatically summarizes classful networks
� Boundary routers automatic summarize RIP subnets from one major network to another.
9
RIPv2Difference between RIPv1 & RIPv2
RIPv1• A classful distance vector routing protocol
• Does not support discontiguous subnets
• Does not support VLSM
• Does not send subnet mask in routing update
• Routing updates are broadcast
RIPv2• A classless distance vector routing protocol that is an
enhancement of RIPv1’s features.
• Next hop address is included in updates
• Routing updates are multicast
• The use of authentication is an option
10
Similarities between RIPv1 & RIPv2
o Use of timers to prevent routing loops
o Use of split horizon or split horizon with poison reverse
o Use of triggered updates
o Maximum hop count of 15
11
RIPv1 Limitations
12
RIPv1 Limitations
o RIPv1 – a classfull routing protocol
-Subnet mask are not sent in updates
-Summarizes networks at major network boundaries
-if network is discontiguous and RIPv1 configured,
convergence will not be reached
13
RIPv1 Limitations
o RIPv1 does not support VLSM
Reason: RIPv1 does not
send subnet mask in
routing updates
o RIPv1 does summarize routes
to the Classfull boundary
Or uses the Subnet mask
of the outgoing interface
to determine which
subnets to advertise
14
RIPv1 Limitations
o No CIDR Support
o In the diagram R2 will
not include the static
route in its update
Reason: Classful routing
protocols do not support
CIDR routes that are
summarized with a
smaller mask than the
classful subnet mask
15
Configuring RIPv2o Comparing RIPv1 & RIPv2 Message Formats
- RIPv2 Message format is similar to RIPv1 but has 2 extensions
� 1st extension is the subnet mask field
� 2nd extension is the addition of next hop address
16
Configuring RIPv2
oEnabling and Verifying RIPv2
oConfiguring RIP on a Cisco router
By default it is running RIPv1
17
Configuring RIPv2
o Configuring RIPv2 on a
Cisco router
-Requires using the
version 2 command
-RIPv2 ignores RIPv1
updates
o To verify RIPv2 is
configured use the
show ip protocols
command
18
Configuring RIPv2
o Auto-Summary &
RIPv2
o RIPv2 will
automatically
summarize routes at
major network
boundaries and can
also summarize routes
with a subnet mask
that is smaller than the
classfull subnet mask
19
oDisabling Auto-
Summary in
RIPv2
oTo disable
automatic
summarization
issue the no auto-
summary
command
Configuring RIPv2
20
Configuring RIPv2
o Verifying RIPv2 Updates
o When using RIPv2 with automatic summarization
turned off
Each subnet and mask has its own specific
entry, along with the exit interface and next-hop
address to reach that subnet.
o To verify information being sent by RIPv2 use the
debug ip rip command
21
VLSM & CIDR
o RIPv2 and VLSM
o Networks using a
VLSM IP addressing
scheme
Use classless routing
protocols (i.e. RIPv2)
to disseminate network
addresses and their
subnet masks
22
VLSM & CIDR
oCIDR uses Supernetting
Supernetting is a bunch of contiguous
classful networks that is addressed as a single
network.
23
VLSM & CIDR
o To verify that
supernets are
being sent and
received use the
following
commands
-Show ip route
-Debug ip rip
24
Summary RIP v1 & v2
Routing
Protocol
Distance
Vector
Classless
Routing
Protocol
Uses
Hold-
Down
Timers
Use of
Split Horizon or
Split Horizon w/
Poison Reverse
Max
Hop
count
= 15
Auto
Summary
Support
CIDR
Supports
VLSM
Uses
Authen-
tication
RIPv1 Yes No Yes Yes Yes Yes No No No
RIPv2 Yes Yes Yes Yes Yes Yes Yes Yes Yes
25
EIGRP
26
EIGRP
Roots of EIGRP: IGRP (Cisco)�Developed in 1985 to overcome
RIPv1’s limited hop count
�Distance vector routing protocol
�Metrics used by IGRP
�Bandwidth (used by default)
�Delay (used by default)
�Reliability
�LoadDiscontinued support starting with IOS 12.2(13)T & 12.2(R1s4)S
27
EIGRP
EIGRP Message Format
o EIGRP Header� Data link frame header - contains source and
destination MAC address
� IP packet header - contains source & destination IP address
� EIGRP packet header - contains AS number
� Type/Length/Field - data portion of EIGRP message
28
EIGRPo EIGRP packet header contains
� Opcode field
� Autonomous System number
29
EIGRP EIGRP Parameters contains
� Weights
� Hold time
30
EIGRP o TLV: IP internal contains
� Metric field
� Subnet mask field
� Destination field
� in Autonomous System
31
EIGRP o TLV: IP external contains
� Fields used when external
� routes are imported into
� EIGRP routing process� Redistribute form other
Autonomous System
32
EIGRP
Protocol Dependent
Modules (PDM)
o EIGRP uses PDM to route
several different protocols
i.e. IP, IPX & AppleTalk
o PDMs are responsible for
the specific routing task
for each network layer
protocol
33
EIGRPReliable Transport Protocol (RTP)o Purpose of RTP
� Used by EIGRP to transmit and receive EIGRP packets
o Characteristics of RTP� Involves both reliable & unreliable
deliveryof EIGRP packet� Reliable delivery requires
acknowledgment from destination� Unreliable delivery does not require
an acknowledgement from destination
� Packets can be sent � Unicast� Multicast
• Using address 224.0.0.1034
EIGRP Packet Types
o EIGRP uses five different packet types, some in pairs.
� Hello Packets
� Update Packets
� Acknowledgement Packets
� Query and Reply Packets
35
EIGRP Packet Typeso Hello packets
� Used to discover & form adjacencies with neighbors
� Hello packets are multicasts and use unreliable delivery.
36
EIGRP Packet Types
o Update packets
� Used to propagate routing
information
� Unlike RIP, EIGRP does not
send periodic updates. Update
packets are sent only
when necessary.
o ACK packets
� Used to acknowledge
receipt of update,
query & reply packets
37
EIGRP Packet Types
o Query & Reply packets
�Used by DUAL for
searching for networks
�Query packets
- Can use
•Unicast
•Multicast
�Reply packet
- Use only
•unicast
38
EIGRP – Hello Protocol o Purpose of Hello Protocol
� To discover & establish adjacencies with neighbor routers
o Characteristics of hello protocol� Time interval for sending hello packet
�Most networks it is every 5 seconds
�Multipoint non broadcast multi-access networks• Unicast every 60 seconds
- Holdtime� This is the maximum time router
should wait before declaring a neighbor down
� Default holdtime
• 3 times hello interval
39
EIGRP – Bounded Updateso EIGRP only sends update when there is a change in route status
o Routing update is called “Partial update”� A partial update includes only the route information that has
changed – The whole routing table is NOT sent
o and also considered as “Bounded update”� When a route changes, only those devices that are impacted will
be notified of the change
o EIGRP’s use of partial bounded updates minimizes use of bandwidth
40
EIGRP – DUAL
Diffusing Update Algorithm (DUAL)
� Purpose
• EIGRP’s primary method for preventing routing loops
� Advantage of using DUAL
• Provides for fast convergence time by keeping a list of
loop-free backup routes
41
EIGRP
o Administrative Distance (AD)
� Defined as the trustworthiness of the source route
o EIGRP default administrative distances
� Summary routes = 5
� Internal routes = 90
� Imported routes = 170
42
EIGRP
Authentication
o EIGRP can
� Encrypt routing information
� Authenticate routing information
43
EIGRP
o Topology Example
44
EIGRP
o EIGRP will
automatically
summarize routes at
classful boundaries
45
Basic EIGRP Configuration o Autonomous System (AS) & Process IDs
� Autonomous System
� This is a collection of networks under the control of
a single authority (reference RFC 1930)
� AS Numbers are assigned by IANA
� Entities needing AS numbers
� ISP
� Internet Backbone prodiers
� Institutions connecting to
other institutions using
AS numbers
46
Basic EIGRP Configuration
o EIGRP autonomous
system number actually
functions as
a process ID
o Process ID represents
an instance of the
routing protocol
running on a router
o Example Router(config)#router eigrp autonomous-
system
47
Basic EIGRP Configuration
The router eigrp command
o All routers in the EIGRP routing domain must use the same process ID number (autonomous-system number)
48
Basic EIGRP ConfigurationThe Network Command
o Functions of the network command� Enables interfaces to transmit & receive EIGRP updates
� Includes network or subnet in EIGRP updates
o Example: Router(config-router)#network network-address
o When EIGRP is configured on R2, DUAL sends a notification message to the console stating that a neighbor relationship with another EIGRP router has been established.
49
Basic EIGRP ConfigurationThe network Command with a Wildcard Mask
- This option is used when you want to configure EIGRP to
advertise specific subnets
- Example
� Router(config-router)#network network-address [wildcard-mask]
50
Basic EIGRP ConfigurationVerifying EIGRP
o EIGRP routers must establish adjacencies with their neighbors
before any updates can be sent or received
o Command used to view neighbor table and verify that EIGRP
has established adjacencies with neighbors is
show ip eigrp neighbors
51
Basic EIGRP Configuration
If a neighbor is not listed after adjacencies have been
established with a router's neighbors
o Are both routers configured with the same EIGRP
process ID?
o Is the directly connected network included in the
EIGRP network statements?
o Is the passive-interface command configured to
prevent EIGRP Hello packets on the interface?
52
Basic EIGRP Configuration
o The show ip protocols
command is also used
to verify that EIGRP is
enabled
53
Basic EIGRP Configuration
Examining the Routing Table
o The show ip routecommand is also used to verify EIGRP
o EIGRP routes are denoted in a routing table by the letter “D”
o By default , EIGRP automatically summarizes routes at major network boundary
54
Basic EIGRP Configurationo Introducing the Null0 Summary Route
� Null0 is not a physical interface
� In the routing table summary routes are sourced from Null0�Reason: routes are used for advertisement purposes
� EIGRP will automatically include a null0 summary route as child route when 2 conditions are met�At least one subnet is learned via EIGRP
�Automatic summarization is enabled
55
Basic EIGRP Configuration
o R3’s routing table
shows that the
172.16.0.0/16
network is
automatically
summarized by R1
& R3
56
EIGRP Metric CalculationEIGRP Composite Metric & the K Values
o EIGRP uses the following values in its composite metric� -Bandwidth, delay, reliability, and load
o The composite metric used by EIGRP
� formula used has values K1 ����K5• K1 & K3 = 1• others K values = 0
57
EIGRP Metric Calculationo Use the sh ip protocols command to verify the K values
58
EIGRP Metric Calculation
EIGRP Metrics
o Use the show interfacescommand to view metrics
o EIGRP Metrics
� Bandwidth – EIGRP uses a static bandwidth to calculate metric
� Most serial interfaces use a default bandwidth value of 1.544Mbos (T1)
59
EIGRP Metric Calculation
EIGRP Metrics
o Delay is the defined as the measure of time it takes for a packet to traverse a route
� -it is a static value based on link type to which interface is connected
60
EIGRP Metric Calculationo Reliability (not a default EIGRP metric)
� -A measure of the likelihood that a link will fail
� -Measure dynamically & expressed as a fraction of 255
� the higher the fraction the better the reliability
o Load (not a default EIGRP metric)
� A number that reflects how much traffic is using a link
� Number is determined dynamically and is expressed as a fraction of 255�The lower the fraction the less the load on the link
61
EIGRP Metric Calculation
Using the Bandwidth Command
o Modifying the interface bandwidth
- Use the bandwidth command
- Example
Router(config-if)#bandwidth kilobits
o Verifying bandwidth
Use the show interface command
Note : bandwidth command does not change the link’s physical bandwidth
62
63
EIGRP Metric Calculationo The EIGRP metric can be determined by examining the
bandwidth delay
64
EIGRP Metric Calculation
o EIGRP uses the lowest bandwidth (BW) in its metric
calculation
Calculated BW = reference BW / lowest BW(kbps) * 256
o Delay – EIGRP uses the cumulative sum of all outgoing
interfaces
� Calculated Delay = the sum of outgoing interface delays
* 256
o EIGRP Metric = calculated BW + calculated delay
65
EIGRP Metric Calculation
66
EIGRP Metric Calculation
Link Bandwidth
(kbps)
Delay (µµµµs)
R2 – R1 1,544 20,000
R2 – ISP 128 20,000
R2 – R3 1,024 20,000
R1 – ISP 10,000 1,000
R3 – ISP 100,000 100
ISP – Net A 100,000 100
(107/ 1,544) x 256 1,657,856 (107/ 64) x 256 40,000,000
(107/ 1,024) x 256 2,499,840 (107/ 10,000) x 256 256,000
(107/ 128) x 256 20,000,000 (107/ 100,000) x 256 25,600
Example : R2 to Network A
67
DUAL Briefo EIGRP uses the Diffusing Update Algorithm (DUAL).
o EIGRP does not send periodic updates and route entries do not age out.
o EIGRP uses a lightweight Hello protocol to monitor connection status with its neighbors.
o Only changes in the routing information, such as a new link or a link becoming unavailable cause a routing update to occur.
o EIGRP's DUAL maintains a topology table separate from the routing table, which includes both the best path to a destination network and any backup paths that DUAL has determined to be loop-free.
o Loop-free means that the neighbor does not have a route to the destination network that passes through this router.
68
DUAL Concepts
The Diffusing Update Algorithm (DUAL) is
used to prevent looping
69
DUAL Conceptso Successor
a neighboring router that is used for packet forwarding and is the least-cost route to the destination network
o Feasible distance
the lowest calculated metric to reach the destination network
FD is the metric listed in the routing table entry
70
DUAL ConceptsFeasible Successors, Feasibility Condition & Reported Distance
�Feasible Successor
-This is a loop free
backup route to
same destination as
successor route
71
DUAL Concepts
o Reported distance(RD)
The metric that a router reports to a neighbor about its own cost to that network
Feasible Successors, Feasibility Condition & Reported Distance
72
DUAL Concepts
o Feasibility Condition (FC)
Met when a neighbor’s
RD is less than the
local router’s FD to the
same destination
network
73
DUAL Conceptso Topology Table:
Successor & Feasible Successor
o EIGRP Topology table� Viewed using the show ip eigrp topologycommand
� Contents of table include:
• all successor routes
• all feasible successor routes
�
74
DUAL Concepts
o EIGRP
Topology Table
dissected
75
DUAL Concepts
Topology Table: No Feasible Successor
o A feasible successor may not be present because
the feasibility condition may not be met
� -In other words, the reported distance of the
neighbor is greater than or equal to the
current feasible distance
76
77
DUAL Concepts
o Finite Sate Machine (FSM)
� An abstract machine that defines a set of
possible states something can go through,
what event causes those states and what
events result form those states
� FSMs are used to describe how a device,
computer program, or routing algorithm will
react to a set of input events
78
DUAL Concepts
o DUAL FSM
� Selects a best
loop-free path to
a destination
� Selects
alternate routes
by using
information in
EIGRP tables
79
DUAL Concepts
Finite State Machines (FSM)
o To examine output from EIGRP’s finite state machine us the debug eigrp fsm command
80
More EIGRP Configurations
The Null0 Summary Route
o By default, EIGRP uses the Null0 interface to discard
any packets that match the parent route but do not
match any of the child routes
o EIGRP automatically includes a null0 summary route as
a child route whenever both of the following conditions
exist
� One or subnets exists that was learned via EIGRP
� Automatic summarization is enabled
81
More EIGRP Configurations
The Null0 Summary Route
82
More EIGRP Configurations
Disabling Automatic Summarization
o The auto-summary command permits EIGRP to automatically summarize at major network boundaries
o The no auto-summary command is used to disable automatic summarization
� This causes all EIGRP neighbors to send updates that will not be automatically summarized
this will cause changes to appear in both
-routing tables
-topology tables
83
More EIGRP Configurations
Manual Summarization
o Manual summarization can include supernets
� Reason: EIGRP is a classless routing protocol &
include subnet mask in update
o Command used to configure manual
summarization
� Router(config-if)#ip summary-address eigrp as-number
network-address subnet-mask
84
More EIGRP Configurations
o Configuring a summary route in EIGRP
85
More EIGRP Configurations
EIGRP Default Routes
o “quad zero” static default route
� -Can be used with any currently supported routing protocol
� -Is usually configured on a router that is connected a network outside the EIGRP domain
o EIGRP & the “Quad zero” static default route
� Requires the use of the redistribute staticcommand to disseminate default route in EIGRP updates
86
More EIGRP Configurations
Fine-Tuning EIGRP
o EIGRP bandwidth utilization
-By default, EIGRP uses only up to 50% of interface bandwidth
for EIGRP information
-The command to change the percentage of bandwidth used by
EIGRP is
Router(config-if)#ip bandwidth-percent eigrp as-number percent
87
More EIGRP Configurationso Configuring Hello Intervals and Hold Times
-Hello intervals and hold times are configurable on a per-interface basis
-The command to configure hello interval is
Router(config-if)#ip hello-interval eigrp as-number seconds
o Changing the hello interval also requires changing the hold time to a value greater than or equal to the hello interval
-The command to configure hold time value is
Router(config-if)#ip hold-time eigrp as-number seconds
88
Summary
o Background & History
� EIGRP is a derivative of IGRP�EIGRP is a Cisco proprietary distance vector routing
protocol released in 1994
o EIGRP terms and characteristics
� EIGPR uses RTP to transmit & receive EIGRP packets
� EIGRP has 5 packet type:�Hello packets
�Update packets
�Acknowledgement packets
�Query packets
�Reply packets
� Supports VLSM & CIDR
89
Summary
o EIGRP terms and characteristics
� EIGRP uses a hello protocol
�Purpose of hello protocol is to discover & establish
adjacencies
� EIGRP routing updates
�Aperiodic
�Partial and bounded
�Fast convergence
90
Summary
o EIGRP commands
� The following commands are used for EIGRP configuration
RtrA(config)#router eigrp [autonomous-system #]
RtrA(config-router)#network network-number
� The following commands can be used to verify EIGRP
Show ip protocols
Show ip eigrp neighbors
Show ip route
91
Summary
o EIGRP metrics include
�Bandwidth (default)
�Delay (default)
�Reliability
�Load
92
Summary
o DUAL
� Purpose of DUAL�To prevent routing loops
� Successor�Primary route to a destination
� Feasible successor�Backup route to a destination
� Feasible distance�Lowest calculated metric to a destination
� Reported distance�The distance towards a destination as advertised by an
upstream neighbor
93
Summaryo Choosing the best route
� After router has received all updates from directly connected neighbors, it can calculate its DUAL
�1st metric is calculated for each route
�2nd route with lowest metric is designated successor & is placed in routing table
�3rd feasible successor is found
• Criteria for feasible successor: it must have lower reported distance to the destination than the installed route’s feasible distance
• Feasible routes are maintained in topology table94
Summary
o Automatic summarization
�On by default
�Summarizes routes on classful boundary
�Summarization can be disabled using
the following command
RtrA(config-if)#no auto-summary
95
Link-State Routing
o Link state routing protocols
• Also known as shortest path first algorithms
• These protocols built around Dijkstra’s SPF
96
Link-State Routing
Dikjstra’s algorithm also known as the shortest path first
(SPF) algorithm
97
Link-State Routing
o The shortest path to a destination is not necessarily
the path with the least number of hops
98
Link-State Routing Protocols
2 link state routing protocols used for routing IP
� Open Shortest Path First (OSPF)
� Intermediate System-Intermediate System (IS-IS)
99
OSPF
100
OSPFBackground of OSPF
o Began in 1987
o 1989 OSPFv1 released in RFC 1131
This version was experimental & never deployed
o 1991 OSPFv2 released in RFC 1247
o 1998 OSPFv2 updated in RFC 2328 (current version)
o 1999 OSPFv3 published in RFC 2740 (for IPv6)
101
OSPF packetOSPF Message Encapsulationo OSPF packet type
There exist 5 typeso OSPF packet header
Contains - Router ID and area ID and Type code for OSPF packet type
o IP packet header
Contains - Source IP address, Destination IP address, & Protocol field set to 89
� Data link frame header
Contains - Source MAC address and Destination MAC address
102
OSPF Packet Types
1. Hello - Hello packets are used to establish and maintain adjacency with other OSPF routers.
2. DBD - The Database Description (DBD) packet contains an abbreviated list of the sending router's link-state database and is used by receiving routers to check against the local link-state database.
3. LSR - Receiving routers can then request more information about any entry in the DBD by sending a Link-State Request (LSR).
4. LSU - Link-State Update (LSU) packets are used to reply to LSRs as well as to announce new information. LSUs contain seven different types of Link-State Advertisements (LSAs).
5. LSAck - When an LSU is received, the router sends a Link-State Acknowledgement (LSAck) to confirm receipt of the LSU.
103
OSPF
Hello Protocol : OSPF Hello Packet
� Purpose of Hello Packet
• Discover OSPF neighbors & establish adjacencies
• Before two routers can form an OSPF neighbor adjacency, they must agree on three values: Hello interval, Dead interval, and network type.
• Advertise guidelines on which routers must agree to become neighbors
• Used by multi-access networks to elect a designated router and a backup designated router
104
OSPF
105
OSPFo Hello Packets continued
Contents of a Hello Packet, router ID of transmitting routero OSPF Hello Intervals
� Usually multicast (224.0.0.5 = all OSPF routers)
� Sent every 10 seconds on multiaccess and point-to-point segments and 30 seconds for NBMA (non broadcast multiple-access) segments
o OSPF Dead Intervals
� This is the time that must transpire
before the neighbor is considered
down
� Default time is 4 times
the hello interval
106
OSPF
o Hello protocol packets contain information that is
used in electing
� Designated Router (DR)
- DR is responsible for updating all other OSPF routers
� Backup Designated Router (BDR)
- This router takes over DR’s responsibilities if DR fails
107
OSPF Link State Updateo Purpose of a Link State Update (LSU)
Used to deliver link state advertisementso Purpose of a Link State Advertisement (LSA)
Contains information about neighbors & path costs
108
OSPF Algorithm
o OSPF routers build & maintain
link-state database containing
LSA received from other
routers
� Information found in database
is utilized upon execution of
Dijkstra SPF algorithm
� SPF algorithm used to create
SPF tree
� SPF tree used to populate
routing table
109
OSPF Administrative Distance
o Default Administrative Distance for OSPF is 110
110
OSPF Authentication� Purpose is to encrypt & authenticate routing information
� This is an interface specific configuration
�Routers will only accept routing information from other routers that have been configured with the same password or authentication information
111
Basic OSPF Configuration
o Topology Example
• Discontiguous IP addressing scheme
• Since OSPF is a classless routing protocol the subnet mask is configured in
112
Basic OSPF ConfigurationThe router ospf command
o To enable OSPF on a router use the following command
R1(config)#router ospf process-id
Process id
� A locally significant number between 1 and 65535
this means it does not have to match other OSPF routers in order to establish adjacencies with those neighbors.
113
Basic OSPF Configurationo OSPF network command - Requires entering:
network address
wildcard mask - the inverse of the subnet mask
area-id - area-id refers to the OSPF area.
OSPF area is a group of routers that share link state information Example:
Router(config-router)#network network-address wildcard-ask area area-id
-The area area-id refers to the OSPF area.
-An OSPF area is a group of routers that share link-state information.
-All OSPF routers in the same area must have the same link-state information in their link-state databases.
114
Basic OSPF Configuration
115
Basic OSPF Configuration
o Router ID
�This is an IP address used to identify a router
�3 criteria for deriving the router ID�Use IP address configured with OSPF router-id command
-Takes precedence over loopback and physical interface addresses
�If router-id command not used then router chooses highest IP address of any loopback interfaces
�If no loopback interfaces are configured then the highest IP address on any active interface is used
116
Basic OSPF ConfigurationOSPF Router IDo Commands used to verify current router ID
�Show ip protocols�Show ip ospf�Show ip ospf interface
117
Basic OSPF Configuration
OSPF Router ID
o Router ID & Loopback addresses- Highest loopback address will be used as router ID if router-id command isn’t used
- Advantage of using loopback address
the loopback interface cannot fail ���� OSPF stabilityo The OSPF router-id command
� Introduced in IOS 12.0
� Command syntax�Router(config)#router ospf process-id
�Router(config-router)#router-id ip-address
o Modifying the Router ID�Use the command Router#clear ip ospf process 118
Basic OSPF ConfigurationVerifying OSPFo Use the show ip ospf command to verify & trouble shoot
OSPF networksCommand will display the following:� Neighbor adjacency
-No adjacency indicated by -�Neighboring router’s Router ID is not displayed�A state of full is not displayed
-Consequence of no adjacency-�No link state information exchanged�Inaccurate SPF trees & routing tables
119
Basic OSPF Configuration
Command Description
show ip protocols Displays OSPF process ID, router ID, networks
router is advertising & administrative distance
show ip ospf Displays OSPF process ID, router ID, OSPF area
information & the last time SPF algorithm
calculated
show ip ospf interface Displays hello interval and dead interval
Verifying OSPF - Additional Commands
120
Basic OSPF Configuration
Examining the routing table
o Use the show ip route command to display the routing table
-An “O” at the beginning of a route indicates that the router source is OSPF
-Note OSPF does not automatically summarize at major network boundaries
121
OSPF Metric
o OSPF uses cost as the metric for determining the best route
-The best route will have the lowest cost
-Cost is based on bandwidth of an outgoing interface
“The lower the cost, the more likely the interface is to be
used to forward data traffic."
� Cost is calculated using the formula
108 / bandwidth
-Reference bandwidth
� defaults to 100 Mbps
� can be modified using
auto-cost reference-bandwidth command122
OSPF Metric
123
OSPF Metric
o COST of an OSPF route
Is the accumulated value from one router to the next
124
OSPF Metrico Usually the actual speed of a link is different than the default
bandwidth
�This makes it imperative that the bandwidth value reflects link’s actual speed�Reason: so routing table has best path information
o The show interface command will display interface’s bandwidth
-Most serial link default to 1.544Mbps
125
Basic OSPF Configuration
Modifying the Cost of a link
o Both sides of a serial link should be configured with the same bandwidth
�Commands used to modify bandwidth value�Bandwidth command
Example: Router(config-if)#bandwidth bandwidth-kbps
�ip ospf cost command – allows you to directly specify interface cost
Example:R1(config)#interface serial 0/0/0
R1(config-if)#ip ospf cost 1562
126
Basic OSPF Configuration
127
Basic OSPF Configuration
Modifying the Cost of the link
o Difference between bandwidth command & the ip
ospf cost command
�ip ospf cost command
�Sets cost to a specific value
�bandwidth command
�Link cost is calculated
128
Basic OSPF Configuration
129
OSPF and Multiaccess NetworksChallenges in Multi-access Networks
o OSPF defines five network types:
�Point-to-point
�Broadcast Multiaccess
�non-broadcast multi-access
(NBMA)
�Point-to-multipoint
�Virtual links
130
OSPF and Multi-access Networks
131
OSPF in Multi-access Networkso 2 challenges presented by multi-access networks
�Multiple adjacencies
�Extensive LSA flooding
132
OSPF in Multi-access Networkso Extensive flooding of LSAs
For every LSA sent out there must be an acknowledgement of receipt sent back to transmitting router.
consequence: lots of bandwidth consumed and chaotic traffic
133
OSPF in Multi-access Networkso Solution to LSA flooding issue is the use of
�Designated router (DR)
�Backup designated router (BDR)
o DR & BDR selection
�Routers are elected to send & receive LSA
o Sending & Receiving LSA
�DR others only form full adjacencies with the DR and BDR in the network.
�DR others send LSAs via multicast 224.0.0.6 to DR & BDR
�DR forward LSA via multicast address 224.0.0.5 to all other routers
134
OSPF in Multi-access Networks
DR/BDR Election Process
o DR/BDR elections DO NOT occur in point to point networks
135
OSPF in Multi-access Networkso DR/BDR elections will take place on multi-access networks
as shown below
136
OSPF in Multi-access NetworksCriteria for getting elected DR/BDR
1. DR: Router with the highest OSPF interface priority.
2. BDR: Router with the second highest OSPF interface priority.
3. If OSPF interface priorities are equal, the
highest router ID is used to break the tie.
137
OSPF in Multi-access Networks
o Timing of DR/BDR Election
� Occurs as soon as 1st router has its interface
enabled on multi-access network
• When a DR is elected it remains as the DR until one
of the following occurs
-The DR fails.
-The OSPF process on the DR fails.
-The multi-access interface on the DR fails.
138
OSPF in Multiaccess Networks
o Manipulating the election process
-If you want to influence the election of DR & BDR then
do one of the following
�Boot up the DR first, followed by the BDR, and then boot all
other routers,
OR
�Shut down the interface on all routers, followed by a no
shutdown on the DR, then the BDR, and then all other routers.
139
OSPF in Multiaccess Networks
OSPF Interface Priority
o Manipulating the DR/BDR election process continued
�Use the ip ospf priority interface command.
�Example:Router(config-if)#ip ospf priority {0 - 255}
�Priority number range 0 to 255•0 means the router cannot become the DR or BDR
•1 is the default priority value
140
More OSPF Configuration
Redistributing an OSPF Default Route
o Topology includes a link to ISP
�Router connected to ISP
�Called an autonomous system border router
�Used to propagate a default route
•Example of static default route
R1(config)#ip route 0.0.0.0 0.0.0.0 loopback 1
•Requires the use of the default-information originatecommand
•Example of default-information originate command
R1(config-router)#default-information originate
141
More OSPF Configuration
Fine-Tuning OSPF
o Since link speeds are getting faster it may be necessary to change reference bandwidth values
�Do this using the auto-cost reference-bandwidthcommand
�Example:
� R1(config-router)#auto-cost reference-bandwidth 10000
142
More OSPF Configuration
Fine-Tuning OSPF
o Modifying OSPF timers
�Reason to modify timers
�Faster detection of network failures
�Manually modifying Hello & Dead intervals
�Router(config-if)#ip ospf hello-interval seconds
�Router(config-if)#ip ospf dead-interval seconds
�Point to be made
�Hello & Dead intervals must be the same
between neighbors
143
Summary
o RFC 2328 describes OSPF link state concepts and operations
o 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 ACKNOWLEDGEMENT144
Summary
o OSPF Characteristics
�Metric = cost�Lowest cost = best path
o 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
145
Summary
oVerifying OSPF configuration
�Use the following commands
�show ip protocol
�show ip route
�show ip ospf interface
�show ip ospf neighbor
Question ?