26
CS348: Computer Networks Dr. Manas Khatua Assistant Professor Dept. of CSE, IIT Guwahati E-mail: [email protected] Broadcast and Multicast Routing

CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

  • Upload
    others

  • View
    82

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

CS348: Computer Networks

Dr. Manas KhatuaAssistant Professor

Dept. of CSE, IIT GuwahatiE-mail: [email protected]

Broadcast and Multicast Routing

Page 2: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Unicasting, Broadcasting, Multicasting

• In unicast routing, there is one source and one destination node i.e. point-to-pointcommunication

• The relationship between the source and the destination network is one to one.

• Each router in the path tries to forward the packet to one and only one of its interfaces.

19-05-2020 Dr. Manas Khatua 2

• In broadcast routing, the network layer provides a service of delivering a packet sent from a source node to all other nodes in the network

• In multicast routing, a single source node can send a copy of a packet to a subset of the other network nodes.

Unicast Routing

Page 3: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Broadcast Routing Algo.

19-05-2020 Dr. Manas Khatua 3

• Most straightforward way: N-way-unicast– no new network-layer routing protocol, packet-duplication, or forwarding

functionality is needed.

– Drawbacks:• Inefficiency: As it would be more efficient for the network nodes themselves (rather than just

the source node) to create duplicate copies of a packet

• Unrealistic assumption: An implicit assumption of N-way-unicast is that broadcast recipients, and their addresses, are known to the sender.

• More overhead : it would be unwise (at best!) to rely on the unicast routing infrastructure to achieve broadcast.

Broadcast Algorithms:1. Uncontrolled Flooding2. Controlled Flooding3. Spanning Tree Broadcast4. Etc.

Page 4: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Uncontrolled Flooding• most obvious technique for achieving broadcast is a flooding

– Source node sends a copy of the packet to all of its neighbors

– When a node receives a broadcast packet, it duplicates the packet and forwards it to all of its neighbors (except the neighbor from which it received the packet).

– this scheme will eventually deliver a copy of the broadcast packet to all nodes if they are connected

• Disadvantages:– (1) If the graph has cycles, then one or more copies of each broadcast

packet will cycle indefinitely

– (2) When a node is connected to more than two other nodes, then it could result in broadcast storm (resulting from the endless multiplication of broadcast packets)

19-05-2020 Dr. Manas Khatua 4

Page 5: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Controlled Flooding

19-05-2020 Dr. Manas Khatua 5

• key to avoiding a broadcast storm– for a node to judiciously choose when to flood and when not to flood

a packet– i.e. controlled way of flooding

• Sequence-number-controlled flooding• a source node puts its address as well as a broadcast sequence

number into a broadcast packet

• Each node maintains a list of the source address and sequence number of each broadcast packet it has already received, duplicated, and forwarded

• When a node receives a broadcast packet, it first checks in this list.– If found, then dropped the packet– If not found, then the packet is duplicated and forwarded to all the node’s

neighbors (except the node from which the packet has just been received)

Page 6: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Cont…

19-05-2020 Dr. Manas Khatua 6

• Reverse path forwarding (RPF) / reverse path broadcast (RPB).

• When a router receives a broadcast packet with a given source address, – it transmits the packet on all of its outgoing links (except the one on which it was

received)

» only if the packet arrived on the link that is on its own shortest unicast path back to the source.

• Otherwise, the router simply discards the incoming packet

• RPF does not use unicast routing to actually deliver a packet to a destination, nor does it require that a router know the complete shortest path from itself to the source.

• RPF need only know the next neighbour on its unicast shortest path to the sender

Page 7: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Spanning-Tree Broadcast

19-05-2020 Dr. Manas Khatua 7

• While sequence-number-controlled flooding and RPF avoid broadcast storms, – they do not completely avoid the transmission of redundant broadcast

packets

• In this figure, nodes B, C, D, E, and F receive either one or two redundant packets.

• Solution: spanning tree — a tree that contains each and every node in a graph

• So, first construct a spanning tree.• When a source node wants to send a broadcast

packet, • it sends the packet out on all of the incident

links that belong to the spanning tree.

Page 8: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Cont…

19-05-2020 Dr. Manas Khatua 8

