Routing Notes by Keith
Topic Links
Administrative Distances
Metrics
Classful and Classless Protocols
Common Ports
Routing Algorithms and Features
OSPF
Queuing Strategies
EIGRP
Administrative Distances
An administrative
distance is a measure of the trustworthiness of a route.The router uses
this to determine the best path when there is information from more than one
routing protocol.The lower the administrative distance the greater the
reliability of the information. The EIGRP summary route can only be seen on
the table where the summary was configured.
|
Source of Route |
Administrative
Distance (default value) |
|
Connected
Interface |
0 |
|
Static Route out
an interface |
0 |
|
Static Route to
next hop |
1 |
|
EIGRP Summary
Route |
5 |
|
External BGP |
20 |
|
Internal EIGRP |
90 |
|
IGRP |
100 |
|
OSPF |
110 |
|
IS-IS |
115 |
|
RIP(Version 1 and
Version 2) |
120 |
|
EGP |
140 |
|
External EIGRP |
170 |
|
Internal BGP |
200 |
|
Unknown |
255 |
Routing Metrics
Each routing protocol uses different methods to
determine the best path.In order to determine the best path a routing metric
is created.Depending on the protocol it may be as simple as hop count (RIP
v1) or much more complex as is the case with IGRP which uses up to 5 factors
in determining the final metric.The standard metric formula for IGRP is:
Metric = (K1*Bandwidth) + [(K2 * bandwidth) / (256
Load)] + (K3 * Delay) Then
IF K5 {MTU} is not zero, Metric = Metric * (K5/
(reliability + K4))
Given default constant values: Metric = bandwidth +
delay
Bandwidth is in Kbps and delay is in microseconds and
can be determined with the show interfaces command.
Classfull
and Classless Protocols
IGRP and RIP v1 are
Classfull protocols and will only do
route summarization at the class boundaries.
OSPF, EIGRP, RIP v2,
BGP-4, and IS-IS are classless protocols.Route summarization is
manual and selected boundaries.
Classless protocols use different subnet masks within a
network, this is called variable-length subnet masking or VLSM.This permits
more selective summarization that would be possible with
Classfull routing.
Common Ports
TCP Port- 6UDP Port-17TFTP - 69
RIP Port-520IGRP Protocol 9
DNS Port-53SNMP Port- 161
Routing Algorithms and Features
RIP and IGRP use Bellman-Ford for route
calculation
EIGRP uses Diffusing Update Algorithm (DUAL)
Distance Vector
Protocols
|
Feature |
RIPv1 |
RIPv2 |
IGRP |
EIGRP |
|
Count to Infinity |
YES |
YES |
YES |
NO |
|
Split Horizon |
YES |
YES |
YES |
YES |
|
Hold Down Timer |
YES |
YES |
YES |
NO |
|
Triggered Updates w/ Rt
Poisining |
YES |
YES |
YES |
YES |
|
Load Bal Equal Paths |
YES |
YES |
YES |
YES |
|
Load Bal UnEqual
Paths |
NO |
NO |
YES |
YES |
|
VSLM Support |
NO |
YES |
NO |
YES |
|
Metric |
HOPS |
HOPS |
Composite |
Composite |
|
Hop CountLimit |
15 |
15 |
100 |
100 |
The default for IGRP and EIGRP on hop count limit is
100 but it can be configured to be 255.For IGRP that makes it
scalable for medium size enterprises and for EIGRP for
large enterprises.
Link
State Protocols
|
Feature |
OSPF |
IS-IS |
EIGRP |
|
Hierarchical Topology Required |
YES |
YES |
NO |
|
Retains Information on all possible routes |
YES |
YES |
YES |
|
Route Summarization (Manual) |
YES |
YES |
YES |
|
Route Summarization (Automatic) |
NO |
NO |
YES |
|
Event-Triggered Announcements |
YES |
YES |
YES |
|
Load Balancing (Equal-Paths) |
YES |
YES |
YES |
|
Load Balancing (Unequal Paths) |
NO |
NO |
YES |
|
VSLM Support |
YES |
YES |
YES |
|
Routing Algorithm |
Dijkstra |
IS-IS |
DUAL |
|
Hop-Count limit |
Unlimited |
1024 |
100 |
|
|
|
|
|
OSPF
1)
General Basics of OSPF
2)
Database Types
3
Multicast Addresses
4)
Hello Packet Structure
5
Election and Exchange Process
6)
Modes and Topologies
7)
Basic OSPF Commands
8)
Description of Update Process
9)
Keys to Understanding OSPF in Larger Network
Open Shortest Path First
version 2 (OSPF) is:
an Interior Gateway Protocol (IGP)
is described inRFC 2328
has faster convergence than RIP
floods routing changes throughout network
supports Variable length subnet masks (VSLM)
OSPF was written for larger networks, specifically 50 +
routers.
It uses protocol
number 89 with:
6- TCP
17- UDP
OSPF uses cost metrics
assigned to the interface output side, called:
interface output cost and based on
the speed of the media (bandwidth)
OSPF Routers form
adjacencies with neighbors.To have an adjacency means
that the databases for the two routers have been
synchronized.
Link States are advertised to other routers with
LSAs
Link
State Advertisements
Neighbors are defined as two routers that have
interfaces on a
common network.These are discovered and maintained with
Hello packets
(TOP)
OSPF has three databases:
Neighbor database
bi-directional communication
Link-State database
(topology database)
Routing table -
(forwarding database) which is created using the
SPF algorithm (Dijkstra
algorithm)
OSPF Topologies
Broadcast Multiaccess
Point-to-Point
Nonbroadcast multiaccess (NBMA)
[Frame or X.25]
(TOP)
Hello packets are sent out to
an address called the AllSPFRouter address as
multicast on 224.0.0.5 on MAC
address: 010005E 0000005 it also uses
multicast
on 224.0.0.6 on MAC address: 010005E 0000006
(TOP)
Hello Packets include:
Router ID:This is the
highest IP address on an active interface
Used to break ties in DR and
BDR elections if priority is tied
Hello and
dead intervals:Time between sends (10 sec
default) and the time before a link is considered down is the dead interval,
generally 4 time the hello interval. (NBMA is 30 seconds and 120 seconds
respectively.)
Neighbors:Has bi-directional communication
meaning that the router sees itself in the other routers hello packet.
Area ID:Routers that share a common segment
have the same subnet and mask and have the same link-state information.
Router Priority:8-bit number that indicates
the priority of the router during DR and BDR elections.The higher priority
the more likely the selection. Each link has its own election process set at
the interface configuration mode.
BDR and DR
IP Addresses:The addresses of the BDR and
DR
Authentication
PasswordSet if authentication is used
Stub area flag:Two routers must agree on
this in hello packets
OSPF Packet Header Includes:
Version Number
Type
Hello
Database Description (adjacency)
Link-state request
Link- state update
Link-state Ack
Packet Length
Router ID (source)
Checksum
Authentication Type:
0 no authentication
1 clear text
2- MD5
Authentication Information
Data routing information
On multiaccess networks the
DR and BDR get routing updates but only the DR sends out
the updates, unless the DR goes down.Each router must
set up an adjacentcy with the DR and the
BDR.After the initial election new routers form an adjacency with the DR and
the BDR.
(TOP)
Election Process:
Router with highest priority is the DR and the next
highest is the BDR
The default interface priority is 1.
The highestrouter ID breaks ties.
A router with the priority of 0 cannot be a BDR or DR.
A router that is not the DR or BDR is called a
Drother.
If a DR goes down, the BDR becomes the DR and a new BDR
is elected
Higher priority routers added to the network do not
cause a new election.
BDR uses a reliability timer if no LSA is heard then
it assumes the DR is down.
OSPF Exchange/Startup
Process Upon All Routers Coming Up at the Same Time
Step
1:Router is in down state and sends a hello packet our all participating
interfaces on 224.0.0.5.
Step 2:
Router that get packet from (1) add the sending router to their list of
neighbors. This is the init state.
Step 3:
All routers that got the first packet send a reply hello packet that
includes
all other
neighboring routers.
Step 4:
The first router sees its own ID in the packet and adds the other routers to
its neighbor database. This creates the two-way state.
Step 5:
Election for DR and BDR is held. Once this is held the routers are in an
exstart state where the exchange protocol
movesthe routers toward a full state. With the exchange protocol the DR and
the BDR establish adjacencies witheach router on the network, then based on
the higher router ID they decide on a master/slave relationship with the
master as the higher router ID.Link state info is exchanged between the DR
and BDR and the router with which they have adjacencies.Database Description
Packets (DBDs or DDPs
(Database Descriptor Packets)) are exchanged with sequence numbers defined
by the master.The slave gets the DBD, sends a LSAck,
compares the DBD to see if it is more up to date. If it is more up to date,
it asks for a Link-State Update (LSU) by sending a Link-State Request(LSR).
This is called the Loading state. When all the LSRs
are satisfied, the routers are in the full state.
Step 6:
Hello packets are sent each 10 sec. including the names of the DR and BDR.
OSPF
works on cost metrics, the higher the bandwidth, the lower the cost.
OSPF
keeps up to 6 equal cost route entries in the table for load balancing.
The
default is 4 but the maximum-paths router configuration command.
will
allow up to 6. paths to same destination.
Flapping
causes new LSUs, so each time a LSU is received
the router waits for a
period of
time before recalculating the routing table (5 seconds is the default.) the
times
spf spf-delay spf-holdtime command allows
this to be configured.
The SPF algorithm forms an SPF Tree which is a
loop free shortest path to all
networks with the router as the root.
MultiaccessLink
state process
Step
1:Router notices a change floods it to 224.0.0.6 the all DR and BDR address
with an LSU packet that includes one or many LSAs.
Step
2:The DR acknowledges this and floods the LSU to the other routers on the
network on 224.0.0.5.Each router responds with an LSAck.
Step 3 :
If the router is connected to other networks it forwards the LSU to the DR
of those networks or to the adjacent routers if point-to-point.Those
DRs then multicast the LSUs
Step 4:
When a router receives the LSU is takes the changed
LSAs and updates its link-state database. This is then used to run
the SPF algoithm and update the routing
database.
LSA age field aging timer = default
of 30 minutes.When this expires the router that originated the LSU sends an
update to say the link is still valid.
Entries
that already exist are discarded.
Point-to-Point links have no election. Both routers automatically become
adjacent
routers.
debug ip
ospf adj -Lookat the point-to-point adjacency
election
For BRI/PRI
and Asynchronous
BRI/PRI
use dialer-map along with OSPF configuration + Broadcast to indicate that
broadcasts should be forwarded to the protocol address.
For
Asynchronous use:
async
default routing
(TOP)
Non-Broadcast MultiAccess Topologies (NBMA)
1.
Broadcast option must be enable for all Virtual Circuits
2. Full
mesh (n(n-1))/2 where n is the number of sites
Two modes of OSPF in NBMA Networks
Non-Broadcast MultiAccess All
broadcast packets are replicated and sent to all routers, usually in a fully
meshed topology.Possible configuration to be sure all adjacencies are set.
RFC-defined
Point-to-Multipoint treats the NBMA
network as a set of point-to-point links, no election, usually used in
partially meshed networks. RFC defined.
NBMA topology often uses subinterfaces.
Router(config)# interface serial number.subinterface-number
{multipoint | point-to-point}
Default
OSPF mode for point-to-point subinterface is point-to-point mode
Default
OSPF mode for point-to multipoint subinterface mode is non-broadcast
MultiAccess mode.
In NBMA
mode sometimes a subinterface can fail while the main link or keep alives
from another subinterface continue meaning that OSPF fails to notice the
down link.
Point-to-multipoint does not require full mesh, but all routers are on one
IP subnet. It does not require the static neighbor configuration.
Other
Modes:
Point-to-multipoint non-broadcast requires static definition of neighbors
Broadcast
mode adjacency is automatic Cisco standard
Point-to-point NBMA mode (TOP)
OSPF Commands
router
ospf process-id
router(config-router)# network address wildcard-mask area
area-id
{note on
wildcard masks 1 means dont care and 0 means match}
To set a
higher router ID use loopback command:
router(config)# interface loopback number
{Since
loopback addresses are always active a loopback address can be more reliable
for key routers}
To
determine the router ID of a router:
show
ip ospf interface
To change
the ospf priority on a router:
Router(config-if) ip ospf priority number (Can be 1-255)
The highest priority is the DR, 1 is the default and 0
is a drother.
To change the link cost:
ip ospf cost cost
Some default costs are:
56 kbps serial link 1785
T1 - 64
Ethernet10
16 Mbps Token Ring6
To change the cost use
the:
router(config-router) #auto-cost reference-bandwidth
reference-bandwidth
The reference bandwidth is
100Mbps or 10^8 bps.Also ip ospf cost overrides the
calculation process.
Setting mode type:
router(config-if)# ip ospf network
command-mode
nonbroadcast
point-to-multipoint
point-to-multipoint non-broadcast
broadcast
point-to-point
The neighbor command is used to configure ospf
neighbors:
router(config-router)#neighbor
ip-address [priority number] [poll-interval sec] [cost
number]
Verification commands
show ip route
show ip protocols
show ip route ospf
show ip ospf interface e0
show ip ospf
show ip ospf neighbor
show ip ospf neighbor detail
show ip ospf database
clear ip route * (resets routing table)
clear ip route destination network
debug ip ospf events
displays information about protocol related events such as flooding, DR/BDR
election and spf calculations
debug ip ospf packet
displays information about each OSPF packet received
Other parameters for debug ip ospf include:
Adjacent
flood
lsa-generation
retransmission
spf
tree
(TOP)
Description of update
process:
A router receives an LSA and first checks if the LSA is
from an external network or if
the router itself is a stub router.If either of these
items is true then the router acknowledges
the LSA then discards the LSA.Next the router checks if
the LSA timer (MAXAGE) has
expired or if the neighbor is in a loading or exchange
state.If either of these items is true
then the LSA is acknowledged and discarded.If this
false, then the router check to see if
the LSA is in its topological database.If it is in the
topological database and the LSA received
is more recent than the one in the database then a new
LSA is sent to the sender of the old LSA,
and then the arrival of the LSA is checked against the
last run of the SPF algorithm and if the
minimum timer after the last run of the algorithm has
expired, then the LSA is flooded out all
interfaces except for the arriving interface.If the LSA
is less recent than LSA already in the
database, then the packet is discarded and
acknowledged.The more recent LSA is installed
in the topological database, time stamped with the
arrival time and acknowledged.
(TOP)
OSPF Larger Networks
For an OSPF network with Multiple
Areas there are a set ofkey concepts:
AREA 0 This is the backbone area.
ABRs - Area Border Routers
ASBRs - Autonomous System Border Routers
Stub Areas -Only accept internal route updates
Totally Stubby Areas -Only accepts default route to
other networks
Not So Stubby Areas - Accepts limited summary routes to
other networks
LSA Types - Internal and External
LSAs are key to working with area types.
Summarization at area boundaries and the definition of
area types control the size of routing tables.
Queuing Strategies
1.)First
In First Out (FIFO) This is the default queuing method for
all interfaces over E1(2.048 Mbps).Packets come
in and they are buffered and go out in the order in which they arrived. This
is the fastest method but makes no distinction between types of packets.
2.)Priority
Queuing Each packet type is assigned a priority of high,
medium, normal or low.The high queue is emptied first then medium, normal
then low. It is possible that lower priority traffic can never get sent.
3.)Custom Queuing
16 queues are allowed and bandwidth assigned to each.More sensitive
traffic an be assigned larger bandwidth.
4.)Weighted-Fair
Queuing A complex algorithm determines the distribution of
packets assigning them precedence and breaking up large packet streams so
all traffic can get through. This is the only dynamic queuing method.
EIGRP
- is a mixed distance vector/link state
routing protocol. It is proprietary for Cisco. There are two versions of
EIGRP, v1 and v2 which has been available since 11.1(3). v2 includes many
enhancements that aid in its stability.
Key advantages are:
Rapid convergence
Only network change information is
propagated
Normal operation in a stable network yields
only hello traffic
EIGRP uses DUAL (Diffused Update Algorithm) to
determine the best path.
EIGRP chooses the best path as the successor
path and next best path as the feasible successor. Knowledge about the
network is derived from hello packets sent on a 5 second basis for high
bandwidth links and every 60 seconds for lower bandwidth links. These
hellos generate neighbor information. When a router sees another router's
hello packets it becomes a neighbor.
Examples of low bandwidth circuits are
multipoint frame T1 or less circuits or ISDN BRI circuits.
Hello Interval - the time between hello packets
Hold Time - the amount of time where a router
does not receive a hello packet. This is usually 3 times
the Hello interval. By
default this would be 15 and 180 seconds.
The hello interval can be adjusted with the
ip hello-interval eigrp
The hold
time can be adjusted with the ip hold-time eigrp
To see
eigrp neighbors type - show ip eigrp neighbor
Eigrp does
not build peers over secondary addresses.
In a point to multi-point topologies the
broadcast key work must be used in the frame-relay map command.
Eigrp installs routes in a topology table which
can be seen with the show ip eigrp topology
statement. This table has the
information needed to build a set of vectors and distances needed to reach
each
network.
EIGRP Metrics:
The base formula for EIGRP metrics is:
metric = [K1 * bandwidth + (K2 * bandwidth) /
(256 − load) + K3 * delay] * [K5 / (reliability + K4)]
Using the default values for K1 -> K5 this
reduces down to:
metric = bandwidth + delay calculated as
[(10000000/(bandwidth) + SUM(Delays)) *256]
The lowest configured bandwidth is used an the
delays in Microseconds / 10 are summed
to get to the total delay.
PATHS
The feasible distance
is the best metric along the path toward a destination network
including the
metric to the neighbor advertising that path.
The reported distance
is the metric to the destination network as advertised by an upstream
neighbor.
A feasible successor
is a path whose reported distance is less than the feasible
distance (best path)
Note a feasible successor will only be
designated if the successor metric is less than the reported
distance for that route. If no successor is in
place then new queries are sent when a route goes down.
Return to Top