A traditional Ethernet switch (Layer 2 device) works with Ethernet frames, and a traditional router (Layer 3 device) looks at packets to make decisions on how messages will be handled. As discussed in Chapter 1, when a device sends a broadcast frame, the destination address is all ones, and a unicast message is the destination MAC address. What happens when it is a multicast message? To optimize network resources, an Ethernet switch also needs to understand multicast. This is where the magic happens. The sending device must convert the destination IP multicast address into a special MAC address as follows:
The high-order 25 bits is the official reserved multicast MAC address range from 0100.5E00.0000 to 0100.5E7F.FFFF (request for Comment 1112). These bits are part of the organizational unit identifiers (OUI).
The lower-order 23 bits of the destination IP multicast address are mapped to the lower-order 23 bits of the MAC address.
The high-order 4 bits for the destination IP multicast address are set to 1110 binary (0b1110). This represents the Class D address range from 224.0.0.0 (0b11100000) to 239.255.255.255 (0b11101111).
Of the 48 bits used to represent the multicast MAC address, the high-order 25 bits are reserved as part of the OUI, and the last 23 bits of the multicast IP address are used as the low-order bits, as shown in Figure 2-4.
A switch can use this calculated multicast MAC address to distinguish a frame as a multicast and make efficient forwarding decisions. End hosts can listen for frames with a specific multicast MAC, allowing them to process only those multicast streams to which they have subscribed. There’s a small wrinkle in this process, however.
The high-order 25 bits is the official reserved multicast MAC address range from 0100.5E00.0000 to 0100.5E7F.FFFF (request for Comment 1112). These bits are part of the organizational unit identifiers (OUI). The lower-order 23 bits of the destination IP multicast address are mapped to the lower-order 23 bits of the MAC address. The high-order 4.
A multicast address is a logical identifier for a group of hosts in a computer network that are available to process datagrams or frames intended to be multicast for a designated network service. Multicast addressing can be used in the link layer (layer 2 in the OSI model ), such as Ethernet multicast, and at the internet layer (layer 3 for OSI.
The multicast IP addresses above all map to the same multicast MAC address (01-00-5E-01-01-01). This can cause some problems in our networks. For example, a host that listens to the 239.1.1.1 multicast IP address will configure its network card to listen to MAC address 01-00-5E-01-01-01. Unicast addresses. Unicast addresses represent a single LAN interface. A unicast frame will be sent to a specific device, not to a group of devices on the LAN: The unicast address will have the value of the MAC address of the destination device. Multicast addresses. Multicast addresses represent a group of devices in a LAN.
The 'show mac-address-table multicast vlan' is supported on a layer 2 only switch, but the table it displays will generally be empty. A host generating lots of multicast traffic will not cause us to add entries to the layer 2 multicast table. We 'learn' multicast entries only through IGMP snooping.
Mac Address For Multicast Packets
Did you notice a slight challenge with the number of IP addresses and MAC addresses? Five bits of the IP address are overwritten by the OUI MAC address. This causes a 32-to-1 IP multicast address-to-multicast MAC address ambiguity (25 = 32).
This means that a host subscribing to a multicast stream could potentially receive multiple multicast streams that it did not subscribe to, and the host will have to discard the unwanted information. A host subscribing to the multicast stream of 224.64.7.7 would map to MAC address of 0x0100.5E40.0707, and so would 225.64.7.7 and 224.192.7.7. It all boils down to 1s and 0s. Figure 2-5 shows the ambiguity. The “X” in the binary row represents the bits that are overwritten and shows how 32 multicast IP addresses map to a single multicast MAC address.
Figure 2-5Layer 2 Multicast MAC Address Overlap
There are three types of Ethernet addresses:
1. unicast addresses
Unicast Mac Address
Unicast addresses represent a single LAN interface. A unicast frame will be sent to a specific device, not to a group of devices on the LAN:
The unicast address will have the value of the MAC address of the destination device.
2. multicast addresses
Multicast addresses represent a group of devices in a LAN. A frame sent to a multicast address will be forwarded to a group of devices on the LAN:
Multicast frames have a value of 1 in the least-significant bit of the first octet of the destination address. This helps a network switch to distinguish between unicast and multicast addresses. One example of an Ethernet multicast address would be 01:00:0C:CC:CC:CC, which is the address used by CDP (Cisco Discovery Protocol).
3. broadcast addresses
Broadcast addresses represent all device on the LAN. Frames sent to a broadcast address will be delivered to all devices on the LAN:
The broadcast address has the value of FFFF.FFFF.FFFF (all binary ones). The switch will flood broadcast frames out all ports except the port that it was received on.