• Not only does spanning tree eliminate redundant broadcast packets, but once in place, the spanning tree can be used by any node to begin a broadcast

• In this algo, a node need not be aware of the entire tree; it simply needs to know which of its neighbors in G are spanning-tree neighbors.

Page 9: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Spanning-Tree Creation

19-05-2020 Dr. Manas Khatua 9

• The main complexity associated with the spanning-tree based broadcast approach is the creation and maintenance of the spanning tree.

• One simple algorithm is center-based approach– At first a center node or a core is defined

– Each nodes then unicast tree-join messages addressed to the center node

– A tree-join message is forwarded using unicast routing toward the center• until it either arrives at a node that already belongs to the spanning tree or arrives at the

center.

Considering node E as core

Practical Use in Practice: A form of sequence-number-controlled flooding is also used to broadcast link-state advertisements (LSAs) in the OSPF routing algorithm

Page 10: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Multicasting

19-05-2020 10Dr. Manas Khatua

• There is one source and a group of destinations, but not all.

• The relationship is one to many.

• The source address is a unicast address, • but the destination address is a group address,

– in which there is at least one member of the group that is interested in receiving the multicast datagram.

Few Applications:• bulk data transfer to a group• streaming continuous media• shared data applications (e.g.

teleconferencing)• Web cache updating• interactive gaming

Page 11: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Multicast vs Multiple Unicast

• Multicasting– starts with a single packet from source that is duplicated by the routers.

– The destination address in each packet is the same for all duplicates.

– Only a single copy of the packet travels between any two routers.

– IP Multicast uses UDP for communication, therefore it is unreliable.

• Multiple Unicasting– several packets start from the source.

– If there are three destinations, the source sends three packets, each with a different unicast destination address.

– Note that there may be multiple copies traveling between two routers.

19-05-2020 11Dr. Manas Khatua

Page 12: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Cont…

19-05-2020 12Dr. Manas Khatua

• Example: – Group Email: When a person sends an e-mail message to a group of

people, this is multiple unicasting.

– Teleconferencing: A group of workstations form a multicast group such that a transmission from any member is received by all other group members.

Page 13: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Why Multicasting?• Two main reasons:

Multicasting requires less bandwidth than multiple unicasting.

In multiple unicasting, the packets are created by the source with a relative delay between packets.

In multicasting, there is no delay because only one packet is created by the source.

• Why group e-mail is multiple unicast?

Multicast involves a subscription from the receiver's side, But, multiple unicast is a decision from the sender's side.

Usually, sender manage the group of multiple unicast, But, a receiver is associated with a multicast group.

19-05-2020 Dr. Manas Khatua 13

Page 14: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Multicasting Challenges

• two important problems– how to identify the receivers of a multicast packet– how to address a packet sent to these receivers

• Solution:– a multicast packet is addressed using address indirection

• i.e., a single identifier is used for the group of receivers

– The group of receivers associated with such address is referred to as a multicast group.• IGMP is used to create and maintain multicast groups

19-05-2020 Dr. Manas Khatua 14

Page 15: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Multicast Address

19-05-2020 Dr. Manas Khatua 15

• In IP datagram, we can only write one destination address. • So, we need multicast address for sending the datagram to many destinations.

• a multicast address is an identifier for a group.

• If a new group is formed with some active members, an authority can assign an unused multicast address to this group to uniquely define it

• A router / a destination host needs to distinguish between a unicast and a multicast datagram.

• IPv4 assigns a block of addresses for this purpose– In classful addressing, all of class D was composed of these addresses;– In classless addressing, it is referred to as the block 224.0.0.0/4 (i.e., 224.0.0.0 -

239.255.255.255).

Page 16: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Delivery at Datalink Layer

• In multicasting, the delivery at the Internet level is done using multicast IP addresses

• But, data-link layer multicast addresses are also needed to deliver a multicast packet encapsulated in a frame.

• Address Resolution Protocol (ARP) cannot help in finding multicast MAC address

• Solution for two scenario:– Network with Multicast Support– Network with No Multicast Support

19-05-2020 Dr. Manas Khatua 16

Page 17: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Cont…

19-05-2020 Dr. Manas Khatua 17

• An Ethernet multicast physical address is in the range

01:00:5E:00:00:00 - 01:00:5E:7F:FF:FF

