Search this blog

Sunday, January 3, 2010

Day 25: Media Access Control

Ethernet media access control (MAC) defines how a transmission is prepared for the phsycial media, when a device can transmit over the wire and to decypher received transmissions.

An Ethernet frame is an OSI layer 2 PDU. Its maximum size is 64 bits and hosts do not process frames that are larger than 1518 bytes (giants) or smaller than 64 bits (runts).

As a reminder the MAC address consists of 12 hexadecimal digits and is 48 bits or 6 bytes. Cisco prefers to group them in three groups of 4 digits, for example: 01:23:45:67:89:ab

It's important to remember that only hosts with an IP address use an ARP request to find the destination MAC and create a socket to identify the device.

Let's discuss CSMA/CD (Carrier Sense Multiple Access Collision Detect):
many stations can transmit on the same cable with CSMA/CD and no station has priority over another (multiple access). Before a station transmits, it listens on the wire (carrier sense) to make sure that no other station is transmitting. If a collision occurs, the transmitting stations detect the collission and run a backoff algorithm, its a random time that each station waits before retransmitting.

Collision domains can be increased by switches (and bridges) because switches filter and forward frames based on source and destination MACs. That ability is also called microsegmentation of the network. Switches still forward all frames with FFFF:FFFF:FFFF as destination MAC address because it's a broadcast frame. Only routers do not forward these BC's. So, each switch port is its own collision domain and routers break up broadcast domains!

Layer 2 switches have these four advantages over bridges:
  • A high-speed backplane that enables multiple simultaneous conversations to occur.
  • Data-buffering capabilities that store and forward packets to the correct ports or port.
  • Higher port densities versus bridges.
  • Lower latency than bridges. Layer 2 switches are implemented in hardware, allowing millions of bits per second to be transmitted at the same time.

No comments:

Post a Comment