IRT0030 ANDMESIDE
LOENG 5
Indrek Rokk
Harjutus
• Aadress
2001:db8:aaaa:fc:50a5:8a35:a5bb:66e1/64
• Küsimused
• Interface ID
• Subnet prefix
• Site prefix
• ISP prefix
• ISP prefix kahendkoodis
• Registry number
• Registry number kahendkoodis
2
Harjutus - vastus
• Aadress
2001:db8:aaaa:fc:50a5:8a35:a5bb:66e1/64
• Küsimused
• Interface ID - 50a5:8a35:a5bb:66e1
• Subnet prefix - 00fc
• Site prefix - aaaa
• ISP prefix - 1:0db8
• ISP prefix kahendkoodis - 0001 0000 1100 1011 1000
• Registry number - 000
• Registry number kahendkoodis - 0 0000 0000
3
Routing versus Forwarding
• Routing = building maps and giving directions
• Forwarding = moving packets between interfaces
according to the “directions”
4
IP Routing – finding the path
• Path derived from information received from a routing
protocol
• Several alternative paths may exist best path stored in forwarding
table
• Decisions are updated periodically or as topology changes (event
driven)
• Decisions are based on:
• topology, policies and metrics (hop count, filtering, delay, bandwidth,
etc.)
5
IP Forwarding
• Router makes decision on which interface a packet is sent to
• Forwarding table populated by routing process
• Forwarding decisions:
• destination address
• class of service (fair queuing, precedence, others)
• local requirements (packet filtering)
• Can be aided by special hardware
6
Routing Tables Feed the Forwarding
Table
7
RIBs and FIBs
• FIB is the Forwarding Table
• It contains destinations and the interfaces to get to those
destinations
• Used by the router to figure out where to send the packet
• Careful! Some people call this a route!
• RIB is the Routing Table
• It contains a list of all the destinations and the various next hops
used to get to those destinations – and lots of other information too!
• One destination can have lots of possible next-hops –only the best
next-hop goes into the FIB
8
Router as a Computer
9
Routing Table Structure • Routing Table is stored in ram and contains information
about:
Directly connected networks - this occurs when a device is
connected to another router interface
Remotely connected networks - this is a network that is not
directly connected to a particular router
Detailed information about the networks include source of
information, network address & subnet mask, and IP address of
next-hop router
10
Routing Table Structure • Dynamic routing protocols
• -Used to add remote networks to a routing table
• -Are used to discover networks
• -Are used to update and maintain routing tables
• Automatic network discovery
• -Routers are able discover new networks by sharing routing
table information
11
Routing Table Structure • Maintaining routing tables
• -Dynamic routing protocols are used to share routing information with
other router & to maintain and up date their own routing table.
• IP routing protocols. Example of routing protocols include:
• -RIP
• -EIGRP
• -OSPF
12
Routing Table Structure • 3 principles regarding routing tables:
Every router makes its decisions alone, based on the information it
has in its routing table.
Different routing table may contain different information
A routing table can tell how to get to a destination but not how to get
back
13
Effects of the 3 Routing Table Principles • -Packets are forwarded through the network from one router to
another, on a hop by hop basis.
• -Packets can take path “X” to a destination but return via path “Y”
(Asymmetric routing).
14
Router Paths and Packet Switching • A Metric is a numerical value used
by routing protocols help determine the best path to a destination – The smaller the metric value the
better the path
• 2 types of metrics used by routing protocols are: • Hop count - this is the number of
routers a packet must travel through to get to its destination R1 --> R3
• Bandwidth - this is the “speed” of a link also known as the data capacity of a link R1 --> R2 --> R3
15
Router Paths and Packet Switching • Path determination is a process used by a router to pick the best
path to a destination
• One of 3 path determinations results from searching for the best path
• Directly connected network
• Remote network
• No route determined
16
Using Static Routing
17
Dynamic Routing Protocols • Advantages of static routing
• -It can backup multiple interfaces/networks on a router
• -Easy to configure
• -No extra resources are needed
• -More secure
• Disadvantages of static routing
• -Network changes require manual reconfiguration
• -Does not scale well in large topologies
18
The Role of Dynamic Routing Protocols
Advantages of dynamic routing
Automatically share information about remote networks
Determine the best path to each network and add this information
to their routing tables
Compared to static routing, dynamic routing protocols require less
administrative overhead
Help the network administrator manage the time-consuming
process of configuring and maintaining static routes
Disadvantages of dynamic routing
Dedicate part of a routers resources for protocol operation,
including CPU time and network link bandwidth
Times when static routing is more appropriate
19
Dynamic Routing Protocols • Function(s) of Dynamic Routing Protocols:
• Dynamically share information between routers.
• Automatically update routing table when topology changes.
• Determine best path to a destination.
20
Dynamic Routing Protocols • The purpose of a dynamic routing protocol is to:
• -Discover remote networks
• -Maintaining up-to-date routing information
• -Choosing the best path to destination networks
• -Ability to find a new best path if the current path is no longer
available
21
Dynamic Routing Protocols • Components of a routing protocol
• Algorithm
• In the case of a routing protocol algorithms are used for facilitating
routing information and best path determination
• Routing protocol messages
• These are messages for discovering neighbors and exchange of
routing information
22
Classifying Routing Protocols • Types of routing protocols:
• -Interior Gateway Protocols (IGP)
• -Exterior Gateway Protocols (EGP)
23
Classifying Routing Protocols • Interior Gateway Routing Protocols (IGP)
• -Used for routing inside an autonomous system & used to route
within the individual networks themselves.
• -Examples: RIP, EIGRP, OSPF
• Exterior Routing Protocols (EGP)
• -Used for routing between autonomous systems
• -Example: BGPv4
24
Classifying Routing Protocols • IGP: Comparison of Distance Vector & Link State
Routing Protocols • Distance vector
routes are advertised as vectors of distance & direction.
incomplete view of network topology.
Generally, periodic updates.
• Link state
complete view of network topology is created.
updates are not periodic.
25
Distance Vector or Link-State Routing Protocols
• Distance vector protocols use routers as sign posts along
the path to the final destination. The only information a
router knows about a remote network is the distance or
metric to reach that network and which path or interface to
use to get there. Distance vector routing protocols do not
have an actual map of the network topology. Rumor based.
• A link-state routing protocol is like having a complete map
of the network topology. The sign posts along the way from
source to destination are not necessary, because all link-
state routers are using an identical map of the network. A
link-state router uses the link-state information to create a
topology map and to select the best path to all destination
networks in the topology.
Routing protocol comparison
• Speed of Convergence - Speed of convergence defines
how quickly the routers in the network topology share
routing information and reach a state of consistent
knowledge. The faster the convergence, the more
preferable the protocol. Routing loops can occur when
inconsistent routing tables are not updated due to slow
convergence in a changing network.
• Scalability - Scalability defines how large a network can
become, based on the routing protocol that is deployed.
The larger the network is, the more scalable the routing
protocol needs to be.
27
Routing protocol comparison
• Classful or Classless (Use of VLSM) - Classful routing
protocols do not include the subnet mask and cannot
support VLSM. Classless routing protocols include the
subnet mask in the updates. Classless routing protocols
support VLSM and better route summarization.
• Resource Usage - Resource usage includes the
requirements of a routing protocol such as memory space
(RAM), CPU utilization, and link bandwidth utilization.
Higher resource requirements necessitate more powerful
hardware to support the routing protocol operation, in
addition to the packet forwarding processes.
28
Routing protocol comparison
• Implementation and Maintenance - Implementation and
maintenance describes the level of knowledge that is
required for a network administrator to implement and
maintain the network based on the routing protocol
deployed.
29
Classifying Routing Protocols • Convergence is defined as when all routers’ routing
tables are at a state of consistency
30
Achieving Convergence
Network converged when all routers have complete and
accurate information about the entire network.
Convergence time is the time it takes routers to share
information, calculate best paths, and update their
routing tables.
A network is not completely operable until the network
has converged.
Convergence properties include the speed of
propagation of routing information and the calculation of
optimal paths. The speed of propagation refers to the
amount of time it takes for routers within the network to
forward routing information.
31
Routing Protocols Metrics • Metric
• A value used by a routing protocol to determine which
routes are better than others.
32
Routing Protocols Metrics • Metrics used in IP routing protocols
• -Bandwidth
• -Cost
• -Delay
• -Hop count
• -Load
• -Reliability
33
Administrative Distance of a Route • Purpose of a metric
• It’s a calculated value used to determine the best path to a
destination
• Purpose of Administrative Distance
• It’s a numeric value that specifies the preference of a particular
route
34
Distance Vector Routing Protocols • Distance Vector Technology
–The Meaning of Distance Vector:
• A router using distance vector routing protocols
knows 2 things:
Distance to final destination
Vector, or direction, traffic should be directed
35
• A router using a distance vector routing protocol does not
have the knowledge of the entire path to a destination
network. Instead the router knows only:
• The direction or interface in which packets should be forwarded
• The distance or how far it is to the destination network
36
Distance Vector Routing Protocols
Characteristics of Distance Vector routing protocols:
Periodic updates
Neighbors
Broadcast updates
Entire routing table is included with routing update
37
Distance Vector Routing Protocols Routing Protocol Algorithm:
-Defined as a procedure for accomplishing a certain task
38
Distance Vector Routing Protocols
39
Network Discovery
• Router initial start up (Cold Starts)
-Initial network discovery
Directly connected networks are initially placed in
routing table
40
Network Discovery
• Initial Exchange of Routing Information
– If a routing protocol is configured then
-Routers will exchange routing information
• Routing updates received from other routers
-Router checks update for new information
If there is new information:
-Metric is updated
-New information is
stored in routing table
41
Network Discovery • Exchange of Routing Information
–Router convergence is reached when
-All routing tables in the network contain the
same network information
–Routers continue to exchange routing information
-If no new information is found then Convergence is
reached
42
Network Discovery
• Convergence must be reached before a network is
considered completely operable
• Speed of achieving convergence consists of 2
interdependent categories
-Speed of broadcasting routing information
-Speed of calculating routes
43
Network Discovery
44
Routing Table Maintenance
• Periodic Updates: RIPv1 & RIPv2
These are time intervals in which a router sends
out its entire routing table.
45
Routing Table Maintenance
• Random Jitter
• Synchronized updates
• A condition where multiple routers on multi access LAN segments
transmit routing updates at the same time.
Problems with synchronized updates
• -Bandwidth consumption
• -Packet collisions
Solution to problems with
synchronized updates
- Used of random variable called RIP_JITTER
46
Routing Table Maintenance
• RIP uses 4 timers
• -Update timer
• -Invalid timer
• -Holddown timer
• -Flush timer
47
Configuring Passive Interfaces
Sending out unneeded updates on a LAN
impacts the network in three ways:
Wasted Bandwidth
Wasted Resources
Security Risk
48
Routing Table Maintenance
• Bounded Updates: EIGRP
• EIGRP routing updates are
-Partial updates
-Triggered by topology changes
-Bounded
-Non periodic
49
Routing Table Maintenance
• Triggered Updates
–Conditions in which triggered updates are sent
-Interface changes state
-Route becomes unreachable
-Route is placed in routing table
50
Routing Loops
• Routing loops are
A condition in which a
packet is continuously
transmitted within a
series of routers
without ever reaching
its destination.
51
Routing Loops
• Routing loops may be caused by:
-Incorrectly configured static routes -Incorrectly configured route redistribution -Slow convergence -Incorrectly configured discard routes
• Routing loops can create the following issues
-Excess use of bandwidth -CPU resources may be strained -Network convergence is degraded -Routing updates may be lost or not processed in a timely
manner
52
Routing Loops
• Count to Infinity
This is a routing loop whereby packets bounce
infinitely around a network.
53
Routing Loops
• Setting a maximum
• Distance Vector routing protocols set a specified
metric value to indicate infinity
Once a router “counts to infinity” it marks the route
as unreachable
54
Routing Loops
• Preventing loops with holddown timers
• -Holddown timers allow a router to not accept any changes to a route for a specified period of time.
• -Point of using holddown timers Allows routing updates to propagate through network with the most
current information.
55
Routing Loops
• The Split Horizon Rule is used to prevent routing loops
• Split Horizon rule:
A router should not advertise a network through
the interface from which the update came.
56
Routing Loops
• Split horizon with
poison reverse
The rule states that
once a router learns of
an unreachable route
through an interface,
advertise it as
unreachable back
through the same
interface
57
Routing Loops • IP & TTL
– Purpose of the TTL field
The TTL field is found in an IP header and
is used to prevent packets from endlessly
traveling on a network
• How the TTL field works
-TTL field contains a numeric value
The numeric value is decreased by one by
every router on the route to the destination.
If numeric value reaches 0 then Packet
is discarded.
58
Routing Protocols Today • Factors used to determine whether to use RIP or EIGRP
include
-Network size
-Compatibility between models of routers
-Administrative knowledge
59
Routing Protocols Today
• RIP
Features of RIP:
-Supports split horizon & split horizon with
poison reverse
-Capable of load balancing
-Easy to configure
-Works in a multi vendor router environment
60
Routing Protocols Today
• EIGRP
Features of EIGRP: Triggered updates
EIGRP hello protocol used to establish neighbor adjacencies
Supports VLSM & route summarization
Use of topology table to maintain all routes
Classless distance vector routing protocol
Cisco proprietary protocol 2013 - basic functionality of EIGRP released as an open standard
61
Marsruutimisprotokollid
• Distance vector
• Marsruudid sisaldavad kaugust ja suunda
• Kaugusel mingi mõõt (hüpete arv)
• Suund on järgmine marsruuter või väljumis võrguliides
• Parim tee naabritelt info
• Naaber X – võrku Z on 4 hüpet
• Naaber Y – võrku Z on 8 hüpet
• Valib tee läbi naabri X
• Ei tea kogu teed lõpp punkti
• Teab, et kas läbi X või Y, kuidas võrk sealt edasi välja näeb ei tea
• RIP, EIGRP
62
Marsruutimisprotokollid
• Link state
• The basic concept of link-state routing is that every node constructs
a map of the connectivity to the network, in the form of a graph,
showing which nodes are connected to which other nodes.
• Saadetakse infot ühendatud linkide oleku kohta ja info teiste
marsruuterite kohta
• Protokollid
• Open Shortest Path First (OSPF)
• Intermediate System-to-Intermediate System (IS-IS)
63
64
Link-State Routing Steps
• Each routers learns about its own directly connected networks
• Link state routers exchange hello packet to “meet” other directly connected link state routers.
• Each router builds its own Link State Packet (LSP) which includes information about neighbors such as neighbor ID, link type, & bandwidth.
• After the LSP is created the router floods it to all neighbors who then store the information and then forward it until all routers have the same information.
• Once all the routers have received all the LSPs, the routers then construct a topological map of the network which is used to determine the best routes to a destination
65
Directly Connected Networks
• Link - This is an interface on a router
• Link state - This is the information about the state of the links
66
Sending Hello Packets to Neighbors • Connected interfaces that are using
the same link state routing protocols
will exchange hello packets.
• Once routers learn it has neighbors
they form an adjacency
-2 adjacent neighbors will
exchange hello packets
-These packets will serve as a
keep alive function
67
Establish Neighbor Adjacencies
68
Establish Neighbor Adjacencies
DR and BDR election only occurs on multi-access networks such as Ethernet LANs.
69
OSPF DR and BDR
70
OSPF Designated Router
• Designated Router (DR) is the solution to managing
adjacencies and flooding of LSAs on a multiaccess
network.
• Backup Designated Router (BDR) also elected in case DR
fails.
• All other Routers DROTHER only form adjacencies with the
DR and BDR.
• DROTHERs only send their LSAs to the DR and BDR
using the multicast address 224.0.0.6.
• DR uses the multicast address 224.0.0.5 to send LSAs to
all other routers. DR only router flooding LSAs.
• DR/BDR Elections only necessary on multiaccess networks.
71
Default DR/BDR Election Process
• The router with the highest interface priority is elected as the DR.
• The router with the second highest interface priority is elected as the BDR.
• Priority can be configured between 0-255. • Priority of 0 - router cannot become the DR.
• If interface priorities are equal then the router with highest router ID is elected DR and second highest the BDR
• 3 ways to determine router ID: • Router ID can be manually configured. • If not configured, ID determined by highest loopback IP
address. • If no loopbacks, ID is determined by the highest active IPv4
address.
• In an IPv6 network, Router ID must be configured manually.
Building the Link State Packet
• Each router builds its own Link State Packet (LSP)
Contents of LSP:
-State of each directly connected link
-Includes information about neighbors such as
neighbor ID, link type & bandwidth.
73
Building the Link State Packet
74
Flooding LSPs to Neighbors
• Once LSP are created they are forwarded out to neighbors.
-After receiving the LSP the neighbor continues to forward it throughout
routing area.
75
Link-State Routing
76
Shortest Path First (SPF) Tree • Building a portion of the SPF tree
Process begins by examining R2’s LSP information
-R1 ignores 1st LSP
Reason: R1 already knows it’s connected to R2
77
78
79
80
81
82
Building a portion of the SPF tree
• R1 uses LSP from R2 Reason: R1 learns that R2 is connected to 10.9.0.0/16.
This link is added to R1’s SPF tree.
R2 has a network 10.5.0.0/16 with a cost of 2 and no neighbors
This link is added to R1's SPF tree.
83
Building a portion of the SPF tree
• R1 uses 3rd LSP Reason: R1 learns that R3 is connected to 10.7.0.0/16.
This link is added to R1’s SPF tree.
R3 has a network 10.6.0.0/16 with a cost of 2 and no neighbors
This link is added to R1's SPF tree.
84
Determining the shortest path • The shortest path to a destination determined by adding the
costs & finding the lowest cost
85
86
Determining the shortest path
• Once the SPF algorithm has determined the shortest
path routes, these routes are placed in the routing table.
87
Determining the shortest path
88
OSPF
• OSPF does not use a Transport layer protocol, as OSPF
packets are sent directly over IP.
• Protocol Number 89
89
OSPF packet types
• Hello - Hello packets are used to establish and maintain
adjacency with other OSPF routers.
• 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.
• LSR - Receiving routers can then request more
information about any entry in the DBD by sending a Link-
State Request (LSR).
90
OSPF packet types
• 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). LSUs and LSAs are briefly discussed in a later
topic.
• LSAck - When an LSU is received, the router sends a
Link-State Acknowledgement (LSAck) to confirm receipt
of the LSU.
91
Hello packets
• Discover OSPF neighbors and establish neighbor
adjacencies.
• Advertise parameters on which two routers must agree to
become neighbors.
• Elect the Designated Router (DR) and Backup
Designated Router (BDR) on multiaccess networks like
Ethernet and Frame Relay.
• Multicast address 224.0.0.5
92
• OSPF routers are sending Hello packets on all OSPF-
enabled interfaces to determine if there are any neighbors
on those links.
• Receiving an OSPF Hello packet on an interface confirms
for a router that there is another OSPF router on this link.
93
94
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
95
OSPF Metric
• 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 interface • Cost is calculated using the formula
• 108 / bandwidth
• Reference bandwidth
• defaults to 100Mbps
96
Cost: Example Strategy
• 100GE 100Gbps cost = 1
• 40GE/OC768 40Gbps cost = 2
• 10GE/OC192 10Gbps cost = 5
• OC48 2.5Gbps cost = 10
• GigEthernet 1Gbps cost = 20
• OC12 622Mbps cost = 50
• OC3 155Mbps cost = 100
• FastEthernet 100Mbps cost = 200
• Ethernet 10Mbps cost = 500
• E1 2Mbps cost = 1000
97
Advantages of Link State
• Builds a Topological Map - Link-state routing protocols
create a topological map, or SPF tree of the network
topology. Because link-state routing protocols exchange
link-states, the SPF algorithm can build an SPF tree of the
network. Using the SPF tree, each router can
independently determine the shortest path to every
network.
• Fast Convergence - When receiving an LSP, link-state
routing protocols immediately flood the LSP out all
interfaces except for the interface from which the LSP was
received. In contrast, RIP needs to process each routing
update and update its routing table before flooding them
out other interfaces.
98
Advantages of Link State
• Event-driven Updates - After the initial flooding of LSPs,
link-state routing protocols only send out an LSP when
there is a change in the topology. The LSP contains only
the information regarding the affected link. Unlike some
distance vector routing protocols, link-state routing
protocols do not send periodic updates.
• Hierarchical Design - Link-state routing protocols use the
concept of areas. Multiple areas create a hierarchical
design to networks, allowing for better route aggregation
(summarization) and the isolation of routing issues within
an area.
99
OSPF head omadused
• Low Bandwidth Utilisation
• Only changes propagated
• Uses multicast on multi-access broadcast networks
100
OSPF head omadused
• Fast Convergence
• Detection Plus LSA/SPF
• LSA flooded throughout area
• Acknowledgement based
• Topology database
synchronised
• Each router derives routing
table to destination network
101
Disadvantages of Link State
• Memory Requirements - Link-state protocols require
additional memory to create and maintain the link-state
database and SPF tree.
• Processing Requirements - Link-state protocols can also
require more CPU processing than distance vector routing
protocols. The SPF algorithm requires more CPU time
than distance vector algorithms such as Bellman-Ford,
because link-state protocols build a complete map of the
topology.
• Bandwidth Requirements - The flooding of link-state
packets can adversely affect the available bandwidth on a
network. This should only occur during initial startup of
routers, but can also be an issue on unstable networks.
102
Single-Area OSPF
Single-area OSPF is useful in smaller networks. If an
area becomes too big, the following issues must be
addressed:
• Large routing table (no summarization by default)
• Large link-state database (LSDB)
• Frequent SPF algorithm calculations
Single-Area OSPF
OSPF and Multiaccess Networks Challenges in Multiaccess Networks
• OSPF defines five network types: – Point-to-point
– Broadcast Multiaccess
– Nonbroadcast Multiaccess (NBMA)
– Point-to-multipoint
– Virtual links
105
OSPF in Multiaccess Networks • 2 challenges presented by multiaccess networks
– Multiple adjacencies
– Extensive LSA flooding
106
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
107
Solution to LSA flooding issue
– Designated router (DR)
– Backup designated router (BDR)
• DR & BDR selection
– Routers are elected to send &
receive LSA
• Sending & Receiving LSA
– DRothers 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
108
Criteria 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.
109
Tuning OSPF
• Forcibly set your DR and BDR per segment so that they
are known
• Choose your most powerful, or most idle routers, so that
OSPF converges as fast as possible under maximum
network load conditions
• Try to keep the DR/BDR limited to one segment each
110
Multiarea OSPF Multiarea OSPF requires a hierarchical
network design and the main area is
called the backbone area (area 0) and
all other areas must connect to the
backbone area.
Disadvantages of Link-State Protocols
112
OSPF Areas
• Area is a group of contiguous hosts and networks
• Reduces routing traffic
• Per area topology database
• Invisible outside the area
• Backbone area MUST be contiguous
• All other areas must be connected to the backbone
113
114
OSPF Two-Layer Area Hierarchy
Multiarea OSPF is implemented in a two-layer area
hierarchy:
Backbone (Transit) area -
• Area whose primary function is the fast and efficient movement of IP
packets.
• Interconnect with other OSPF area types
• Called OSPF area 0 which all other areas directly connect
Regular (Non-backbone) area -
• Connects users and resources
• A regular area does not allow traffic from another area to use its links
to reach other areas
115
116
Types of OSPF Routers
Types of OSPF Routers
OSPF Route Types
119
Addressing for Areas
• Assign contiguous ranges of subnets per area to facilitate
summarisation
120