Chapter 18 -- WAN Routing - California State University, Long Beach

Download Report

Transcript Chapter 18 -- WAN Routing - California State University, Long Beach

CECS 474 Computer Network Interoperability
CHAPTER 18
WAN Technologies
& Routing
Tracy Bradley Maples, Ph.D.
Computer Engineering & Computer Science
California State University, Long Beach
Notes for Douglas E. Comer, Computer Networks and Internets (5th Edition)
Large Networks and Wide Areas
LANs
• Usually span a single building.
• Limited by size (unless connected by satellite bridges)
=> Limited scalability
WANs
• Can span large geographic distances.
• Can cross public right-of-ways (streets, buildings, railroads).
• Deliver high (or reasonable) performance for many users.
KEY ADVANTAGE => Scalability
• A WAN must be able to grow as needed to connect many sites spread across
large geographic distances.
• A technology is not classified as a WAN unless it can deliver reasonable
performance for a large scale network.
WANs are constructed out of:
• Point-to-point long-distance connections
• Packet Switches
Packet Switches
Packet switches are:
• Hardware devices
• They connect to other packet switches or computers
• They forward packets
• They use destination IP addresses for forwarding
Packet switches are special-purpose
computer systems consisting of:
• CPU
• Memory
• I/O interfaces
• Firmware
Two types of I/O devices are used:
High speed -- to connect to other
packet switches
Lower speed -- to connect to
individual computers
Modern WAN Architecture
Forming a WAN
WANs are formed by placing one or more packet switches at each site.
Switches are interconnected using:
• LAN technology for local connections.
• Leased digital circuits for long-distance connections.
The switches can be connected asymmetrically.
The number and type of interconnections
depend on:
• The estimated traffic.
• The reliability needed.
• The cost of the link.
Store and Forward
Store and forward is the basic paradigm used in packet switched networks.
Each Packet:
• Is sent from the source computer.
• Travels from switch-to-switch across the network.
• Is delivered to the destination.
At Each Switch:
• Packets are “stored” in memory.
• The packet’s destination address is examined.
• The packet is forwarded toward the destination.
Physical Addressing in a WAN
WANs require:
• A unique address for each computer
• An efficient forwarding scheme.
A two-part address is used with:
• A packet switch number.
• Specific computer on that switch.
Illustration of WAN Addressing
The figure shows the two-part addresses.
In practice, the addresses are encoded as a single binary value with:
• The high-order bits for the switch number.
• The low-order bits for the computer number.
Users and application programs can treat the address as a single integer, they do not
need to know that addresses are assigned hierarchically.
Next-Hop Forwarding
Next-hop forwarding is
• Performed by packet switches
• Uses a table of routes
(Called a Forwarding Table and created by a routing algorithm)
• The table gives the next hop
Source Independence and Hierarchical Routing
Defn: Source independence means that Next-hop forwarding does not depend on the
packet’s original source or on any paths the packet has taken before it arrives at a
particular switch.
• Source independence allows the forwarding on switches to be compact and efficient.
Defn: A forwarding table is the table of next-hop information stored in a switch.
• When forwarding a packet to another switch, a switch examines only the first part of
the hierarchical address.
• A switch needs to look at the second part of the hierarchical address only if the
destination machine is attached to that switch.
• Condensing the entries improves efficiency.
Routing in a WAN
There are two sources of routing table information:
1. Manual (seldom used)
• The table is created by hand
• Useful in small networks
• Useful if routes never change
2. Automatic routing
• Software creates/updates the tables
• Needed in large networks
• Software changes routes when failures occur
Routing and Graph Theory
Model a network as a graph with:
• Each switch as a node
• Each connection as an edge
Default Routes
A large WAN may contain hundreds of duplicate entries.
A default route is a mechanism that allows a single entry in a forwarding table to
replace a long list of entries that have the same next-hop value.
• only one default entry is allowed in a forwarding table
• the default route has lower priority than other entries
If the forwarding mechanism does not find an explicit entry for a given destination it
uses the default.
Shortest Path Computation
Shortest paths through the network can be computed using:
• Algorithms from graph theory
• Distributed computation (no central authority)
A switch:
• Must learn the route to each destination
• Only communicates directly with attached neighbors
For the above graph, the label on each edge represents the “distance” metric
• Geographic distance
• Economic cost
• Inverse of capacity
Algorithms for Computing the Shortest Paths
Both of these approaches are used in practice to compute the shortest paths:
1.
Distance Vector (DV)
Switches exchange information with their neighbors and then use the Distance
Vector algorithm. Use the Bellman-Ford Algorithm.
2.
Link-State
Switches exchange link status information and then use Dijkstra’s algorithm.
Broadcasting information.
The Distance Vector Algorithm
Periodically, exchange data between neighboring switches giving your information about
the paths of the network.
During the exchange, the switches send:
• List of pairs giving the (destination, distance) of connections
The receiving switch:
--Compares each item in the switch to local routes
--Changes the routes if a better path exists
Distance Vector Intuition
Let




N be the neighbor that sent the routing message
V be the destination in the pair
D be the distance in the pair
Note: In DV Routing, the
C be D plus the cost to reach the sender
information that is passed from
one node to another, takes time
• If no local route to V exists, or if the local route
to propagate through the entire
has a greater cost than C, install a route with
network.
next hop N and cost C.
• Else ignore the pair.
“Good news travels quickly”
but
Example for Distance Vector Routing
“Bad news travels slowly”
Consider transmission of one DV message:
• Node 2 sends to 3, 5 and 6
• Node 6 installs cost 8 for route 2
• Later 3 sends update to 6
• 6 changes route to make 3 the
next-hop for destination 2
Link-State Routing
Overcomes some of the instabilities of Distance Vector Routing.
Pairs of switches periodically:
• Test the link between them
• Broadcast a link status message
Each switch:
• Receives the status message
• Computes new routes
• Uses Dijkstra’s algorithm
Dijkstra’s Shortest Path Algorithm
Input: • Graph with weighted edges
• Node, n
Output: •
•
Set of shortest paths from n to each node
Cost of each path
Called the Shortest Path First (SPF) algorithm.
Dijskra’s Algorithm Intuition
1.
2.
3.
Start with self as the source node
Move outward
At each step:
Find node u such that it
• Has not been considered
• Is “closest” to the source
Compute
• Distance from u to each neighbor v
• If the distance is shorter than what is currently recorded, make a path
from u go through v
Example: Routes from node 6:
To node 3: next hop = 3, cost = 2
To node 2: next hop = 3, cost = 5
To node 7: next hop = 7, cost = 5
To node 4: next hop = 7, cost = 8
To node 5: next hop = 3, cost = 11
To node 1: next hop = 3, cost = 20