230 likes | 339 Views
A connected, undirected graph. Four of the spanning trees of the graph. Spanning trees. Suppose you have a connected undirected graph Connected: every node is reachable from every other node Undirected: edges do not have an associated direction
E N D
A connected,undirected graph Four of the spanning trees of the graph Spanning trees • Suppose you have a connected undirected graph • Connected: every node is reachable from every other node • Undirected: edges do not have an associated direction • ...then a spanning tree of the graph is a connected subgraph in which there are no cycles Network Layer
One possible result of a BFSstarting from top An undirected graph One possible result of a DFSstarting from top Finding a spanning tree • To find a spanning tree of a graph, • pick an initial node and call it part of the spanning tree • do a search from the initial node: • each time you find a node that is not in the spanning tree, add to the spanning tree both the new node and the edge you followed to get to it Network Layer
Minimizing costs • Suppose you want to supply a set of houses (say, in a new subdivision) with: • electric power • water • sewage lines • telephone lines • To keep costs down, you could connect these houses with a spanning tree (of, for example, power lines) • However, the houses are not all equal distances apart • To reduce costs even further, you could connect the houses with a minimum-cost spanning tree Network Layer
16 16 A B A B 6 6 21 11 11 5 5 19 F C F C 14 33 10 18 18 E D E D A connected, undirected graph A minimum-cost spanning tree Minimum-cost spanning trees • Suppose you have a connected undirected graph with a weight (or cost) associated with each edge • The cost of a spanning tree would be the sum of the costs of its edges • A minimum-cost spanning tree is a spanning tree that has the lowest cost Network Layer
Small Example Network Layer
Why Multicast • When sending same data to multiple receivers • better bandwidth utilization • less host/router processing • quicker participation • Application • Video/Audio broadcast (One sender) • Video conferencing (Many senders) • Real time news distribution • Interactive gaming Network Layer
Unicast/Multicast 128.146.199.0/24 128.146.116.0/24 128.146.222.0/24 128.146.226.0/24 Network Layer
Unicast 128.146.199.0/24 128.146.116.0/24 Sender Receiver 128.146.222.0/24 128.146.226.0/24 Network Layer Receiver Receivers
Multicast 128.146.199.0/24 128.146.116.0/24 Sender Receiver 128.146.222.0/24 128.146.226.0/24 Network Layer Receiver Receivers
Two Major Issues • Who are the multicast members • How to send the packets to the members Network Layer
IGMP 224.0.0.1 224.2.127.254 Designated router queries LAN for group membership Host informs router with IGMP report Network Layer
IGMP – Joining a group • Example : R joins to Group 224.2.0.1 • R sends IGMP Membership-Reportto 224.2.0.1 • DR receives it. DR will start forwarding packets for 224.2.0.1 to Network A • DR periodically sends IGMP Membership-Queryto 224.0.0.1 (ALL-SYSTEMS.MCAST.NET) • R answers IGMP Membership-Reportto 224.2.0.1 IGMP Membership-Report R Network A DR Data to 224.2.0.1 Network B R: ReceiverDR: Designated Router Network Layer
IGMP – Leaving a group • Example : R leaves from a Group 224.2.0.1 • R sends IGMP Leave-Group to 224.0.0.2 (ALL-ROUTERS.MCAST.NET) • DR receives it. • DR stops forwarding packets for 224.2.0.1 to Network A if no more 224.2.0.1 group members on Network A. IGMP Leave-Group R Network A DR Data to 224.2.0.1 Network B R: ReceiverDR: Designated Router Network Layer
Source-based trees Multicast Routing • Goal: find a tree (or trees) connecting routers having local mcast group members • tree: not all paths between routers used • source-based: different tree from each sender to rcvrs • shared-tree: same tree used by all group members Shared tree
Approaches for building mcast trees Approaches: • source-based tree: one tree per source • shortest path trees • reverse path forwarding • group-shared tree: group uses one tree • minimal spanning (Steiner) • center-based trees …we first look at basic approaches, then specific protocols adopting these approaches
1 i 5 4 3 6 2 Shortest Path Tree • mcast forwarding tree: tree of shortest path routes from source to all receivers • Dijkstra’s algorithm S: source LEGEND R1 R4 router with attached group member R2 router with no attached group member R5 link used for forwarding, i indicates order link added by algorithm R3 R7 R6
Reverse Path Forwarding if (mcast datagram received on incoming link on shortest path back to center) then flood datagram onto all outgoing links else ignore datagram • rely on router’s knowledge of unicast shortest path from it to sender • each router has simple forwarding behavior:
Reverse Path Forwarding: example S: source LEGEND R1 R4 router with attached group member R2 router with no attached group member R5 datagram will be forwarded R3 R7 R6 datagram will not be forwarded • result is a source-specific reverse SPT • may be a bad choice with asymmetric links
Reverse Path Forwarding: pruning • forwarding tree contains subtrees with no mcast group members • no need to forward datagrams down subtree • “prune” msgs sent upstream by router with no downstream group members LEGEND S: source R1 router with attached group member R4 router with no attached group member R2 P P R5 prune message links with multicast forwarding P R3 R7 R6
Shared-Tree: Steiner Tree • Steiner Tree: minimum cost tree connecting all routers with attached group members • problem is NP-complete • excellent heuristics exists • not used in practice: • computational complexity • information about entire network needed • monolithic: rerun whenever a router needs to join/leave
Center-based trees • single delivery tree shared by all • one router identified as “center” of tree • to join: • edge router sends unicast join-msg addressed to center router • join-msg “processed” by intermediate routers and forwarded towards center • join-msg either hits existing tree branch for this center, or arrives at center • path taken by join-msg becomes new branch of tree for this router
Center-based trees: an example Suppose R6 chosen as center: LEGEND R1 router with attached group member R4 3 router with no attached group member R2 2 1 R5 path order in which join messages generated R3 1 R7 R6
Overlay Multicast • Constructs Overlay Multicast Data Delivery Tree among Group Members • Intermediate Receiver can act as a Multicast Forwarder • Data is delivered by Unicast Tunneling Mechanisms, hop-by-hop basis Network Layer