1

I am unable to find the correct answer to this question all over the web. Wikipedia states The FCS value is computed as a function of the protected MAC frame fields: source and destination address, length/type field, MAC client data and padding (that is, all fields except the FCS) The source/destination address of the frame changes at every hop. Also, the IP header TTL is modified by en route routers. With so many changes happening, how can the primary sender set the FCS and the end receiver discard the final frame based on the CRC/FCS failure?

So, back to my original question: FCS in the ethernet header is a function of what all fields in the Ethernet frame(and the layers above)?

  • "The source/destination address of the frame changes at every hop." That simply isn't true. If you mean router hops, the frame is discarded by the router, which then switches the packet, building a new frame for the next interface, which may be using a completely different protocol with a different frame type and addressing. – Ron Maupin Apr 30 at 19:22
1

The frame encapsulating the packet is only used on the local LAN. The frame header and FCS are stripped off the packet and discarded by a router. The router will then switch the packet to the next interface, and the router will build a new frame for the next interface. The next interface may be using a completely different data-link protocol. Not all data-link protocols use MAC addressing (or even any addressing), and different data-link protocols can have different methods for calculating an error detection field, or may not even have such a field.

For example, a host on Wi-Fi could send a frame to a WAP, and the WAP is a translation bridge that converts the Wi-Fi frame to an ethernet frame and sends that frame to a router. The router removes and discards the frame from the packet, then switches the packet to the WAN connection (DSL) that uses PPPoA. PPP has a very different frame than either ethernet or Wi-Fi, and it uses no addressing because there is only the other end of the link. The FCS on each type of frame used really has nothing to do with the FCS on the other types of frames used.

The FCS on a frame is only used for the source and destination on the LAN on which the frame originates (it is also use by intermediate devices on the LAN, e.g. switch/bridge). The FCS is also discarded as the frame header is discarded when it is received by a router, and both a new frame header and FCS (assuming the next data-link protocol uses an FCS) are created for the next router interface.

  • After reading an erroneous article, I wrongly thought that the FCS remains the same till the final layer3 destination address, hence the question. After reading the responses I now realize that the FCS is checked against and recalculated at every layer 3 hop. I am back to my original understanding of how this works. Thanks for the elaborate explanation. – Saim Apr 30 at 21:36
  • Many people say that the MAC addresses are changed by a router, but they are really stripped out and lost when the frame is discarded. The entire frame is lost because the link on the next interface may be using a completely different data-link protocol. If the next link is ethernet, too, then it may appear on the surface that the router simply changes the MAC addresses, and that is what leads people to be confused about what is really happening. – Ron Maupin Apr 30 at 21:41
1

What all fields is the FCS/CRC in the trailer of the ethernet frame calculated over?

Check IEEE 802.3 Clause 3.2.9:

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).

The source/destination address of the frame changes at every hop.

The frame (including MAC source and destination addresses) does not change across L2 hops. For an L3 hop (router), the frame containing the MAC addresses doesn't survive the hop. Instead, the router decapsulates the contained L3/IP packet, makes its forwarding decision and (if necessary) re-encapsulates the packet in a new frame built for the egress segment.

Also, the IP header TTL is modified by en route routers.

That's true. Note however, that the IP header is a part of the L3 packet.

With so many changes happening, how can the primary sender set the FCS and the end receiver discard the final frame based on the CRC/FCS failure?

The primary sender builds the IP packet including the header checksum (for IPv4). For an Ethernet network, the IP packet is encapsulated in an Ethernet frame including the calculated FCS. The frame doesn't change across the switches on its path until the first router is reached, where the frame is discarded.

The final IP destination checks the FCS from the frame built by its local gateway, extracts the IP packet, checks its header checksum (for v4) and extracts its payload, often with its own checksum.

Since the IPv4 header checksum is pretty much redundant and the continuous TTL change and the checksum recalculation puts load on the router, the checksum has been removed for IPv6.

  • After reading an erroneous article, I wrongly thought that the FCS remains the same till the final layer3 destination address, hence the question. After reading the responses I now realize that the FCS is checked against and recalculated at every layer 3 hop. I am back to my original understanding of how this works. Thanks for the elaborate explanation. – Saim Apr 30 at 21:36
  • Actually, the FCS is checked at each L2 hop (=switch) - there's no need to recalculate though (unless tags are added/removed/changed). – Zac67 Apr 30 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.