cse5803 advanced internet protocols and applications (11) 1 11.1 introduction ip multicast refers to...

22
CSE5803 Advanced Internet Protocols and Applications (11) 1 11.1 Introduction IP multicast refers to the delivery of IP datagrams to a set of hosts in a group (multicast group). These hosts do not have to be on the same physical network but locate across the internet. Membership in an IP multicast group is dynamic. A host may join or leave at any time. A host can also participate more multicast groups than one. Members in a multicast group can choose to send/receive/both messages to the group. Non-members can send to multicast groups. Multicast within a physical network can allocate a hardware address for multicast purposes. Multicast across the internet requires multicast capable routers to deliver multicast datagrams. This chapter discusses some protocols for IP multicasting.

Post on 21-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

CSE5803 Advanced Internet Protocols and Applications (11) 1

11.1 Introduction

IP multicast refers to the delivery of IP datagrams to a set of hosts in a group (multicast group). These hosts do not have to be on the same physical network but locate across the internet.

Membership in an IP multicast group is dynamic. A host may join or leave at any time. A host can also participate more multicast groups than one. Members in a multicast group can choose to send/receive/both messages to the group. Non-members can send to multicast groups.

Multicast within a physical network can allocate a hardware address for multicast purposes. Multicast across the internet requires multicast capable routers to deliver multicast datagrams.

This chapter discusses some protocols for IP multicasting.

CSE5803 Advanced Internet Protocols and Applications (11) 2

11.2 IP Multicast Address and Handling

• Multicast group addresses (class D) range from 224.0.0.0 through to 239.255.255.255.

• 224.0.0.0 is reserved and 224.0.0.1 is assigned to all IP multicast groups including routers and hosts. 224.0.0.2 is for all multicast routers. There are also some well-known groups like well-known TCP port numbers. Other groups are formed on temporary basis. They cease to exist when membership reaches zero.

• Multicast addresses can only exist in the destination portion of the IP datagram, they are not valid in source, source route option, etc.

• Multicast group members can choose not to send nor receive, send but not receive, both send and receive IP multicast.

• IP multicast groups are managed by specific networks. A host can choose to join a multicast group within a physical network or across a number of networks.

CSE5803 Advanced Internet Protocols and Applications (11) 3

11.3 Internet Group Management Protocol (IGMP)

• RFC1112(v1-1989)/2236(v2-1997)/3376(v3-2002) This is a lower layer (IP) protocol like ICMP and uses IP to carry messages.

• Multicast hosts and routers use IGMP to communicate group membership information.

• IGMP has a two fold purpose:

– Local routers periodically poll hosts on the local network with the address of 224.0.0.1, to determine whether any host remains as member of a multicast group. Multicast group hosts each will have a small random delay before responding to the poll message, to avoid network congestion. Members of the same group will not respond if a responding message has already been sent.

– Hosts respond IGMP message to the multicast address to declare their membership. Local multicast routers will arrange necessary routing. (IP protocol type 2 and TTL=1)

CSE5803 Advanced Internet Protocols and Applications (11) 4

• Multicast hosts run a three-state mechanism:

• IGMPv2 (RFC2236) message format:

0 1 2 3 4 (byte)+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Type | Max Resp Time| Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Group Address |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

CSE5803 Advanced Internet Protocols and Applications (11) 5

• Type 0x11 is membership query, this can be general (group address=0) or for a specific group.

Type 0x12 and 0x16 are membership report (response) for v1 and v2.Type 0x17 is leave group message, this improves the response time for a router to notice that all members have left a multicast group.

• A Leave group message is multicasted to 224.0.0.2 immediately after each time a host leaves a multicast group. The querier router will multicast a type 1 query message to see any host is still left in that particular group.

• Max response time field is meaningful only in message Type 0x11 and specifies the maximum allowed time before a response report is sent.

• The Checksum field is applied to the whole IP payload.• Group Address field is meaningful according to the type field of

IGMP messages.

• Other types of messages and additional code fields are added in IGMPv3, such as type 0x13 for DVMRP messages.

CSE5803 Advanced Internet Protocols and Applications (11) 6

11.4 Multicast Message Forwarding

• Apart from multicast capable routers, a tree shaped path must be formed for the datagrams to be distributed.

• In the case of source-based multicast routing protocols (DVMRP, MOSPF), a separate tree route is calculated for each source/destination combination. This can be based on hop counts or link cost.

• A tree route means there is exactly one path from the source to each group member.

• For shared tree protocols (PIM sparse, CBT), a single tree is built for a multicast group. One router is selected as the root for the group’s tree. This is referred to as the Rendezvous Point (RP) or the core.

• Shared tree based algorithms are more scalable and require routers to maintain less information.

• The following example is from “OSPF Anatomy of an Internet Routing Protocol”, John Moy, Addison- Wesley, 1999.

CSE5803 Advanced Internet Protocols and Applications (11) 7

• A multicast network with three sources

CSE5803 Advanced Internet Protocols and Applications (11) 8

Three source-based trees.

CSE5803 Advanced Internet Protocols and Applications (11) 9

• One shared tree for three sources, with R4 as the Rendezvous Point.

CSE5803 Advanced Internet Protocols and Applications (11) 10

• Shared-tree protocols have some problems which prevented their application:

– Less efficient paths. Longer paths than those of source based trees, which are calculated on costs and hop counts.

– Traffic concentration. On the RP and the few links around it. This may create congestion and bandwidth problems.

– Robustness. The failure of the RP will lead to the failure of the whole group.

– RP selection. Manual or automatic.

• Each multicast router has relevant multicast routing tables for the multicast groups.

CSE5803 Advanced Internet Protocols and Applications (11) 11

11.5 Multicast Backbone (Mbone)

• MBONE was created in 1992 to provide multicast service. (first for IETF meetings and later for some other events.)

• MBONE is the test ground for multicast protocols and applications.• MBONE is not yet available for public at large, mainly due to the

complexity of routers running multicast facilities. • MBONE routers are typically Unix Workstations running mrouted

program (an implementation of DVMRP). This is because most Internet routers do not have multicast functions or having them turned off.

• The MBONE routers are connected with unicast tunnels, to get through Internet sections not supporting multicast.

• The core of MBONE runs DVMRP.• The MBONE tunnels can carry repetitive data traffic in one segment

for many destinations.

CSE5803 Advanced Internet Protocols and Applications (11) 12

• The construction of many source trees may also pose high traffic demands.

• MBONE applications can filter unwanted multicast traffic by the setting a threshold of IP TTL that is allowed through a tunnel. The initial TTL value for many multicast applications are not 255. A TTL threshold can stop undesirable multicast traffic.

11.6 Overview of Multicast Routing Protocols

• Source-Based Trees:– Distance Vector Multicast Routing Protocol (DVMRP)

(Broadcast-and prune)– Protocol Independent Multicast, Dense Mode (PIM Dense)

(Broadcast-and prune)– Multicast OSPF, MOSPF (Domainwide reports)

CSE5803 Advanced Internet Protocols and Applications (11) 13

• Shared Tree:

– PIM Sparse

– CBT (Core Based Trees)

• Broadcast-and-prune protocols for the source-based trees include all network segments to start with. When the first multicast datagram arrives at a router, the router may realise whether there is/is not any member in its leaf. In latter case it will send a prune message to the upstream router.

• Domainwide reports protocols broadcast their group membership information throughout the routing domain to establish the source trees (discussed later with MOSPF).

• DVMRP is used as the main protocol for MBONE. The UNIX mrouted program implemented and modified some of its aspects.

• DVMRP uses IGMP type 0x13 message as encapsulation. The second byte of IGMP header indicates the DVMRP message type.

CSE5803 Advanced Internet Protocols and Applications (11) 14

• DVMRP messages include Probes (for neighbor), Route Reports (for broadcast-and-prune), tree maintenance and router monitoring messages.

• DVMRP routers periodically broadcasts to its neighbors a list of sources and the distance from these sources to the router, this is similar to RIP.

• A DVMRP router will choose the minimum hop-count router as its previous hop from the source.

• PIM Dense can be thought of as DVMRP without the routing updates. • PIM Dense was believed as appropriate when multicast group

members are densely populated throughout the routing domain.• PIM Sparse is a shared-tree protocol that shares packets with PIM

Dense and can be switched from PIM Dense. It contains unique messages for the selection of RP, and also DR for each network segment.

• Both PIM Dense and Sparse have been implemented for some MBONE edge routing.

CSE5803 Advanced Internet Protocols and Applications (11) 15

• CBT is not yet deployed in the Internet. It is also directly on IP and uses DR for each network segment to contact the core of the shared tree.

• MOSPF will be discussed in the following section.

11.7 MOSPF• The protocol OSPF itself uses its own multicast mechanism to

communicate LSA and other messages. In order to provide user multicast, OSPF can be extended to MOSPF.

• MOSPF has been deployed in private internets with OSPF.• It is easier to have MOSPF in an OSPF unicast routing domain than

DVMRP, since the protocols are built on different principles (Distance Vector vs. Link State SPF).

• MOSPF introduces a new type of LSA, group-membership-LSA, to the LSDB for the calculation of multicast paths.

• MOSPF can route around multicast datagrams from routers incapable of multicast routing.

CSE5803 Advanced Internet Protocols and Applications (11) 16

11.7.1 A multicast example

This example is from “OSPF Anatomy of an Internet Routing Protocol”, John Moy, Addison- Wesley, 1999.

CSE5803 Advanced Internet Protocols and Applications (11) 17

• S1 is a multicast source (eg. for radio) and G1s are the group members.

• When the G1 member on 128.186.4.0/24 tune in, it sends IGMP onto the network segment. Assume router E is the DR, it originates a group-membership-LSA, and flood it throughout the MOSPF domain and inform other routers that 128.186.4.0/24 has a G1 member.

• When router A receives the next G1 packet from S1, it will calculate the path and forward the packet to the FDDI ring 128.186.3.0. Routers B, C, D and F will all calculate paths to 128.186.4.0/24, with only D forwarding the packet to G. Router G will also do the routing calculation and finally forward the segment on 128.186.4.0.

• When the G1 member of 128.186.5.0/24 tunes in, router F will originates the LSA labeling itself rather than the network as destination. This is because the network is a stub network.

• When the G1 member of 128.186.6.0/24 tunes in, router F will not originates an LSA again and flood the network. It simply forward G1 packets to that network.

CSE5803 Advanced Internet Protocols and Applications (11) 18

11.7.2 Group-Membership-LSAs and routing calculation

• IGMP Host Membership Report is sent from a group member. IGMP Membership Queries are sent by the Querier router (normally DR). Hosts delay Membership Report for a random time, if there are other replies before its reply, it will not reply.

• If there is no reply after a period of time (leave latency), or Leave Group messages are received in IGMPv2. The router will realise that there is no member in its net segment any more.

• A group-membership-LSA reports membership for the multicast IP address, in the form of router-LSA or network-LSA. Different cases with stub and multi-homed networks (why?)

• Multicast routers calculate routes on demand, different from unicast.• The calculation is stored as an entry in the router’s multicast

forwarding cache (multicast routing table), only the router’s position in the path and next hop is important in relation to a multicast group.

CSE5803 Advanced Internet Protocols and Applications (11) 19

• The forwarding cache stores two types of information:

– Previous hop (a router or network) from which a matching multicast datagram is received.

– Next hop (or the router interface, only one) that it should forward the matching datagram.

– The above ensures that only one copy the datagram reaches the destination network.

– This cache will be modified when new group-member-LSA arrives.

• MOSPF routing calculation uses the same Dijkstra’s algorithm for SPF, as in unicast. The differences are:

– Unicast calculation has the router itself as the root of tree for datagram forwarding. Each router does a different calculation.

– Multicast calculation always take the data source as the root, all routers on the path for the same source do the same calculation.

CSE5803 Advanced Internet Protocols and Applications (11) 20

– Unicast calculation allows equal cost multipath for load balancing, multicast must prune multipath to avoid delivery of multi copies of a datagram.

CSE5803 Advanced Internet Protocols and Applications (11) 21

11.7.3 Hierarchical multicast in MOSPF

• MOSPF uses OSPF areas and hierarchy for routing efficiency.• The concept of border and internal routers are the same as unicast.• One disadvantage of hierarchy is suboptimal routes in unicast. In

multicast, this means unnecessary forwarding (which will be discarded later).

• Multicast group members in nonbackbone areas is advertised by the area border router into the backbone.

• Internal routers of nonbackbone areas do not know the membership information within other areas. They can only forward multicast packets to their border routers (wildcard multicast receivers) in default.

• Border routers forward multicast messages to backbone area first, before the messages are distributed.

• Route calculation can be difficult between areas, the border routers in one area (if more than one) may be advertising the same network(s) due to the route aggregation in summary LSAs.

CSE5803 Advanced Internet Protocols and Applications (11) 22

• In this case, one router may be dedicated to handle incoming traffic for a group or some groups of multicast. Other routers discard messages belong to those groups.

11.7.3 Other issues of MOSPF• MOSPF can identify non-multicast routers in the network by checking

the router-LSA. Route calculation can skip them.

• When mixing multicast and non-multicast routers in a LAN, a multicast router should be selected as the DR.

• Inter-working with DVMRP (for MBONE). MOSPF acts like an IGP, which imports information from and export to DVMRP.

• DVMRP treats the whole MOSPF domain as a LAN segment.