Distance Vector Linkstate
-
Upload
vo-ngoc-hoang -
Category
Documents
-
view
215 -
download
0
Transcript of Distance Vector Linkstate
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 1/40
DISTANCE VECTORROUTING
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 2/40
2
Distance vector algorithm
• Routing algorithms pass periodic copies of a routing table from router to router.
• Each router receives a routing table from
its directly connected neighbors.• Distance-vector algorithms do not allow a
router to know the exact topology of an
internetwork.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 3/40
3
Distance vector concepts
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 4/40
4
Exchange routing tables
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 5/40
5
Topology changes
• When the topology in a distance-vector protocol network changes, routing tableupdates must occur.
• Topology change updates proceed step-by-step from router to router.
• Distance-vector algorithms call for each
router to send its entire routing table toeach of its adjacent neighbors.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 6/40
6
Updating process
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 7/40
7
Routing Loop
Network 1
unreachable Network 1
Distance 3
• A stop routing packets to Net1
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 8/40
8
Counting to Infinity
Network 1
Distance 3
Network 1
Distance 4
Network 1
Distance 5
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 9/40
9
The problem of routing loops
• Routing loops can occur if a network'sslow convergence on a new configurationcauses inconsistent routing entries.
• Solutions: – Defining a Maximum
– Split Horizon
–
Split Horizon with Poison Reverse – Route Poisoning
– Hold-down Timers
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 10/40
10
Loop prevention: Defining a
Maximum
• Distance-vector protocols define infinity (vô tận)as a specific maximum number.
•
This number refers to a routing metric (e.g. asimple hop count).
• The routing protocol permits the routing loopto continue until the metric exceeds its
maximum allowed value.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 11/40
11
Loop prevention: Defining a
Maximum
MaximumMetric is 16
Network 1
unreachable
Network 1
Distance 14
Network 1
Distance 15
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 12/40
12
Loop prevention: Split horizon•
A routing loop occurs when incorrectinformation that has been sent back to a
router contradicts (mâu thuẩn) the correct
information that it sent.
• The routing protocol advertises routes out an
interface only if they were not learned from
updates entering that interface.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 13/40
13
Loop prevention: Split horizon
Network 1
Distance 1
Network 1
unreachable
Network Router Distance
1 C 2
Network Router Distance
1 A 3
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 14/40
14
Loop prevention: Poison
reverse
• The routing protocol advertises all routes out
an interface, but those learned from earlier
updates coming in that interface are markedwith infinite distance metrics.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 15/40
15
Loop prevention: Poison
reverse
Network 1
unreachable
Network 1
Distance 16
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 16/40
16
Loop prevention: Route
poisoning
• When a distance vector routing protocol
notices that a particular route is no longer
valid, it advertises that route, but with an
infinite metric, signifying that the route is
bad.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 17/40
17
Loop prevention: Route
poisoning
Network 1
Distance 16
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 18/40
18
Loop prevention: Hold-down
timer • After knowing that a route to a subnet has
failed, a router waits a certain period of time
before believing any other routing
information about that subnet.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 19/40
19
Loop prevention: Hold-down
timer
Network 1
unreachable
Network 1
Distance 2
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 20/40
LINK STATE ROUTING
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 21/40
21
Link state routing basics
• Link-state based routing algorithms, also knownas SPF (shortest path first) algorithms, maintaina complex database of topology information.
•
Link-state routing algorithm maintains fullknowledge of distant routers and how theyinterconnect.
• Link-state routing uses: –
Link-state advertisements (LSAs) – A topological database
– The SPF algorithm, and the resulting SPF tree
– A routing table of paths and ports to each network
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 22/40
22
Link state concepts
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 23/40
23
Exchange routing tables
• Routers exchange LSAs with each other.
• The router constructs this logical topologyas a tree, with itself as root.
• The SPF algorithm computes networkreachability. It then sorts these pathsshortest path first (SPF).
•The router lists its best paths, and theports to these destination networks, in therouting table.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 24/40
24
Link state network discovery
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 25/40
25
Topology changes
• Whenever a link-state topology changes,the routers first send information to allrouters in the internetwork.
• Each time an LSA packet causes achange to the link-state database, theshortest path first algorithm (SPF)recalculates the best paths and updatesthe routing table.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 26/40
26
Link state update
• Keeps track of its neighbors: name, status,and the cost.
• Constructs an LSA packet that lists its
neighbor router names and link costs.• Sends out this LSA packet so that all other
routers receive it.
•When it receives an LSA packet, recordsthe LSA packet in its database.
• Completes a map and then computesroutes by the SPF algorithm.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 27/40
27
LS concerns: Processing and
Memory• Network administrators must ensure that
the routers are capable of providing thesenecessary resources.
• For link-state routing, their memory mustbe able to hold information from variousdatabases, the topology tree, and therouting table.
• Using Dijkstra's algorithm to compute theSPF requires a processing task.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 28/40
28
LS concerns: Bandwidth
• During the initial discovery process, allrouters using link-state routing protocolssend LSA packets to all other routers.
• After that, link-state routing protocolsgenerally require only minimal bandwidthto send infrequent (không thường xuyên) or event-triggered LSA packets that reflect (mang lại)topology changes.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 29/40
30
Link state updates
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 30/40
THE CONTEXT OF
DIFFERENT ROUTING
PROTOCOLS
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 31/40
32
Distance Vector vs. Link State
routing
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 32/40
33
Hybrid routing protocols
• Examples:
– IS-IS (OSI)Intermediate System-
to-Intermediate System – EIGRP (Cisco)
Enhanced Interior Gateway Routing
Protocol
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 33/40
34
Hybrid routing protocols
• Combines aspects of both distance-vector and link-state routing.
• Use distance vectors with more accurate
metrics to determine the best paths todestination networks.
• Using topology changes to trigger routing
database updates.• Using fewer resources such as bandwidth,
memory, and processor overhead.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 34/40
35
LAN-to-LAN routing
• The network layer must understand andbe able to interface with various lower layers.
• Routers must be capable of seamlesslyhandling packets encapsulated intovarious lower-level frames withoutchanging the packets' Layer 3 addressing.
• Although the lower-layer framing mustchange when the router passes packettraffic, the Layer 3 addressing for source
and destination remains the same.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 35/40
36
LAN-to-LAN routing
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 36/40
37
LAN-to-WAN routing
• The network layer must interface with
various lower layers for LAN-to-WAN
traffic.
• The path taken by a packet may encounter
several relay points and a variety of data
link types.
• Routers enable packet flow by keeping thelayer 3 source and destination addresses
constant while encapsulating the packet in
data link frames.
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 37/40
38
LAN-to-WAN routing
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 38/40
39
Multiple protocols and media
7/27/2019 Distance Vector Linkstate
http://slidepdf.com/reader/full/distance-vector-linkstate 39/40
40
Summary
• Functions of the layer 3 include network
addressing and best path selection.
• Routed protocols allow routers to direct
user traffic.
• Routing protocols work between routers to
maintain routing tables.
• DVR, routers exchange of routing tables.
• LSR, routers calculate the shortest paths.
•
Hybrid routing uses both LSR and DVR.