IP Multicast

Revised March 9, 2002

Maybe a two got in there!

Questions? Comments? E-mail: AL "at" CatSpace "dot" com


If you're not up to speed on binary and hex math, you're going to have a tough time with these problems. I recommend the "Binary-Decimal-Hexadecimal-Octal" review exercises.


EXERCISES:

1. What is the multicast Ethernet destination address that corresponds to the multicast IP address 234.20.49.104?

2. The multicast IP address 238.17.82.205 maps to what multicast Ethernet destination address?

3. If the IP address is 225.255.1.179, what is the corresponding multicast Ethernet destination address?

4. Which Ethernet destination address would be used with an IP address of 239.140.51.39?

5. Given that the IP address is 229.72.19.241, what is the corresponding Ethernet destination address?

6. PIM RP Mapping Agents use the IP address 224.0.1.40 to find rendezvous points. What Ethernet address does this Layer-3 address correspond to?

7. What is the Ethernet destination address used with RIP version 2? What is this address in binary?

8. The IP address 245.99.13.202 maps to which Ethernet multicast destination address?

9. The IP address range of 224.0.19.0 through 224.0.19.63 is reserved for the Walt Disney Company. What range of Ethernet addresses does this map to?

10. A server with IP address 160.231.5.69 is sending to the 230.5.102.84 multicast group. If the server's MAC address is 00-00-1B-3E-99-F0, what are the Layer-2 and Layer-3 source and destination addresses that are contained in each frame the server sends?

11. A multicast server, with IP address 174.62.89.103/16 and BIA (Burned-In Address) 0010.4ba0.b347, is connected to router R1's Ethernet 2 interface (IP address 174.62.0.1/16, BIA 0000.0c8e.e138). A host (IP address 10.1.2.3/24, BIA 0010.4ba1.d09f) that is receiving the multicasts is connected to R1's Ethernet 0 interface (IP address 10.1.2.1/24, BIA 0000.0c8c.e136). If the multicast IP group address 228.241.159.208 is being used, what are the MAC and IP source and destination addresses in the multicast frames that leave the server? What about in the frames that arrive at the receiving host?

12. When a multicast IP packet arrives at router HQ, the TTL of the packet is 32. The router's E0, E1 and E2 interfaces have TTL thresholds of 16, 32 and 64, respectively. Assuming that there are multicast receivers for the group connected to all three interfaces, through which Ethernet interfaces will packet be forwarded? If the TTL threshold for all interfaces was set to the default value, which interfaces would forward the packet?

13. How many unique multicast IP addresses are there?

14. How many unique multicast Ethernet addresses are there?

15. How many multicast IP addresses map to each of the unique multicast Ethernet addresses? Is this a problem?

Extra Credit:

16. What multicast IP addresses map to the Ethernet address 01-00-5E-78-52-A3?

17. How many multicast IP addresses correspond to the Ethernet address 01-00-5E-6E-D4-FC?

18. What multicast IP addresses map to the Ethernet address 01-00-5E-AF-CB-D2?


ANSWERS:

1. First, we need to determine the binary equivalent of the IP address 234.20.49.104:

 Decimal ->    234      20       49      104
 Binary  -> 11101010 00010100 00110001 01101000
We are interested in the low-order twenty-three bits, which are:
 0010100 00110001 01101000
Now, we drop the "interesting" bits into the "01-00-5E-00-00-00" multicast Ethernet template:
 |--hex-|  |----interesting bits---|
 01-00-5E-00010100 00110001 01101000
          ^
          |--- This bit is always a zero!
Finally, convert the low-order three octets to hex:
          |-----------binary----------|
          0001 0100 0011 0001 0110 1000
 01-00-5E-  1    4    3    1    6    8
 |----------------hex----------------|
The resulting Ethernet MAC address is 01-00-5E-14-31-68, which can also be written 0100.5e14.3168 and 0x01005E143168.

2. As in the last problem, we need the binary for the three low-order octets of the IP address 238.17.82.205, so let's just ignore the most significant octet:

 Decimal ->    17       82       205
 Binary  -> 00010001 01010010 11001101
Next, we take the low-order twenty-three bits, which are:
 0010001 01010010 11001101