Case 1: Network with Multicast Support

Most LANs (e.g. Ethernet) support physical multicast addressing.

If the first 25 bits in an Ethernet address are 0000 0001 0000 0000 0101 1110 0

this identifies a physical multicast address for the TCP/IP protocol.

Page 18: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Cont…

19-05-2020 Dr. Manas Khatua 18

• Example: Change the multicast IP address 232.43.14.7 to an Ethernet multicast physical address.

• We can do this in two steps:

– We write the rightmost 23 bits of the IP address in hexadecimal. – Then subtracting 8 from the leftmost digit if it is greater than or equal to 8. – In our example, the result is 2B:OE:07

– We add the result of part a to the starting Ethernet multicast address, which is 01:00:5E:00:00:00.The result is 01:00:5E:2B:OE:07

Page 19: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Cont…

19-05-2020 Dr. Manas Khatua 19

Case 2. Network with No Multicast Support

o Most WANs do not support physical multicast addressing

o To send a multicast packet through these networks, a tunneling is used

o In tunneling, the multicast packet is encapsulated in a unicast packet and sent

Page 20: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Collecting Information about Groups

19-05-2020 Dr. Manas Khatua 20

• Creation of forwarding tables in both unicast and multicast routing involves two steps:

– A router needs to know to which destinations it is connected.

– Each router needs to propagate information obtained in the first step to all other routers so that each router knows to which destination each other router is connected

Page 21: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Cont…

19-05-2020 Dr. Manas Khatua 21

• In unicast routing, the collection of the information in the first step is automatic

• Each router knows to which network it is connected, and the prefix of the network (in CIDR) is what a router needs.

• In multicast routing, the collection of information in the first step is not automatic.• Because,

– a router does not know which host in the attached network is a member of a particular group;– membership in the group does not have any relation to the prefix associated with the

network.

– the membership is not a fixed attribute of a host; – a host may join some new groups and leave some others even in a short period of time.

• For unicasting, the router needs no help to collect; • but for multicasting, it needs the help of another protocol namely Internet Group

Management Protocol (IGMP)

Page 22: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

• IGMP: Internet Group Management Protocol

• IGMP messages, like ICMP messages, are carried (encapsulated) within an IP datagram.

• IGMP uses three messages: Query, Report, Leave

• A query message is periodically sent by a router to all hosts attached to it to ask them to report their interests about membership in groups.

• A report message is sent by a host as a response to a query message.

• After a router has collected membership information from the hosts and other routers at its own level in the tree, it can propagate the information to the router located in a higher level of the tree.

19-05-2020 Dr. Manas Khatua 22

IGMP

• Leave group message is used to inform its leaving. This message is optional.

Page 23: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Multicast Forwarding

19-05-2020 Dr. Manas Khatua 23

• a router needs to make a decision to forward a multicast packet

• In unicast communication, the destination address of the packet defines one single destination.

• So, forwarded through one interface.

• In multicast communication, the destination of the packet defines one group, but that group may have more than one member in the internet.

• So, forwarded through many interfaces.

Page 24: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Cont…

19-05-2020 Dr. Manas Khatua 24

• Forwarding decisions in unicast communication depend only on the destination address of the packet.

• Forwarding decisions in multicast communication depend on both the destination and the source address of the packet.

Source address is used in forwarding decision

Page 25: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

Multicast Routing Algorithms• Goal of multicast routing: need to create routing trees to optimally route the

packets from a source to the destinations belonging to the multicast group

– Source-Based Tree Approach • each router needs to create a separate tree for each source-group combination.

• In each tree, the corresponding source is the root, the members of the group are the leaves, and the router itself is somewhere on the tree.

– Group-Shared Tree Approach• we designate a router to act as the dummy source for each group.

• The designated router (called as core router) acts as the representative for the group.

• Any source that has a packet to send to a member of that group – First, sends it to the core router (unicast communication) and – Then the core router is responsible for multicasting.

19-05-2020 Dr. Manas Khatua 25

Page 26: CS348: Computer Networks Broadcast and Multicast Routingmanaskhatua.github.io/...4.6_Broadcast_Multicast... · Broadcast and Multicast Routing. Unicasting, Broadcasting, Multicasting

19-05-2020 26Dr. Manas Khatua