|
|
|
Single LAN
multicast is possible without the need for a multicast router. However, LANs
do not understand IP addresses they understand MAC addresses. We need address
resolution.
|
|
MAC multicast
addresses cannot be hardwired into LAN adaptor cards in the same way as
ordinary MAC addresses. They need to be configured at run-time, i.e. the host
must tell its LAN adaptor which multicast MAC addresses to listen for. This
must be done the first time a process on the host expresses interest in
joining a particular IP multicast group. At this point, the host needs to map
the IP multicast group address to a MAC multicast address which it can pass
to the adaptor. The mapping must be identical in all hosts and in the router
since all participants in the group must end up listening to the same MAC
multicast address. This could be done through consultation with a server or,
perhaps, a broadcast address resolution protocol could be devised. In fact,
the decision made was that the mapping should be algorithmic.
|
|
IANA owns a
block of Ethernet addresses in the range 00:00:5e:00:00:00 to
00:00:5e:ff:ff:ff and allocates the lower half of these for multicast. The
Ethernet convention is that the first byte must be set to 01 to indicate a
multicast address. Therefore the range we can use for multicast is
01:00:5e:00:00:00 to 01:00:5e:7f:ff:ff . This means we have 23 bits to play
with. These bits are set to the low-order 23 bits of the IP multicast group
address to generate the MAC address. So, the address 224.20.5.1, which is
e0.14.05.01 in hex, will map to the MAC address 01:00:5e:14:05:01. This is
shown in binary below. (We have shown the bit ordering in the conventional
way so that 0x01 appears as 00000001. In fact the bits are inserted into the
Ethernet frame fields with each byte reversed - so, for example, that the
first byte goes out on the wire as 10000000.)
|
|
Now, this is
obviously not a 1-1 mapping and it is possible that we end up with two IP
multicast groups on a LAN mapped to the same MAC multicast address. This is
unfortunate, but not disastrous. It means that a host which has joined the
group with address 224.20.5.1 will also receive datagrams intended for (say)
224.148.5.1 and will have to filter these out in software. However, many LAN
interface cards do not filter multicast traffic efficiently, so this software
filtering will need to be present in any case.
|