Drop those bits into the multicast Ethernet template:
 |--hex-| |---------binary---------|
 01-00-5E-00010001 01010010 11001101
          ^
          |--- Always a zero!
And convert the low-order three octets to hex:
          |-----------binary----------|
          0001 0001 0101 0010 1100 1101
 01-00-5E-  1    1    5    2    C    D
 |----------------hex----------------|
The resulting Ethernet MAC address is 01-00-5E-11-52-CD (or 0100.5e11.52cd or 0x01005E1152CD).

3. Find the binary for the last three octets of 225.255.1.179:

 Decimal ->    255       1       179
 Binary  -> 11111111 00000001 10110011
Drop the twenty-three low-order bits into the template:
 |--hex-| |---------binary---------|
 01-00-5E-01111111 00000001 10110011
          ^
          |--- Zip! Zero! Nada!
Convert the low-order three octets to hex:
          |-----------binary----------|
          0111 1111 0000 0001 1011 0011
 01-00-5E-  7    F    0    1    B    3
 |----------------hex----------------|
The Ethernet MAC address is 01-00-5E-7F-01-B3.

4. This time for IP address 239.140.51.39:

Decimal ->    140      51       39
 Binary -> 10001100 00110011 00100111
Low-order twenty-three bits go into the template:
 |--hex-| |---------binary---------|
 01-00-5E-00001100 00110011 00100111
          ^
          |--- This bit is always a zero!
Convert the binary to hex:
          |-----------binary----------|
          0000 1100 0011 0011 0010 0111
 01-00-5E-  0    C    3    3    2    7
 |----------------hex----------------|
The result is 01-00-5E-0C-33-27.

5. The IP address 229.72.19.241 maps to Ethernet address 01-00-5E-48-13-F1.

6. The IP address 224.0.1.40 maps to Ethernet address 01-00-5E-00-01-28.

7. RIP v2 packets use 224.0.0.9 as the destination IP address, which maps to Ethernet address 01-00-5E-00-00-09.

   |-------------------------hex--------------------------|
   0    1    0    0    5    E    0    0    0    0    0    9
 0000 0001 0000 0000 0101 1110 0000 0000 0000 0000 0000 1001
 |--------------------------binary-------------------------|
This is "00000001 00000000 01011110 00000000 00000000 00001001" in binary.

8. Trick question! Recall that the multicast addresses run from 224.0.0.0 through 239.255.255.255, the Class "D" range. 245.99.13.202 is a Class "E" address (range of 240.0.0.0 through 255.255.255.254, which is used for research). Therefore, this IP address doesn't map to any multicast Ethernet address.

9. 224.0.19.0 through 224.0.19.63 map to 01-00-5E-00-13-00 through 01-00-5E-00-13-3F.

10. No calculations are required for the Layer-3 (IP) addresses. The source IP address is 160.231.5.69, and the destination IP address is 230.5.102.84. The Ethernet (Layer-2, physical, MAC, hardware, whatever) source address is 00-00-1B-3E-99-F0, and the Layer-2 destination address is 01-00-5E-05-66-54 (based on the destination IP address of 230.5.102.84).

