IP/Network

 

 

 

 

Ethernet : Frame Structure

 

Ethernet is a PHY/MAC prtocol for the communication over what we usually call 'LAN' cable. We also call these cables as ethernet cable.

The cable shown in the following image is called RJ45 cable (i.e, the cable using RJ45 connector). Usually this type of cable is used upto 1 Gb date rate. For the data rate over 1Gb (e.g, 10 Gb rate) other types of connector like SFP or QSFP connectors attached to optical fiber or copper cable.

 

 

 

Overall Stream Structure

 

Overall frame structure of ethernet can be illustrated as follows. The further details of each component within a frame will be described in following sections.

 

The most common type of data carried by the Payload would be IP data, but recently many other types of data are carried by ethernet payload as shown in eCPRI or RF IQ (RoE).

 

 

IFG (Inter Frame GAP)

 

The frames running along the line is not tightly back to back. There should be some space (time gap) with a certain minimum duration. This time gap is called Inter Frame GAP.

The IFG is 9.6 ms for Fast Ethernet, is transmissin timing of about 12 bytes in 10 Mbps and 0.096 in case of Gigabit Ethernet.

The IFG will allow the signal time to propagate through the receiver electronics at the destination. While every transmitter must wait for this time between sending frames, receivers do not necessarily see a "silent" period of 9.6 microseconds. The way in which repeaters operate is such that they may reduce the IFG between the frames which they regenerate.

 

 

Preamble/SOF

 

The purpose of the preamble is to allow time before transmission starts is to allow a small time interval for the receiver electronics in each of the nodes to settle after completion of the previous frame. The purpose of the SOF is to notify the receiving station that the frame bits are going to come in next.  There are two ways of defining the Preamble and SOF depending on the source:

 

In Type 1, the preamble is 8 bytes and includes the SOF, which is the last 2 bits of the preamble, "11"

In Type 2, the preamble is 7 bytes and the SOF is 1 byte (10101011)

 

 

In any case, combined they are a total of 64 bits, or 8 bytes.  The frame does not officially begin until just after the SOF.  

When encoded using Manchester encoding, at 10 Mbps, the 62 alternating bits produce a 5 MHz square wave.  The purpose of the preamble is to allow time for the receiver in each node to achieve lock of the receiver Digital Phase Lock Loop which is used to synchronise the receive data clock to the transmit data clock. At the point when the first bit of the preamble is received, each receiver may be in an arbitrary state (i.e. have an arbitrary phase for its local clock). During the course of the preamble it learns the correct phase, but in so doing it may miss (or gain) a number of bits. A special pattern (11), is therefore used to mark the last two bits of the preamble. When this is received, the Ethernet receive interface starts collecting the bits into bytes for processing by the MAC layer

 

 

 

Ethernet Header

 

The structure of Ethernet header is a little bit varying depending on different specfication. Followings are a few different header structure of different specification.