while analizing a packet capture, i was wondering on what fields the FCS uses to get CRC. some places tells that it gets the whole frame, even preamble, others just say that it just calculates using only the data.
The IEEE 802.3 standard that defines the basic Ethernet framing defines the FCS field in Section 3.2.9 as follows:
A cyclic redundancy check (CRC) is used by the transmit and receive algorithms to generate a CRC value for the FCS field. The FCS field contains a 4-octet (32-bit) CRC value. This value is computed as a function of the contents of the protected fields of the MAC frame: the Destination Address, Source Address, Length/ Type field, MAC Client Data, and Pad (that is, all fields except FCS).
So specifically the Preamble and Start-of-Frame Delimiter are not covered by the FCS field. This is logical, considering the fact that these fields were used in 10Mbps Ethernet versions to provide synchronization function between the sender and receiver, and thus a (varying) couple of starting bits from the Preamble could have been lost or incorrectly recovered. That did not invalidate the whole frame, however.