Monday, April 20, 2009

Ethernet Layer 2 Addressing & Switching and Bridging Logic

Layer 2 address is basically the MAC address, and there are three major types of MAC addresses:

Unicast: individual device to receive the frame

Multicast: group of devices to receive the frame, like radio, one transmit and group receive

Broadcast: all devices in the current network segment, always = FFFFFFFFFFFF







I/G = Individual group, 0 means unicast, 1 means multicast.

U/G = Universal group, 0 means the address in vendor assigned, 1 means the address is administratively assigned, overriding the vendor-assigned address.



So, the first byte of the MAC address is either 00, 01, 02, 03:

00 = unicast, vendor assigned

01 = multicast, vendor assigned

02 = unicast, administratively assigned

03 = multicast, administratively assigned


By setting the MAC address administratively (by hand), the device driver would not enforce the U/G to be 1, so we are able to set the MAC address to some freaky address of our choice, yet when it is being dynamically set, the U/G will be set to 1 automatically.


Here is the Switch behavior whenever a frame hits an interface incoming:

Type of Address

Switch Action

Known Unicast

Forwards frame out the single interface associated with the destination address

UnKnown Unicast

Floods frame out all interfaces, except the interface on which the frame was received

Multicast

Floods frame identically to unknown unicasts

Broadcast

Floods frame identically to unknown unicasts, unless multicast optimizations are conīŦgured



Thanks

No comments: