Network basics lecture 19: Understanding Multicast Routing Protocols

Source: Internet
Author: User

In history, multicasting has become more fashionable. IP multicast means that a sender sends data to multiple recipients, but only one copy of the data is required. Multicast is very useful for streaming media, so let's take a look at its working principles.

Multicast is like broadcasting, and some specific addresses are allocated to multicast data. The difference between the two lies in that some multicast addresses can be routed and used on the Internet. The reserved IP address space of IANA for multicasting is 224.0.0.0/4. Now we will not say "D Class. The address range of 224/4 is from 224.0.0.0 to 239.255.255.255.

Multicast is more efficient than broadcast, because broadcast data packets must be received by each computer on the local link, and each operating system generates an interrupt to check the received data packets, in this process, data is usually copied. In multicast mode, the network adapter does not receive these packets unless it is notified that it needs to receive them.

By default, the network interface card (NIC) with the multicast function enabled only listens to data on 224.0.0.1 during boot, this address is assigned to "all systems on this subnet ". Yes, this is very similar to broadcasting. In fact, many people think that broadcasting is a special case of multicasting.

By setting the NIC to ignore multicast content, multicast can select the destination object for transmission. This is the way local links work, but how does Internet work? If someone wants to broadcast the stream data of a celebrity child to Africa too much, we don't want every vro on the Internet to transmit it to every computer. In addition to setting the local NIC to make a decision, there are also some multicast routing mechanisms that can "trim" Some subnets. If no one in your network wants to view this information, there is no reason to let it enter your network.

Those who are interested in this information can run a special program that will tell NIC to join a multicast group in turn. NIC uses the Internet Group Management Protocol (IGMP) to remind the local multicast router that it wants to join a specific group. However, this only supports one-way access to multicast data ). If someone wants to send and receive multicast information, the IP layer needs higher skills. To send data, the IP protocol maps an IP address to an ethernet address and tells the NIC Driver to configure the NIC with another MAC address (Media Access Control.

IGMP itself is very simple. It is similar to ICMP (Internet-controlled Message Protocol) because it also uses the IP layer, but the Protocol Number is different. The IGMP header contains only four content: version number, type, checksum, and the group to be added (that is, multicast address ). When a data packet is sent out, the multicast router knows that at least one host is interested in receiving data packets to obtain a specific multicast address. Now this vro must perform multicast routing with other vrouters in some way to obtain the required data.

Now things have become interesting. Today we will talk about several multicast routing mechanisms: DVMRP and PIM. It is important to note that even now, multicast technology is not widely supported. In the past, when there was only one mbone, that is, the multicast backbone network, people connected to it through the IPIP (IP Encapsulation IP) tunnel. The Unix program mrouted can understand the DVMRP and IGMP protocols, but the Internet Router cannot. Many customers who want to adopt Multicast technology are still asking their ISP why some protocols do not work.

DVMRP refers to the distance vector multicast routing protocol. It uses IGMP subcode 13 and implements the so-called Dense Flooding ). Dense Flooding is effective but inefficient. A vro first sends information to each subnet, and then removes subnets that do not require multicast. PIMProtocol-Independent Multicast), that is, protocol-Independent Multicast, does not rely on the unicast routing mechanism, it is similar to DVMRP in dense mode. The PIM intensive mode is essentially the same as DVMRP, except that PIM uses the IP protocol 103. PIM can be used to add, trim, and graft branches. Grafting is opposite to pruning: it re-graft a branch back to the trunk network.

In intensive mode, multicast routes send data to all users, and then trim some branches. The multicast distribution tree is used to represent a group of routers. When a bunch of branches are trimmed, The vro can eventually remove the increasingly thick branches. If an AS branch does not interest the border router, it will send a trim message to the upstream router, so AS not to waste bandwidth.

The sparse mode multicast routing adopts the concept of the Rendezvous Point (RP. All the information added is sent to the unicast address of the RP. Therefore, we need to understand the priority concept here. The PIM Sparse Mode is also more intelligent. It uses the shared tree structure. However, if a router finds it is closer to the data source, it sends a message to the upstream router, to ensure that data flows from the best address. Then the newly designated vro becomes the data source distribution point of the network.

This is really good, just pay attention to a small detail: the Internet is not a vertical tree structure. Enterprises always want redundant connections, so they naturally form a huge network loop. In multicast technology, reverse path Forwarding (RPF) is used to ensure that no loop is generated. The basic concept is to check whether the interface to which multicast data packets arrive is the shortest unicast path from the sender. If not, the packet may not come from the sender, and the packet will be discarded. If the RPF check succeeds, the data packet will be copied and sent to everyone in the multicast group.

There are many other multicast routing protocols, such as ospf mospf (the Shortest Path priority protocol for multicast), but it can only be used in one autonomous domain; there is also BGMP of BGP (the Border Gateway multicast protocol), but it has never been seen in actual use. Many protocols are not actually used, but people can always come up with a lot of new and interesting ideas, hoping to make the spread of multicast technology a reality. You need to know how embarrassing it is to watch the same video from a website separately, if we use Multicast technology to make the router copy data streams as needed, it can save a lot of bandwidth.

Summary

The multicast protocol uses a special address to send data from one sender to multiple receivers, and only one copy of data is sent.

The host or router can use IGMP to tell other routers that they are interested and then join multicast groups.

Dense mode protocols implement flood and pruning, while Sparse Mode uses RP (reverse path) to avoid unnecessary floodin

Network basics lecture 18: Understanding iBGP Routing Protocol
Network basics lecture 17: BGP routing protocol preliminary
Network basics lecture 16: Internet routing and peer-to-peer networking
Network basics lecture 15: Advanced OSPF Routing Protocol
Network basics Lecture 14: OSPF routing protocol preliminary
Network basics lecture 13: routing information protocol (RIP)
Network basics lecture 12: Basic knowledge of routing protocols
Lecture 11 on basic network knowledge: Internet management architecture
Lecture 10 on basic network knowledge: TCP protocol understanding (advanced tutorial)
Lecture 9 on basic network knowledge: a preliminary understanding of the TCP protocol
Lecture 8 on basic network knowledge: a preliminary understanding of the IP protocol
Lecture 7: understanding and using ICMP protocol
Lecture 6 on basic network knowledge: Implementing subnets, including IPv6)
Lecture 5: Learning Spanning Tree Protocol
Lecture 4: understanding the data link layer
Network basics Lecture 3: Understanding OSI network layering
Network basics Lecture 2: Understanding subnet and CIDR
One of the basic network knowledge lectures: understanding the meaning of IPv4 addresses

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.