11. Again, no calculations are required for the Layer-3 addresses. When the frame leaves the server, the source IP address is 174.62.89.103, and the destination IP address is 228.241.159.208. At this point, the source MAC address is that of the server's NIC, 0010.4ba0.b347, and the destination MAC address is 0100.5e71.9fd0 (which corresponds to the destination multicast IP address 228.241.159.208). When the frame arrives at the router, the frame header is stripped off, but the IP addressing is left alone (it works just like unicast in that regard). When the newly-generated frame leaves the router, it will have a source MAC address of 0000.0c8c.e136 (R1's E0 interface), and the destination MAC address will again be 0100.5e71.9fd0 (still based on the destination IP address, which hasn't changed).

12. Router interfaces forward packets for which the TTL exceeds the threshold set on the interface. Therefore, only interface E0 will forward the packet. The default value for TTL threshold is zero, so if the thresholds were set to the default, all three Ethernet interfaces would forward the packet.

13. An IP address has thirty-two bits, but the high-order four bits of a multicast IP address are fixed at "1110". Since this leaves us twenty-eight bits to work with, there are 268,435,456 (two to the twenty-eighth) unique multicast IP addresses.

14. There are forty-eight bits in a MAC address, but the high-order twenty-five bits of a multicast Ethernet address are fixed by the "01-00-5E-00-00-00" multicast template. Therefore, we have twenty-three bits to work with, and there are 8,388,608 (there are two to the twenty-third) unique multicast Ethernet addresses.

15. The ratio, as we would expect, is thirty-two multicast IP addresses per multicast Ethernet address. This is not an operations problem, since the actual Layer-3 address can be inspected by software. Hence, even if the same host was acting as a receiver for two multicast groups that mapped to the same Layer-2 address, things would work correctly. The downside to the overloaded addressing scheme is that the host CPU must make this determination. Address overlap is not an operational problem, but it could result in more work for the affected CPU's. Therefore, for optimum efficiency when doing multicasts to multiple groups, choose your Layer-3 addresses so that they don't map to the same Layer-2 address. For example, rather than using 226.0.0.1, 227.0.0.1 and 228.0.0.1 (which all map to 01-00-5E-00-00-01), use 226.0.0.1, 226.0.0.2 and 226.0.0.3 instead.

16. The low-order three octets of 01-00-5E-78-52-A3 are 78-52-A3:

 Hex    ->    78       52       A3
 Binary -> 01111000 01010010 10100011
Of which the low-order twenty-three bits are interesting:
 Low-order bits -> 1111000 01010010 10100011
The multicast IP range starts at 224.0.0.0:
 Decimal ->    224       0        0        0
 Binary  -> 11100000 00000000 00000000 00000000
And ends at 239.255.255.255:
 Decimal ->    239      255      255      255
 Binary  -> 11101111 11111111 11111111 11111111
We are interested in only the nine most-significant bits for this range:
 Start -> 11100000 0 (from 224.0.0.0)
 End   -> 11101111 1 (from 239.255.255.255)
To these we append the "interesting" twenty-three bits to obtain our thirty-two bit IP addresses:
          |-Prefix-||----Interesting bits---|
 Start -> 11100000 01111000 01010010 10100011
 End   -> 11101111 11111000 01010010 10100011
We are interested in these IP addresses, and everything in between :
          |-Prefix-||----Interesting bits---|    |---Decimal--|
 Start -> 11100000 01111000 01010010 10100011 -> 224.120.82.163
          11100000 11111000 01010010 10100011 -> 224.248.82.163
          11100001 01111000 01010010 10100011 -> 225.120.82.163
                       -- etc --                    -- etc --
          11101110 11111000 01010010 10100011 -> 238.248.82.163
          11101111 01111000 01010010 10100011 -> 239.120.82.163
 End   -> 11101111 11111000 01010010 10100011 -> 239.248.82.163
          |||||||| |||||||| |||||||| ||||||||
          SSSSVVVV VSSSSSSS SSSSSSSS SSSSSSSS -> V=Varies, S=Remains the Same
Looking at the entire thirty-two bit IP address, the range is 224.x.82.163 through 239.x.82.163, where "x" can be either 120 or 248. Notice also that of the thirty-two bits, only five are allowed to vary. Since two to the fifth power is thirty-two, there are a total of thirty-two multicast IP addresses that map to each multicast Ethernet address.

17. If you started calculating, you're working too hard! Didn't we just show that there are thirty-two multicast IP addresses that correspond to a multicast Ethernet address? This is true for all multicast Ethernet addresses.

18. None! There is no such multicast Ethernet address. Let's take a closer look. If we convert the low-order three octets of 01-00-5E-AF-CB-D2 to binary, we get:

   |-----------hex----------|
   A    F    C    B    D    2
 1010 1111 1100 1011 1101 0010
 |-----------binary----------|
Now, let's look at the low-order twenty-four bits:
  |--hex-| |---------binary---------|
  01-00-5E-10101111 11001011 11010010
           ^
           |--- A "one"!
There is a "one" in the "always a zero" position. As a result, this is not a legal multicast Ethernet address. Trick question!


Return to the top of this Exercise!

Return to the directory of Goodies!


Copyright © 2005 Alchemy, Inc. All rights reserved.