Download routing - ece.virginia.edu

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Distributed firewall wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Computer network wikipedia , lookup

Deep packet inspection wikipedia , lookup

CAN bus wikipedia , lookup

Backpressure routing wikipedia , lookup

RapidIO wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

IEEE 1355 wikipedia , lookup

Telephone exchange wikipedia , lookup

Airborne Networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Spanning Tree Protocol wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Dijkstra's algorithm wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Routing wikipedia , lookup

Transcript
Switch controller: Routing
Malathi Veeraraghavan
University of Virginia
• Connectionless packet switch
– Routing
– Forwarding
•
•
•
•
Summarized (aggregated) addresses
Control path and data path
Path computation: Dijkstra’s algorithm
Examples used in practice
1
A network of connectionless
packet switches
• Control path: Routing (determine paths)
– Switch controllers exchange routing
information
– Precompute forwarding tables
• Data path: Forwarding (send packets)
– Packets are switched from link to link across
each switch
2
Goal of routing algorithms
• Find "shortest" path on which to route packets or circuits,
where the shortest path is determined by some metric, e.g.:
– minimum-weight path (add link weights)
– minimum end-to-end delay
– path with the most available bandwidth
• The algorithm should adapt to changes in
– topology (includes administrator-set link weights)
– reachability
• identify the switch through which a destination address can be
reached
• destination could be several hops away
– loading conditions
3
Analogy
• In the roadways transportation network,
where does a driver obtain the three types of
routing information:
– topology information?
– reachability information?
– loading information?
4
Difference between
topology and reachability information
Host
I-A
Switch II
Switch III
Switch I
Host
III-C
Switch IV
Host IV-A
Host
III-B
Host IV-B
• Relative to Switch IV:
– Topology information: Switch IV has links to hosts IV-A & IV-B (in
addition to links to other switches)
– Reachability information: Switch IV can reach hosts III-B and III-C, host I-A
• addresses that are more than one hop away
• implicit: reachability to directly connected hosts (part of topology information)
5
One approach: Routing protocol exchanges
+ Forwarding table precomputation
• Link-state routing protocols
– Routing protocol exchanges
• Switch controllers send/receive routing protocol messages to
exchange information about topology, reachability and loading
conditions with each other
• Each switch controller thus acquires a picture of the whole network
– Forwarding table pre-computation
• Each switch controller then executes a shortest-path algorithm, such
as Dijkstra's algorithm, to compute the shortest paths from its switch
to all other switches
• Each switch controller then updates a forwarding table, which shows
the next-hop and/or output port for each destination address
6
Summarized addresses
• What are summarized addresses?
– An address that represents a group of endpoint
addresses
– e.g., all 434 numbers, 128.143 IP addresses
• Why summarize addresses?
– To reduce forwarding table sizes – hold one entry for a
summarized address instead of a large number of
individual addresses
– To reduce routing message lengths that convey
reachability information
7
Control path: Routing protocol exchanges
+ forwarding table pre-computation
II
4
5
Dest.
Next hop
III-B
III-C
III-B
III-C
1
Host
I-A
I
III
1
Dest.
Next hop
III-*
IV
1
IV
Dest.
Host
III-B
Host
III-C
Next hop
Forwarding table
III-*
III
(will have other entries)
• I, II, III, IV: switches
• Link weights are shown next to links
• Host interface addresses are derived from switch addresses (e.g. I-A
is connected to switch I)
• A few example forwarding table entries shown at switches I, III, IV
• III-*: summarized address for all hosts connected to switch III
8
Data path: User-data transfer
(e.g., packet destined to Host III-B)
Packet header Packet payload
III-B
II
Dest.
Next hop
III-B
III-C
III-B
III-C
III-B
Host
I-A
III-B
I
Dest.
Next hop
III-*
IV
III-B
III
Host
III-B
IV
Dest.
Next hop
III-*
III
Host
III-C
• Packet header carries destination host interface address
(unchanged as it passes hop by hop)
• Each packet switch does a forwarding table lookup to
determine the outgoing next hop switch
9
Next-hop and/or output ports in
forwarding table
Host
I-A
a
b
III-*
1
a
c
Forwarding table
(will have other entries)
b
c
Switch IV
1
Host
III-B
Host
III-C
d
e
Next hop Output port
IV
Switch III
1
Switch I
c
Dest.
4
Switch II
5
Host IV-A
Host IV-B
link weight
Dest.
Next hop Output port
III-*
III
?
IV-A
IV-A
?
IV-B
?
?
Forwarding table
(will have other entries)
10
Forwarding table precomputation:
Dijkstra’s algorithm
• Find shortest paths from source node s to all other nodes.
– At each iteration, determine the “next closest node ” from the
source s.
• For each node that is still not in set M (the set containing nodes to
which shortest paths from the source have already been computed),
determine if its current distance from s is shorter than the path
routed via the selected “next closest node. ”
• Find the “next closest node” after finding all the distances.
• Move “next closest node ” into set M.
– When the set M has all the nodes, stop.
"Node" in this application of Dijkstra's algorithm represents
a network "Switch."
11
Dijkstra's algorithm
s: source node.
wsn: administrator-set link weight for the link from node s to node n
M = {s};
for each n  M
Dn = wsn;
while (M  all nodes) do
Find i  M for which Di = min{Dj ; j  M};
Add i to M;
for each n  M
Dn = mini [ Dn, Di + win ];
Update route;
enddo
12
Example
5
2
3
3
Administrator-set
link weights
5
2
1
3
1
2
1
6
2
4
1
w56=2
5
13
List path weight and route
M
D2
D3
D4
D5
0
{1}
2, {1-2}
5, {1-3}
1, {1-4} 
1
{1,4}
2, {1-2}
4, {1-4-3}
D6

2
3
4
Simple shortest path: Only static administrator-set
link weights considered
Loading information not considered in this
computation of shortest paths
14
Resulting forwarding table
2
2
3
1
1
1
4
1
5
6
2
Forwarding table at node 1
Destination
2
3
4
5
6
Next Hop
2
4
4
4
4
15
Examples used in practice
• Addressing
– IP-routed networks (e.g., Internet)
• 4-byte IP addresses
• Hierarchical addresses
• Address summarization done
– Ethernet switched network
• 6-byte MAC address
• Flat addresses
• No address summarization
16
Examples used in practice
• IP-routed networks (e.g., Internet)
– Routing protocols
• Open Path Shortest First (OSPF)
• Border Gateway Protocol (BGP)
• Ethernet switched networks
– Forwarding table is built up as Ethernet frames are
forwarded
17
Answer
Dijkstra’s algorithm example
M
D2
D3
D4
D5
D6
0
{1}
2, {1-2}
5, {1-3}
1, {1-4} 

1
{1,4}
2, {1-2}
4, {1-4-3}
1, {1-4} 2, {1-4-5}

2
{1,4,2,5}
2, {1-2}
3, {1-4-5-3}
1, {1-4} 2, {1-4-5}
4,{1-4-5-6}
3
{1,4,2,5,3}
2, {1-2}
3, {1-4-5-3}
1, {1-4} 2, {1-4-5}
4,{1-4-5-6}
4
{1,4,2,5,3,6} 2, {1-2}
3, {1-4-5-3}
1, {1-4} 2, {1-4-5}
4,{1-4-5-6}
18