Tuesday, February 2, 2010

Ethernet


Ethernet: 
Ethernet protocols refer to the family of local-area network (LAN) covered by the IEEE 802.3. The simplest form of Ethernet uses a passive bus operated at 10 Mbps, Which is a shared model. After that Switch Ethernet came in to picture.

In the Ethernet standard, there are two modes of operation: half-duplex and full-duplex modes. In the half duplex mode, data are transmitted using the popular Carrier-Sense Multiple Access/Collision Detection (CSMA/CD) protocol on a shared medium. The main disadvantages of the half-duplex are the efficiency and distance limitation, in which the link distance is limited by the minimum MAC frame size. This restriction reduces the efficiency drastically for high-rate transmission. Therefore, the carrier extension technique is used to ensure the minimum frame size of 512 bytes in Gigabit Ethernet to achieve a reasonable link distance.
Four data rates are currently defined for operation over optical fiber and twisted-pair cables:
  • 10 Mbps - 10Base-T Ethernet (IEEE 802.3)  
  • 100 Mbps - Fast Ethernet (IEEE 802.3u)
  • 1000 Mbps - Gigabit Ethernet (IEEE 802.3z)  
  • 10-Gigabit - 10 Gbps Ethernet (IEEE 802.3ae).  
  • 100Gbps - ...

Elements of Ethernet :
  • Ethernet Frame 
  • Medium Access Control (MAC)
  • Physical Medium (PHY)

Ethernet Frame:
Ethernet traffic moves in units called frames. The maximum size of frames is called the Maximum Transmission Unit (MTU). When a network device gets a frame larger than its MTU, the data is fragmented (broken into smaller frames) or dropped. Historically, Ethernet has a maximum frame size of 1500 bytes, so most devices use 1500 as their default MTU. A standard Ethernet frame is comprised of payload produced at Layer 4 and above, an IP header produced at Layer 3, and a data header produced at Layer 2. The payload at Layer 4 is the MSS (Maximum Segment Size), and is typically 1460 bytes. Add the TCP/IP header of 40 bytes and we have the Layer 3 MTU or maximum transmission unit of 1500 bytes.

At Layer 2, a frame header is added to the MTU, which is comprised of the source and destination MAC addresses (6 + 6 = 12 bytes), the Ethernet type (2 bytes) and the CRC information (4 bytes), totaling 18 bytes. Many refer to an Ethernet frame as 1518 bytes, which is simply the 1500 byte MTU plus the 18 byte header. The 4 byte CRC information is sometimes not counted, leading to the 1514 byte size. If 802.1q VLAN tagging is in use, an additional 4 bytes are added, bringing the total to 1522 bytes.

7
1
6
6
2
46-1500bytes
4
Pre
SFD
DA
SA
Length Type
Data
FCS
  • Preamble (PRE)- 7 bytes. The PRE is an alternating pattern of ones and zeros that tells receiving stations that a frame is coming, and that provides a means to synchronize the frame-reception portions of receiving physical layers with the incoming bit stream.
  • Start-of-frame delimiter (SFD)- 1 byte. The SOF is an alternating pattern of ones and zeros, ending with two consecutive 1-bits indicating that the next bit is the left-most bit in the left-most byte of the destination address.
  • Destination address (DA)- 6 bytes. The DA field identifies which station(s) should receive the frame..
  • Source addresses (SA)- 6 bytes. The SA field identifies the sending station.
  • Length/Type- 2 bytes. This field indicates either the number of MAC-client data bytes that are contained in the data field of the frame, or the frame type ID if the frame is assembled using an optional format.
  • Data- Is a sequence of n bytes (46=< n =<1500) of any value. (The total frame minimum is 64bytes.)
  • Frame check sequence (FCS)- 4 bytes. This sequence contains a 32-bit cyclic redundancy check (CRC) value, which is created by the sending MAC and is recalculated by the receiving MAC to check for damaged frames.