Você está na página 1de 40

DISTANCE VECTOR

ROUTING

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.

Distance vector concepts

Exchange routing tables

Topology changes
When the topology in a distance-vector protocol network changes, routing table updates must occur. Topology change updates proceed stepby-step from router to router. Distance-vector algorithms call for each router to send its entire routing table to each of its adjacent neighbors.
5

Updating process

Routing Loop
A stop routing packets to Net1

Network 1 unreachable

Network 1 Distance 3

Counting to Infinity

Network 1 Distance 4

Network 1 Distance 3

Network 1 Distance 5
8

The problem of routing loops


Routing loops can occur if a network's slow convergence on a new configuration causes inconsistent routing entries. Solutions:
Defining a Maximum Split Horizon Split Horizon with Poison Reverse Route Poisoning Hold-down Timers
9

Loop prevention: Defining a Maximum


Distance-vector protocols define infinity (v tn) as a specific maximum number. This number refers to a routing metric (e.g. a simple hop count). The routing protocol permits the routing loop to continue until the metric exceeds its maximum allowed value.

10

Loop prevention: Defining a Maximum

Network 1 Distance 14

Maximum Metric is 16 Network 1 unreachable

Network 1 Distance 15
11

Loop prevention: Split horizon


A routing loop occurs when incorrect information that has been sent back to a router contradicts (mu thun) 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.

12

Loop prevention: Split horizon

Network Router Distance 1 Network 1 Distance 1 Network 1 unreachable C 2

Network Router Distance 1 A 3

13

Loop prevention: Poison reverse


The routing protocol advertises all routes out an interface, but those learned from earlier updates coming in that interface are marked with infinite distance metrics.

14

Loop prevention: Poison reverse

Network 1 Distance 16
Network 1 unreachable

15

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.

16

Loop prevention: Route poisoning

Network 1 Distance 16

17

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.

18

Loop prevention: Hold-down timer

Network 1 unreachable

Network 1 Distance 2
19

LINK STATE ROUTING

Link state routing basics


Link-state based routing algorithms, also known as SPF (shortest path first) algorithms, maintain a complex database of topology information. Link-state routing algorithm maintains full knowledge of distant routers and how they interconnect. 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
21

Link state concepts

22

Exchange routing tables


Routers exchange LSAs with each other. The router constructs this logical topology as a tree, with itself as root. The SPF algorithm computes network reachability. It then sorts these paths shortest path first (SPF). The router lists its best paths, and the ports to these destination networks, in the routing table.
23

Link state network discovery

24

Topology changes
Whenever a link-state topology changes, the routers first send information to all routers in the internetwork. Each time an LSA packet causes a change to the link-state database, the shortest path first algorithm (SPF) recalculates the best paths and updates the routing table.

25

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, records the LSA packet in its database. Completes a map and then computes routes by the SPF algorithm. 26

LS concerns: Processing and Memory


Network administrators must ensure that the routers are capable of providing these necessary resources. For link-state routing, their memory must be able to hold information from various databases, the topology tree, and the routing table. Using Dijkstra's algorithm to compute the SPF requires a processing task.
27

LS concerns: Bandwidth
During the initial discovery process, all routers using link-state routing protocols send LSA packets to all other routers. After that, link-state routing protocols generally require only minimal bandwidth to send infrequent (khng thng xuyn) or eventtriggered LSA packets that reflect (mang li) topology changes.

28

Link state updates

30

THE CONTEXT OF
DIFFERENT ROUTING PROTOCOLS

Distance Vector vs. Link State routing

32

Hybrid routing protocols


Examples:
IS-IS (OSI) Intermediate Systemto-Intermediate System EIGRP (Cisco) Enhanced Interior Gateway Routing Protocol

33

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 to destination networks. Using topology changes to trigger routing database updates. Using fewer resources such as bandwidth, memory, and processor overhead.
34

LAN-to-LAN routing
The network layer must understand and be able to interface with various lower layers. Routers must be capable of seamlessly handling packets encapsulated into various lower-level frames without changing the packets' Layer 3 addressing. Although the lower-layer framing must change when the router passes packet traffic, the Layer 3 addressing for source 35 and destination remains the same.

LAN-to-LAN routing

36

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 the layer 3 source and destination addresses constant while encapsulating the packet in 37 data link frames.

LAN-to-WAN routing

38

Multiple protocols and media

39

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. 40

41

Você também pode gostar