7. Broadcast and multicast, IGMP protocol

Source: Internet
Author: User

1. Introduction of unicast, multicast, broadcast 1.1. Unicast (unicast)

Unicast is the transfer of data to a specific host. For example, send an IP packet to a host. At this time, the data link layer gives the data header inside is very specific destination address, for Ethernet, is the specific network card MAC address (not FF-FF-FF-FF-FF-FF, this is the broadcast address). Now the host with the routing function should be able to direct the unicast data forward, and the destination host's network card can filter out and their own MAC address inconsistent data.

1.2. Broadcast (broadcast)

A broadcast is a host that sends packets to all hosts on a network. This network could be a network, possibly a subnet, or all of the subnets. If it is a network, such as a Class A URL broadcast is netid.255.255.255, if it is a subnet, the corresponding broadcast address is the subnet of the network address of the host bit all 1, if all subnets (class B IP address as an example) is the netid.netid.255.255. The MAC address used for the broadcast is FF-FF-FF-FF-FF-FF. All the hosts in the network will receive this broadcast data, the network card as long as the MAC address of FF-FF-FF-FF-FF-FF data to the kernel. In general, ARP, or routing protocol RIP, should be advertised in the form of broadcasts.

1.3. Multicast (multicast)

It can be said that broadcast is a special case of multicasting, multicast is to send data to a specific set of hosts (multicast group), so that the data can be advertised in a smaller range (in fact, the scope of the advertisement is not smaller), the multicast MAC address is the highest byte low of one, for example, 01-00-00-00-00-00. The address of the multicast group is Class D IP, which is defined as 224.0.0.0-239.255.255.255.

* Multicast Address classification:

Local multicast address: Between 224.0.0.0~224.0.0.255, this is the address reserved for routing protocols and other purposes, and routers do not forward IP packets that fall into this range.

Reserved multicast addresses: Between 224.0.1.0~238.255.255.255, can be used globally (such as the Internet) or network protocols.

Manage rights multicast addresses: Between 239.0.0.0~239.255.255.255, available for internal use by the organization, similar to private IP addresses, not for the Internet, and can limit the multicast range.

Addresses that belong to the permanent group:

224.0.0.1 All Multicast hosts

224.0.0.2 All multicast routers

224.0.0.4 DRMRP Router

224.0.0.5 Routers for all OSPF

224.0.0.6 OSPF Assignment Router

224.0.0.9 RPIV2 Router

224.0.0.10 EIGRP Router

224.0.0.13 PIM Router

224.0.0.22 IGMPv3

224.0.0.25 RGMP

224.0.1.1 NTP Network Time Protocol

all hosts that use the same IP multicast address to receive multicast packets make up a host group (multicast group) with one-to-many communication between them.

The corresponding relationship between the multicast IP address and the MAC address is as follows:

The Ethernet address range corresponding to IP multicasting ranges from 01:00:5e:00:00:00 to 01:00:5E:7F:FF:FF.

The address of the multicast group is Class D IP, which is defined as 224.0.0.0-239.255.255.255.

This address assignment will allow the 23bit in the Ethernet multicast address to correspond to the IP multicast group number by mapping the low 23bit in the multicast group number to the low 23bit implementation in the Ethernet address, as shown in:

As you can see, the IP address and MAC address are not corresponding to one by one, the host or the multicast data to filter.

2. A number of validated experiments

These experiments are not very complicated, we just want to ping the general IP and a broadcast address. First I ping one of the hosts on my subnet:

Reply from 192.168.11.1:bytes=32 time<1ms ttl=255
Reply from 192.168.11.1:bytes=32 time<1ms ttl=255
Reply from 192.168.11.1:bytes=32 time<1ms ttl=255
Reply from 192.168.11.1:bytes=32 time=1ms ttl=255

As you can see, the machine returns the result of a host's response, presumably, if I ping a broadcast address? The results are as follows

Reply from 192.168.11.9:bytes=32 time=1ms ttl=255
Reply from 192.168.11.174:bytes=32 time<1ms ttl=64
Reply from 192.168.11.174:bytes=32 time<1ms ttl=64
Reply from 192.168.11.174:bytes=32 time<1ms ttl=64
Reply from 192.168.11.218:bytes=32 time<1ms ttl=64
Reply from 192.168.11.174:bytes=32 time<1ms ttl=64

As you can see, ping returns the results of some random IP that are IP within the same subnet as the host. As we can see, the broadcast actually sends data to all the IPs that are in the subnet.

3.IGMP Protocol: Internet Group Management Protocol

The role of IGMP is to let all other hosts and routers that need to know which multicast group they are in are aware of their state. In general, multicast routers do not need to know how many hosts are in a multicast group, as long as they know that there are no hosts in a multicast group on their subnets. As long as a single multicast group also has a host, the multicast router will transmit the data, so that the receiver will be through the network card filtering function to get the data they want. In order to know the multicast group information, the multicast router needs to send the IGMP query periodically, the IGMP packets are encapsulated in the IP datagram, and the hosts in each multicast group will reply to their status according to the query. Router to determine how many multicast groups are in place and how their forwarding operations proceed.

The TTL of this query response datagram is typically 1, the datagram is scoped to the subnet, and no ICMP timeout error occurs.

7. Broadcast and multicast, IGMP protocol

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.