Download Routing Requirements: – Correctness – Simplicity - PolyU

Document related concepts

Distributed firewall wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Deep packet inspection wikipedia , lookup

Network tap wikipedia , lookup

Backpressure routing wikipedia , lookup

Peering wikipedia , lookup

Wake-on-LAN wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Computer network wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

IEEE 1355 wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Airborne Networking wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Routing wikipedia , lookup

Transcript
Routing
Requirements:
– Correctness
– Simplicity
– Robustness
ƒ Under localized failures and overloads
– Stability
ƒ React too slow or too fast
– Fairness
ƒ Example: high priority for nearby stations
– Optimality
– Efficiency
ƒ overhead
A.29
Performance Criteria
Metric
– the smaller the value, the
better the path
– calculated based on one or
several characteristics.
ƒ Hop count
• the number of
routers a pack must
go through to reach
a destination.
1 to 3 ?
A.30
Performance Criteria
ƒ Cost
• Bandwidth
‰the data capacity of a link. Normally, the cost
of a link with higher data capacity is smaller.
• Delay
‰the length of time required to move a packet
from source to destination
• Load
‰the amount of activity on a network resource.
• Reliability
A.31
Performance Criteria
1 to 3 ?
A.32
Distributed and Centralized routing
Distributed routing
– Each node has the responsibility of selecting an output
link fro routing packets as they arrive
– Robust
Centralized routing
– By a designated node
Source
– Made by the source station
A.33
Information Source
Information for routing
– Topology of the network
– Traffic load
– Link cost
– Relate to routing method
ƒ Flooding and random routing
ƒ Distributed routing
– Collect from
ƒ Local information: Adjacent nodes
ƒ All nodes
A.34
Information Source
Information updating timing
– Depends on routing method
– Local information
ƒ Update continuous
– More information Î update more frequently Î better
decision Î
– However, it consumes more network resources.
A.35
Routing Strategies
Fixed
Flooding
Random
Adaptive
– Distance vector routing
– Link state routing
A.36
Static and Dynamic Routes
Fixed routing
– use a programmed route for each source-destination
pair of nodes in the network
– Based on expected traffic or capacity
– Only change when there is a change in the topology of
the network
ƒ Usually enter by a network administrator
Adaptive routing
– the route is automatically adjusted for topology or
traffic changes
A.37
Fixed routing
Example: usually stored at a network control center
A.38
Fixed routing
Each node need only store a single column of the routing directory
A.39
Fixed routing
A.40
Fixed routing
Advantage
– Simplicity
– Work well in a reliable network with a stable load
Disadvantage
– Lack of flexibility
– Do not react to network congestion or failtures
A.41
Fixed routing
Example:
– to avoid the overhead of dynamic routing if the network
is accessible by only one path
– to hide parts of a network
A.42
Flooding
For sending a packet
– a source node to every one of its neighbors
ƒ Example: From node 1 to node 6
A.43
Flooding
– At each node, an incoming packet is retransmitted on
all outgoing links except for the link on which it arrived.
A.44
Flooding
End of transmission
– Approach 1
ƒ Retransmit a packet once
ƒ Discard the packet if it was received before
• Have to remember the identity of all packets
– Approach 2
ƒ Use a hop count in each packet
• Count down from the maximum value
• A packet is discarded if the count reaches zero
A.45
Flooding
Example: Hop count = 3
Hop count =1
Hop count =2
Hop count =0
A.46
Flooding
Advantage
– Highly robust
ƒ All possible routes are tried
• Used for sending emergency messages
– At least one routes takes the minimum hopping route
ƒ Used for setting up virtual circuit
– All nodes are visited
ƒ Used for the dissemination (sending) of information to all
nodes
• Example: sending routing information
Disadvantage
– High traffic load
A.47
Random Routing
For sending a packet
– A node selects only one outgoing path
– Chosen at random
– Excluding the link on which the packet arrived
Advantage
– Robust
– Simple
– Less traffic load (compare with flooding)
– Requires no network information
Experiment: Random Routing (with return)
Mini-project: Random Routing (without return)
A.48
Adaptive Routing
Routing decision
– change as conditions on the network change
– Example:
ƒ Failure:
• When a node or trunk fails – cannot use as part
of a route
ƒ Congestion:
• Choose other route
– Information must be exchanged among the nodes
A.49
Adaptive Routing
Example:
– enables routers to automatically use backup routes
whenever necessary.
A.50
Adaptive Routing
Disadvantages
– Processing burden on nodes
– Increase network traffic
ƒ Tradeoff between the quality of the information and
the amount of overhead
– May react too quickly causing congestion-producing
oscillation
A.51
Adaptive Routing
Two basic algorithms
A.52
Distance Vector Routing
In distance vector routing, each router periodically shares
its knowledge about the entire network with its neighbors.
•Contains information about the entire network
•Routing only to neighbors
Distance vector algorithms do not allow a router to know
the exact topology of an internetwork.
A.53
Distance Vector Routing (2)
Example:
Routers: A, B, …, F
Networks: Net:XX
A.54
Distance Vector Routing (3)
A.55
Distance Vector Routing (4)
Initial routing table
– Network no | cost | next hop
– cost is based on hop count
A.56
Distance Vector Routing (5)
Updating the table
– When A receives a routing table from B, it uses the
information to update its own table.
A.57
Distance Vector Routing (6)
Final routing tables
A.58
Summary of updating algorithm
The router first add one hop to the hop count field for
each advertised route. Then, apply the following rules to
the advertised route
– 1. If the advertised destination is not in the routing
table, the router should add the advertised information
to the table.
A.59
Summary of updating algorithm (2)
– 2. If the advertised destination is in the routing table,
ƒ a. If the next-hop field is the same, the router should
replace the entry in the table with the advertised
one.
ƒ b. If the next-hop field is not the same,
• i. If the advertised hop count is smaller than the
one in the table, the router should replace the
entry in the table with the new one.
• ii. If the advertised hop count is not smaller, the
router should do nothing.
A.60
Summary of updating algorithm (3)
Example,
A.61
Distance vector topology changes
A.62
Routing Loops
Routing loops can occur if the network’s slow
convergence on a new configuration causes inconsistent
routing entries.
– Example
A.63
Routing loops (2)
– Assume Router C’s preferred path to Network 1 is by
way of Router B, and Router C has a distance of 3 to
Network 1 in its routing table.
– When Network 1 fails, Router E sends an update to
Router A stops routing packets to Network 1, but B, C,
and D continue to route because they have not yet
been informed about the failure.
ƒ When Router A sends out its update, Routers B and
D stop routing to Network 1. To Router C, Network 1
is still reachable via Router B.
A.64
Routing loops (3)
– Now router C sends a periodic update to Router D,
indicating a path to Network 1 by way of Router B.
Router D changes its routing table to reflect this good,
but incorrect, information, and propagates the
information to Router A.
ƒ Router A propagates the information to Routers B
and E and so on. Any packet destined for Network 1
now loops from Router C to B to A to D, and back to
C.
A.65
Routing loops (4)
To avoid this problem, the routing protocol permits the
routing to loop until the metric exceeds its maximum
allowed value.
A.66
Line state routing
Distance vector routing
– nonspecific information about distant networks and no
knowledge of distant routers
Line state routing
– Maintains full knowledge of distant routers and how
they interconnect
A.67
Line state routing (2)
Construction of routing table
Sharing of information
A.68
Line state routing (3)
Packet Cost
– In distance vector routing, cost refers to hop count.
– In link state routing, cost is a weighted value based on
a variety of factors such as security levels, traffic, or
the state of the link.
– Cost is applied when a packet leaves the router.
A.69
Line state routing (4)
A.70
Line state routing (5)
Information sharing
– In link state routing, each router shares its knowledge
of its neighborhood with all routers in the internetwork.
– Each router sends the information about its
neighborhood to every other router by a process called
flooding.
A.71
Line state routing (6)
A.72
Line state routing (7)
– When a router floods the network with information
about its neighborhood, it is said to be advertising.
– The basis of this advertising is a short packet called a
link state packet (LSP)
ƒ or called link state advertisements packet (LSA)
A.73
Line state routing (6)
Example: Flooding of A’s LSP
A.74
Line state routing (7)
Link state database
– Every router receives every
LSP and puts the
information into a link state
database
ƒ every router has exactly
the same link state
database
A.75
Line state routing (8)
Calculation of routing table
– calculate the shortest path between two points on a
network using the Dijkstra algorithm
– Two terms
ƒ node: networks and routers
ƒ arcs: connections between a router and a network
A.76
Line state routing (9)
Shortest path tree
– 1. The algorithm begins from a router (called root).
– 2. Attached all nodes that can be reached from that
router. Nodes and arcs are temporary at this step.
A.77
Line state routing (10)
– 3. Identifies the arc with the lowest cumulative cost.
This arc and the node to which it connects are now a
permanent part of the shortest path tree.
Cumulative cost
A.78
Line state routing (11)
– 4. Attaches all nodes that can be reached from this
chosen node. These nodes and their arcs are added
temporarily to the tree.
temporary
A.79
Line state routing (12)
– 5. Step 3 and 4 are repeated until every node in the
network has become a permanent part of the tree. The
only permanent arcs are those that represent the
shortest route to every node.
Smallest cumulative cost
A.80
Line state routing (13)
(a)
(b)
A.81
Line state routing (14)
(a)
(b)
A.82
Line state routing (15)
(a)
(b)
A.83
Line state routing (16)
(a)
(b)
A.84
Line state routing (17)
(a)
(b)
Link state routing table for router A
A.85
Line state routing (18)
Distance vector vs link state routing
A.86