Class Power Points for Chapter #7

advertisement
Sybex CCNA 640-802
Chapter 7: EIGRP and OSPF
Chapter 7 Objectives
• Enhanced IGRP (EIGRP)
– EIGRP tables
– Configuring EIGRP
– Verifying EIGRP
• Open Shortest Path First (OSPF)
– Configuring OSPF
– Verifying OSPF
– Configuring OSPF with wildcards
2
What is EIGRP?
• EIGRP is an advanced distance-vector routing
protocol that relies on features commonly
associated with link-state protocols.
• EIGRP uses Link State's partial updates and
neighbor discovery.
• EIGRP's advanced features supports IP, IPX and
AppleTalk.
• EIGRP uses RTP (Reliable Transport Protocol) to
transport its routing updates
3
What Is EIGRP?
IP Routing
Protocols
AppleTalk
Routing Protocol
IP Routing
Protocols
Enhanced
IGRP
IPX Routing
Protocols
AppleTalk
Routing Protocol
IPX Routing
Protocols
• Enhanced IGRP supports:
– Rapid convergence
– Reduced bandwidth usage
– Multiple network-layer support
• EIGRP includes support for AppleTalk, IP, and Novell NetWare as well
as IP and IP v.6. The AppleTalk implementation redistributes routes
learned from the Routing Table Maintenance Protocol (RTMP). The IP
implementation redistributes routes learned from OSPF, RIP, IS-IS, EGP
and BGP. The Novell implementation redistributes routes learned from
4
Novell RIP or Service Advertisement Protocol (SAP).
What Is EIGRP?
IP Routing
Protocols
AppleTalk
Routing Protocol
IPX Routing
Protocols
IP Routing
Protocols
Enhanced
IGRP
AppleTalk
Routing Protocol
IPX Routing
Protocols
• Enhanced IGRP supports:
– Uses Diffused Update Algorithm (DUAL) to select
loop-free routes and enable fast convergence.
• DUAL enables EIGRP routers to determine whether a path
advertised by a neighbor is looped or loop-free, and
• Allows a router running EIGRP to find alternate paths
without waiting on updates from other routers.
– Up to 6 unequal paths to remote network, default = 4
5
Comparing EIGRP to IGRP
• Both IGRP and EIGRP:
– Use “Autonomous Systems” (AS) to divide the
internetwork
• [This is the number that you include when configuring the
protocol; e.g.: “router (e)igrp 1”
• All routers in the same AS
– use at least one common protocol,
– share the same routing information and
– are “contiguous”.
– They also use the same metrics: bandwidth, delay,
load and reliability; with MTU as a tiebreaker.
– Same load balancing properties
– Maximum hop count of 255 (100 default)
6
Comparing EIGRP to IGRP
• But EIGRP:
– Includes the subnet mask information in its routing
updates, which allows the use of VLSM.
– And helps EIGRP to differentiate between internal
(within an AS) and external (between ASs) routes
– Also, it does not send “any periodic updates” (which
IGRP sends every 90 seconds)
– EIGRP has improved convergence time – much
faster than IGRP
– EIGRP also sharply reduces network overhead
7
EIGRP for IP
• No updates: Route updates sent only when a change
occurs – multicast on 224.0.0.10
• “Hello” messages sent to neighbors every 5 seconds
(60 seconds in most WANs)
Enhanced IGRP
EIGRP
EIGRP
hello
8
EIGRP for IP
EIGRP and PDMs (Protocol-dependent modules ):
– Supports IP (and through IP (v.4 & 6), IPX, OSPF, IS-IS,
RIP and RIP v.2, EGP (Exterior Gateway Protocol), and
BGP (Border Gate Protocol), AppleTalk which gives you
RTMP (Routing Table Maintenance Protocol), and Novell
NetWare, supporting IPX, Novell RIP and SAP (Service
Ad Protocol).
– EIGRP supports more protocols than any other routing
protocol, (only IS-IS comes close), by using PDMs.
– Each PDM keeps it’s own set of routing tables.
– PDMs are responsible for network layer protocolspecific requirements.
• The IP-EIGRP module, for example, is responsible for sending
and receiving EIGRP packets that are encapsulated in IP.
9
EIGRP for IP
• EIGRP (other features):
– Is “Classless”
– Supports VLSM and CIDR.
– Supports “discontiguous” networks &
“summarization”
– Uses RTP (Reliable Transport Protocol) (see ff) for
communication – uses multicasts and unicasts for
quick updates with receipts for tracking data.
– Uses the “DUAL” algorithm; unique and efficient.
10
EIGRP Terminology and Operation 1
• EIGRP sends out five different types of packets—
–
–
–
–
–
hello,
update,
query,
reply, and
acknowledge (ACK)—
• that establish the initial adjacency between neighbors
and to keep the topology and routing tables current.
• When troubleshooting an EIGRP network, network
administrators must understand what EIGRP packets are
used for and how they are exchanged.
• For example, if routers running EIGRP do not form
neighbor relationships, those routers cannot exchange
EIGRP updates with each other and cannot connect to
services across the internetwork.
11
EIGRP Terminology and Operation 2
• The following terms are related to EIGRP:
• Neighbor table (contains neighbors)
– EIGRP routers use hello packets to discover neighbors.
– When a router discovers and forms an adjacency with a new
neighbor, it includes the neighbor's address and the interface
through which it can be reached in an entry in the neighbor table.
– This table is comparable to the neighborship (adjacency)
database used by link-state routing protocols.
– It serves the same purpose—ensuring bidirectional
communication between each of the directly connected
neighbors.
– EIGRP keeps a neighbor table for each network protocol
supported; in other words, the following tables could exist: an IP
neighbor table, an IPX and an AppleTalk neighbor table.
12
EIGRP Terminology and Operation 3
• Topology table (contains updates re: all routes)
– When the router dynamically discovers a new
neighbor, it sends an update about the routes it knows
to its new neighbor and receives the same back.
– These updates populate the topology table.
– The topology table contains all destinations advertised
by neighboring routers;
• in other words, each router stores its neighbors' routing
tables in its EIGRP topology table.
– If a neighbor is advertising a destination, it must be
using that route to forward packets;
• this rule must be strictly followed by all distance vector
protocols.
• An EIGRP router maintains a topology table for each network
13
protocol configured (IP, IPX, and AppleTalk).
EIGRP Terminology and Operation 4
Advertised distance (AD) & feasible distance (FD)
– DUAL uses distance information, known as a metric or
cost, to select efficient, loop-free paths.
– The lowest-cost route is calculated by adding the cost
between the next-hop router and the destination—referred
to as the advertised distance—to the cost between the
local router and the next-hop router. The sum of these
costs is referred to as the feasible distance.
Successor
– Is a neighboring router that has a least-cost path to a
destination (the lowest FD) that is guaranteed not to be
part of a routing loop
– Successors are used for forwarding packets.
14
– Multiple successors can exist if they have the same FD.
EIGRP Terminology and Operation 5
• Routing table (contains only the best routes)
– Holds the best routes to each destination and is
used for forwarding packets.
– Successor routes are offered to the routing table.
– If a router learns more than one route to exactly the
same destination from different routing sources, it
uses the administrative distance to determine which
route to keep in the routing table.
– By default, up to 4 routes to the same destination
with the same metric can be added to the routing
table (the table can hold up to 6 unequal cost paths).
– The router maintains one routing table for each
15
network protocol configured.
EIGRP Terminology and Operation 6
• Feasible successor (FS)
– Along with keeping least-cost paths, DUAL keeps
backup paths to each destination.
– The next-hop router for a backup path is called the
“feasible successor”.
– To qualify as a feasible successor, a next-hop router
must have an AD less than the FD of the current
successor route
• in other words, a feasible successor is a neighbor that is
closer to the destination, but it is not the least-cost path
and, thus, is not used to forward data.
• Feasible successors are selected at the same time as
successors but are kept only in the topology table.
• The topology table can maintain multiple feasible
successors for a destination.
16
EIGRP Terminology and Operation 7
– If the route via the successor becomes invalid
(because of a topology change for example) or if a
neighbor changes the metric, DUAL checks for
feasible successors to the destination.
– If a feasible successor is found, DUAL uses it, thereby
avoiding recomputing the route.
– If no suitable feasible successor exists, a
recomputation must occur to determine the new
successor.
– Although recomputation is not processor-intensive, it
does affect convergence time, so it is advantageous to
avoid unnecessary recomputations.
17
IGRP and EIGRP Metric Calculation - 1
• The composite metric is calculated with the
following formula:
• By default, k1=k3=1 and k2=k4=k5=0. The default
composite metric for EIGRP, adjusted for scaling
factors, is as follows:
18
IGRP and EIGRP Metric Calculation - 2
• BWmin is in kbps and the sum of delays are in 10s of
microseconds.
• Example
• The bandwidth and delay for an Ethernet interface are 10
Mbps and 1ms, respectively.
• The calculated EIGRP BW metric is as follows:
–
–
–
–
256 × 107/BW = 256 × 107/10,000,
= 256 x (10,000,000/10,000)
= 256 × 10,000
= 256000
19
EIGRP Neighbor Discovery -1
• EIGRP routers actively establish relationships with their
neighbors, similar to what Link State routers do.
• EIGRP routers establish “adjacencies” with neighbor routers
by using small hello packets.
• The Hello protocol uses a multicast address of 224.0.0.10,
and all routers periodically send hellos.
20
EIGRP Neighbor Discovery - 2
• On hearing hellos, the router creates a table of its
neighbors.
• The continued receipt of these packets maintains the
neighbor table
• To become a neighbor, the following 3 conditions must
be met:
1. The router must hear a hello packet or an ACK from a
neighbor.
2. The AS number in the packet header must be the same as
that of the receiving router.
3. The neighbor’s metric settings must be the same.
• Note:
– Each Layer 3 protocol has its own neighbor table.
21
Neighbor Discovery - 3
22
Neighbor Discovery - 4
By forming adjacencies, EIGRP routers do the
following:
– Dynamically learn of new routes that join their
network
– Identify routers that become either unreachable or
inoperable
– Rediscover routers that had previously been
unreachable
23
EIGRP Timers
• EIGRP updates are set only when necessary and are
sent only to neighboring routers. There is no periodic
update timer.
• EIGRP use hello packets to learn of neighboring routes.
• The holdtime to maintain a neighbor adjacency is three
times the hello time.
• For hello is not received with the holdtime, the
neighbor is removed from the table.
24
Default Hello Intervals and
Hold Time for EIGRP
25
Routing Concepts
– Topics now considered in more detail:
• EIGRP relies on four fundamental concepts:
1.
2.
3.
4.
neighbor tables,
topology tables,
route states, and
route tagging.
• Each of these is summarized in the slides that
follow.
26
Routing Concepts: 1. Neighbor Tables
When a router discovers a new
neighbor, it records the
neighbor’s address and
interface as an entry in the
“neighbor table”.
• One neighbor table exists
for each protocoldependent module.
When a neighbor sends a hello
packet, it advertises a hold time.
• This is the amount of time
that a router treats a
neighbor as reachable and
operational.
If a hello packet is not received
within the hold time, the hold
time expires.
• DUAL is informed of the
topology change.
27
Routing Concepts: 1. Neighbor Tables
A neighbor-table entry includes info
required by RTP.
Sequence numbers are employed to match
acknowledgments with data packets, and the
last sequence number received from the
neighbor is recorded so that out-of-order
packets can be detected.
A “transmission list” is used to queue packets for
possible retransmission on a per-neighbor basis.
“Round-trip timers” are kept in the neighbor-table
entry to estimate an optimal retransmission interval.
28
What is in the Neighbor Table?
SRTT: “Smooth Round Trip timer”: Time
for round trip to neighbor and back.
RTO: “Retransmission Time Out”: Time
EIGRP waits to send a packet from its
retransmission queue to a neighbor.
Q count - the number of EIGRP Packets
that the software is waiting to send
29
Routing Concepts: 2. Topology Tables
The “topology table” contains all destinations advertised by
neighboring routers.
The protocol-dependent modules populate the table, and the table
is acted on by the DUAL “finite-state” machine.
Each entry in the topology table includes the destination address
and a list of neighbors that have advertised the destination.
For each neighbor, the entry records the advertised metric, which
the neighbor stores in its routing table.
An important rule that distance vector protocols must follow is that if
the neighbor advertises this destination, it must use the route to
forward packets.
30
Dual Terminology - 1
• AD (Advertised distance) is the metric that is reported
by the neighbor router(s).
• FD (Feasible Distance) – Feasible distance is the metric
that is reported by neighbor router(s), plus the cost
associated with the forwarding link from the local
interface to the neighbor router(s).
– When multiple paths exist, the “local FD” is the lowest-cost
metric to a remote network.
• Feasibility Condition – If the AD from a given neighbor
is less than the locally calculated FD, that neighbor
meets the criteria to become the feasible successor.
31
Dual Terminology - 2
• Successor - A successor is a neighboring router that
is currently being used for packet forwarding; it
provides the least-cost route to the destination and is
not part of a routing loop
• Feasible successor - A feasible successor is a backup
route. Feasible successors provide the next lowest-cost
path without introducing routing loops.
– Feasible successor routes can be used in case the existing
route fails.
– Packets to the destination network are immediately
forwarded to the feasible successor, which at that point is
promoted to the status of successor
32
Successor routes
• Successor route is used by EIGRP to forward traffic to a
destination
• A successor routes may be backed up by a feasible successor
route
• Successor routes are stored in both the topology table and the
routing table
Topology Table—IP
Destination 1 Successor
Destination 1 Feasible Successor
Routing Table—IP
Destination 1 Successor
33
EIGRP successors and feasible successors - 1
34
EIGRP successors and feasible successors - 2
35
EIGRP successors and feasible successors - 3
36
Dual Example – 1a
37
Dual Example – 1b
• In the previous slide, EIGRP's composite metric is replaced
by a link cost to simplify calculations.
• RTA's topology table includes a list of all routes advertised
by neighbors.
• For each network, RTA keeps the real (computed) cost of
getting to that network and also keeps the advertised cost
(reported distance) from its neighbor.
38
Dual Example – 1c
• RTY is the successor to network 24, by virtue of its
lowest computed cost 31. This value is also the FD to
Network 24.
• RTA follows a three-step process to select a feasible
successor to become a successor for Network 24:
– Determine which neighbors have a reported distance (RD)
(=AD) to Network 24 that is less than 31.
– RTX's RD is 30 < 31, meet FC and is a feasible successor.
– RTZ's RD is 220 > 31, not meet FC, and cannot be a FS.
39
Dual Example – 2a
(a) Is the Destination Network
40
Dual Example – 2b
• In this example, (a) is the destination network,
• From C’s point of view, if it goes to (a) via B, the
FD is 3 and the AD is 1. Others entries are
computed in the same manner.
• Note in the example that router D does not
have a feasible successor identified. The FD
for router D to router A is 2 and the AD via router
C is 3. Because the AD is larger than the FD,
no feasible successor is placed in the topology
table.
41
Dual Example – 2c
• Router C has a feasible successor identified
because the AD for the next hop router is
less than the FD for the successor.
• How about router E?
42
EIGRP Convergence - 1
• In the context of routing protocols, convergence
refers to the speed and ability of a group of
internetworking devices running a specific routing
protocol to agree on the topology of an internetwork
after a change in that topology.
• DUAL results in EIGRP's exceptionally fast
convergence. Why?
• The FS provides the capability to make an immediate
switchover to a backup route!
43
EIGRP Convergence - 2
44
EIGRP Neighbor Tables
• The most important table in EIGRP is the neighbor table and
relationships tracked in the neighbor table are the basis for all
the EIGRP routing update and convergence activity.
• The neighbor table contains information about adjacent
neighboring EIGRP routers.
• A neighbor table is used to support reliable, sequenced
delivery of packets.
• An EIGRP router can maintain neighbor tables, one for each
PDM running (e.gmultiple ., IP, IPX, and AppleTalk) routed
protocols.
45
EIGRP Packet Types - 1
• Hello packets assist in the discovery of EIGRP
neighbors.
– The packets are multicast to 224.0.0.10.
• An acknowledgment packet acknowledges the
reception of an update packet.
– An acknowledgment packet is a hello packet with no data.
– Acknowledgment packets are sent to the unicast address of
the sender of the update packet.
46
EIGRP Packet Types - 2
• Update packets contain the routing information of
destinations.
– Update packets are unicast to newly discovered neighbors;
otherwise, update packets are multicast to 224.0.0.10 when a
link metric changes.
– Update packets are acknowledged to ensure reliable
transmission.
• Query packets are sent to find feasible successors to
a destination.
– Query packets are always multicast.
47
EIGRP Packet Types - 3
• Reply packets are sent to respond to query
packets.
– Reply packets provide a feasible successor to the
sender of the query.
– Reply packets are unicast to the sender of the query
packet.
48
Routing Concepts: 3. Route States
A topology-table entry for a destination can exist in one of two states:
active or passive.
A destination is in the passive state when the router is not performing
a recomputation; it is in the active state when the router is.
If feasible successors are always available, a destination never has
to go into the active state, thereby avoiding a recomputation.
A recomputation occurs when a destination has no feasible
successors.
The router initiates the recomputation by sending a query packet to
each of its neighboring routers.
After the router has received a reply from each neighboring router the
router can select a successor.
49
Routing Concepts: 4. Route Tagging
EIGRP supports internal
and external routes.
External routes are
learned by another
routing protocol or
reside in the routing
table as static routes.
These routes are tagged
individually with the
identity of their origin.
Internal routes originate
within an EIGRP AS.
External routes are tagged with this
information:
• Router ID of the router that redistributed the
route
• AS number of the destination
• Configurable administrator tag
• ID of the external protocol
• Metric from the external protocol
• Bit flags for default routing
50
EIGRP Tables and Packets
• The neighbor table and topology table are held in
ram and are maintained through the use of hello
and update packets.
Enhanced IGRP
EIGRP
EIGRP
hello
To see all feasible successor routes known to a router, use the
“show ip eigrp topology” command
51
Choosing Routes
IP
IP
A
AppleTalk
B
19.2
T1
IPX
T1
IPX
T1
C
AppleTalk
D
• EIGRP uses a composite metric to pick the best path:
bandwidth and delay of the line by default.
• EIGRP can load balance across six unequal cost paths to
a remote network (4 by default)
52
Configuring EIGRP for IP
AS=10
A
10.110.1.0
B
C
172.16.10.0
Token
Ring
192.168.0.0
192.168.0.0
Enable EIGRP
Assign networks
Router(config)#router eigrp 10
Router(config-router)#network 10.0.0.0
Router(config-router)#network 172.16.0.0
If you use the same AS number for EIGRP as IGRP, EIGRP will automatically
redistribute IGRP into EIGRP
53
Redistribution
Redistribution is translating one type of routing
protocol into another.
EIGRP
IGRP
Router B
Router A
Router D
Router C
IGRP and EIGRP translate automatically, as long as they are both using the
same AS number. See another example - next slide:
54
Using EIGRP with IGRP
55
Route Path
Assuming all default parameters, which route will
RIP (v1 and v2) take, and which route(s) will
IGRP and EIGRP take to get from Routers A to B?
T1
T1
56K
10BaseT
Router B
100BaseT
Router A
100BaseT
56
Verifying EIGRP Operation
Router# show ip eigrp neighbors
• Displays the neighbors discovered
by IP Enhanced IGRP
Router# show ip eigrp topology
• Displays the IP Enhanced IGRP
topology table
Router# show ip route eigrp
• Displays current Enhanced IGRP
entries in the routing table
Router# show ip protocols
• Displays the parameters and current
state of the active routing protocol
process
Router# show ip eigrp traffic
• Displays the number of IP Enhanced
IGRP packets sent and received
57
Show IP Route
P1R1#sh ip route
[output cut]
Gateway of last resort is not set
D 192.168.30.0/24 [90/2172] via 192.168.20.2,00:04:36, Serial0/0
C 192.168.10.0/24 is directly connected, FastEthernet0/0
D 192.168.40.0/24 [90/2681] via 192.168.20.2,00:04:36, Serial0/0
C 192.168.20.0/24 is directly connected, Serial0/0
D 192.168.50.0/24 [90/2707] via 192.168.20.2,00:04:35, Serial0/0
P1R1#
-D is for “DUAL”
-[90/2172] is the administrative distance and cost of
the route. The “cost” of the route is a composite metric
comprised from the bandwidth and delay of the line
58
Some EIGRP Features
• Large Network support:
– Support for multiple Autonomous Systems: This is
one way to break up a large number of hosts.
• VLSM Support and Summarization:
– Support for “discontiguous networks”:
– This is a network in which 2 subnets of a classful
network; say, 10.1.0.0 and 10.2.0.0, which are both
part of the “classful” 10.0.0.0 network,
– are separated by a different classful network; say
172.16.0.0, or any subnet in that network.
– By default, EIGRP does not handle this configuration,
(only OSPF can), but it can be configured to do so. 59
Some EIGRP Features
• Load Balancing:
– EIGRP can handle equal or unequal load balancing
– By default, up to 4 links; up to 6 links can be
configured with the “maximum paths” command.
60
EIGRP Configuration
• Initial Setup (pg 426, and Cisco command reference):
• Step
Command
• 1
router eigrp autonomous-system
• 2
network network-number
Purpose
Enable an EIGRP routing
process in global config mode.
Associate networks with an EIGRP
routing process in router config mode.
• Create a Passive Interface
– Router(config-router)#passive-interface serial 0/1
This prohibits an interface from sending or
receiving Hellos; so it will never form
adjacencies.
• Redistribution and Set Metric values
– The following example takes redistributed Routing Information Protocol (RIP) metrics and
translates them into EIGRP metrics with values as follows: bandwidth = 1000, delay = 100,
reliability = 250, loading = 100, and MTU = 1500.
– router eigrp 1
– network 172.16.0.0
Command Syntax
– redistribute rip
redistribute (IP)
– default-metric 1000 100 250 100 1500 default-metric bandwidth delay reliability loading mtu
61
EIGRP Configuration
(continued)
Load Balancing –
– This is automatic with EIGRP; the only time you need to configure
it is when you want to vary the load over each of several links.
– In this case you would use the “traffice-share balanced” or the
“variance” command:
• To control how traffic is distributed among routes when there are multiple
routes for the same destination network that have different costs, use the
traffic-share balanced command in router configuration mode. To disable
this function, use the no form of the command.
– traffic-share balanced
• To control load balancing in an Enhanced Interior Gateway
Routing Protocol (EIGRP) based internetwork, use the
variance command in router configuration mode. To reset
the variance to the default value, use the no form of this
command.
– variance multiplier
62
Introducing OSPF
(pg 444 ff)
• Open standard
• Shortest path first (SPF) algorithm
• Link-state routing protocol (vs. distance vector)
• Can be used to route between AS’s
OSPF Hierarchical Routing
•
•
•
•
Consists of areas and autonomous systems
Minimizes routing update traffic
Supports VLSM
Unlimited hop count
64
Link State Vs. Distance Vector
Link State:
•
•
•
•
Provides common view of entire topology
Calculates shortest path
Utilizes event-triggered updates
Can be used to route between AS’s
Distance Vector:
•Exchanges routing tables with neighbors
•Utilizes frequent periodic updates
65
Types of OSPF Routers
Area 1
Backbone Area 0
Area 2
ABR and
Backbone
Router
Backbone/
Internal
Routers
Internal
Routers
Internal
Routers
ASBR and
Backbone
Router
ABR and
Backbone
Router
•External AS
66
Compare RIP to OSPF
Feature
Algorithm
RIP
OSPF
Subsystem
Segmentation
Vector-distance
Link-state
15 hops. 16 hops is considered
Limited only by size of routing tables within
to be infinity, implying that the
routers
destination is unreachable
Breaks the autonomous system into one or
Treats the autonomous system
more areas with two levels of routing
as a single subsystem
algorithms, intra-area, and inter-area.
Metric
Destination/hop
Integrity
Supports Authentication. Several
No authentication in RIP-1,
authentication algorithms are available
Authentication has been added
ranging from simple password operations to
to RIP-2
more complex cryptographic algorithms.
Maximum Hops
Destination/cost/link identifier
Complexity
Relatively Simple
More Complex. Several more PDUs and
exchanges are defined in the protocol.
Routing tables are large and include not
only destinations, but also a tree
representation of local network.
Acceptance
Widely Available, BSD routed
supports RIP
Newer, published in RFCs
Route Options
Identifies a single route to a
destination
Supports multiple routes to a single
destination. Facilitates load-balancing traffic
distribution
Types of Routes
Host, network. RIP-2 adds the
ability to transfer subnetwork
Host, network, and subnetwork routes
route entries
67
Configuring Single Area OSPF
Router(config)#router ospf <process-id>
Defines OSPF as the IP routing protocol.
Note: The process ID is locally significant and is needed
to identify a unique instance of an OSPF database
Router(config-router)#network address mask area <area-id>
Assigns networks to a specific OSPF area
OSPF Example
R2
10.1.3.0
Area 0
R1
R3
10.5.5.0
10.1.2.0
hostname R3
router ospf 10
network 10.1.2.3 0.0.0.0 area 0
network 10.1.3.1 0.0.0.0 area 0
10.1.1.0
hostname R2
hostname R1
router ospf 20
network 10.0.0.0 0.255.255.255 area 0
router ospf 30
network 10.1.0.0 0.0.255.255 area 0
network 10.5.5.0 0.0.0.0 area 0
69
Verifying the OSPF Configuration
Router#show ip protocols
Verifies that OSPF is configured
Router#show ip route
Displays all the routes learned by the router
Router#show ip ospf interface
Displays area-ID and adjacency information
Router#show ip ospf neighbor
Displays OSPF-neighbor information on a per-interface basis
70
OSFP Neighbors
• OSPF uses hello packets to create adjacencies and
maintain connectivity with neighbor routers
• OSPF uses the multicast address 224.0.0.5
Hello?
224.0.0.5
•Hello packets provides dynamic neighbor discovery
•Hello Packets maintains neighbor relationships
•Hello packets and LSA’s from other routers help build & maintain the topological database
71
OSPF Terminology
Neighbor:
– Two routers that have an interface on a common network
– Usually discovered by hello’s but can also be configured administratively
Adjacency
– Relationship formed between selected neighbors in which routing
information is exchanged. Not all neighbors are adjacent
– Only Broadcast and Non-Broadcast network types have Designated
and Backup Designated Routers!!!
Neighbors
ABR
DR
Adjacencies
Non-DR
Cost=6
BDR
72
OSPF Terminology – Table: part 1
Term
Description
Link state
Information is shared between directly connected routers. This information propagates throughout the
network unchanged and is also used to create a shortest path first (SPF) tree.
Area
A group of routers that share the same area ID. All OSPF routers require area assignments.
Autonomous system (AS)
A network under a common network administration.
Cost
The routing metric used by OSPF. Lower costs are always preferred. You can manually configure the
cost with the ip ospf cost command. By default, the cost is calculated by using the formula cost = 10 8 /
bandwidth.
Router ID
Each OSPF router requires a unique router ID, which is the highest IP address configured on a Cisco
router or the highest numbered loopback address. You can manually assign the router ID.
Adjacency
When two OSPF routers have exchanged information between each other and have the same topology
table. An adjacency can have the following different states or exchange states:
1. Init state —When Hello packets have been sent and are awaiting a reply to establish two-way communication.
2. Establish bi-directional (two-way) communication —Accomplished by the discovery of the Hello protocol routers and the election
of a DR.
3. Exstart —Two neighbor routers form a master/slave relationship and agree upon a starting sequence to be incremented to ensure
LSAs are acknowledged.
4. Exchange state —Database Description (DD) packets continue to flow as the slave router acknowledges the master's packets.
OSPF is operational because the routers can send and receive LSAs between each other. DD packets contain information, such as
the router ID, area ID, checksum, if authentication is used, link-state type, and the advertising router. LSA packets contain
information, such as router ID also but in addition include MTU sizes, DD sequence numbering, and any options.
5. Loading state —Link-state requests are sent to neighbors asking for recent advertisements that have not yet been discovered.
6. Full state —Neighbor routers are fully adjacent because their link-state databases are fully synchronized. Routing tables begin to
73
be populated.
OSPF Terminology – Table: part 2
Topology table
Also called the link-state table. This table contains every link in the whole network.
Designated router (DR)
This router is responsible for ensuring adjacencies between all neighbors on a
multiaccess network (such as Ethernet). This ensures all routers do not need to
maintain full adjacencies with each other.
The DR is selected based on the router priority. In a tie, the router with the highest router ID is selected.
Backup DR
A backup router designed to perform the same functions in case the DR fails.
Link-state advertisement
(LSA)
A packet that contains all relevant information regarding a router's links and the
state of those links.
Priority
Sets the router's priority so a DR or BDR can be correctly elected.
Router links
Describe the state and cost of the router's interfaces to the area. Router links use
LSA type 1.
Summary links
Originated by area border routers (ABRs) and describe networks in the AS.
Summary links use LSA types 3 and 4.
Network links
Originated by DRs. Network links use LSA type 2.
External links
Originated by autonomous system boundary routers (ASBRs) and describe
external or default routes to the outside (that is, non- OSPF) devices for use with
redistribution. External Links use the LSA type 5.
Area border router (ABR)
Router located on the border of one or more OSPF areas that connects those areas
to the backbone network.
Autonomous system
74
Router ID (RID)
Each router in OSPF needs to be uniquely identified to
properly arrange them in the Neighbor tables.
75
Electing the DR and BDR
Multicast Hellos are sent and compared
Router with Highest Priority is Elected as DR
Router with 2nd Highest Priority is Elected as BDR
• OSPF sends Hellos which elect DRs and BDRs
• Routers form adjacencies with DRs and BDRs in a multi-access
environment
• The next slide covers loopback interfaces. The reason you would
configure a loopback (a logical interface) is to assign it the highest
priority interface on the router, thus ensuring that it will become the
DR.
• This avoids the router selecting a physical interface as DR, which is
sometimes undesirable because physical interfaces can go up and
down and sometimes fail to provide a stable routing environment.
76
Configuring Loopback Interfaces
Router ID (RID):
– Number by which the router is known to OSPF
– Default: The highest IP address on an active interface at the
moment of OSPF process startup
– Can be overridden by a loopback interface: Highest IP address
of any active loopback interface – also called a logical interface
Interface Priorities
What is the default OSPF interface priority?
Router# show ip ospf interface ethernet0/0
Ethernet0 is up, line protocol is up
Internet Address 192.168.1.137/29, Area 4
Process ID 19, Router ID 192.168.1.137, Network Type BROADCAST,
Cost: 10 Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.1.137, Interface address 192.168.1.137
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
78
Interface Priorities
ip ospf priority
• To set the router priority, which helps determine the designated
router for this network, use the ip ospf priority command in
interface configuration mode.
– To return to the default value, use the no form of this command.
• ip ospf priority number-value
• no ip ospf priority number-value
• Syntax Description
– number-value <A number value that specifies the priority of
the router. The range is from 0 to 255>
79
Ensuring your DR
What options can you configure that will ensure that R2 will be
the DR of the LAN segment?
Configuring Wildcards
If you want to advertise a partial octet (subnet),
you need to use wildcards.
– 0.0.0.0 means all octets match exactly
– 0.0.0.255 means that the first three match exactly,
but the last octet can be any value
After that, you must remember your block sizes….
81
Wildcard
The wildcard address is always one less than the block
size….
–
–
–
–
–
192.168.10.8/30 = 0.0.0.3
192.168.10.48/28 = 0.0.0.15
192.168.10.96/27 = 0.0.0.31
192.168.10.128/26 = 0.0.0.63
What the author means is that where, in the first line, you’ve
borrowed 6 bits to get a /30 subnet mask, and this would give
you 64 subnets with 4 hosts in each! The “4” is the “block size”
that the author refers to. So, in the wildcard, the last number
must be one less than 4, or “3”.
– Same thing in line 2: /28 means 4 bits borrowed; this gives you 82
16 subnets with 16 hosts in each. Block size is 16 and the
wildcard is 16-1, or 15.
Wildcard Configuration of the Lab_B Router
•
•
•
Lab_A
E0: 192.168.30.1/24
S0: 172.16.10.5/30
•
•
•
•
Lab_B
E0: 192.168.40.1/24
S0: 192.168.10.10/30
S1: 192.168.10.6/30
•
•
•
Lab_C
E0: 192.168.50.1/24
S1: 172.16.10.9/30
83
Summary
• Go through all the written and review questions
• Go over the answers with the class
84
84
Download