-1

I am learning about switches, hubs etc and I am confused with understanding what switches, hubs, computers do if they get wrong ethernet frame ( check sum is calculated and it turns out that destination address is wrong). Devices can run in different modes.

I think that for hub it doesn't matter if frame is wrong, because it doesn't calculate checksum. I know also that switches can work in promiscuous mode. Is it correct that switches and computers reject that frame ?

4
  • This question is confusing, why are you mixing wrong destination address and checksum calculation in the same question?
    – This
    Nov 27 '14 at 17:56
  • because I thought that checking if the destination address is correct is made in checksum calculation
    – Yetyw
    Nov 27 '14 at 18:20
  • We have to assume the checksum is correct when the frame is originally sent. Frame corruption causes checksum failure, and Store-and-forward switches will discard the corrupted frame regardless of what was corrupted in the frame. Most switches these days are Store-and-forward switches. If you're asking about how a corrupted frame is handled by Store-and-forward switches vs cut through switches, that isn't clear and you should explicitly state that in the question
    – This
    Nov 27 '14 at 18:48
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide your own answer and accept it.
    – Ron Maupin
    Aug 7 '17 at 14:02
2

If I understand you correctly then the process you're describing happens on a couple of levels (or layers).

If the switch detects a checksum failure then it'll discard the frame and probably make an internal note of the error (Cisco 3550s certainly record errors, runt frames etc). At this point the switch couldn't know if the address was 'wrong' or which part of the frame was damaged so discarding it is the only reasonable thing to do. The checksum is just a way of deciding if "an error of some sort" happened when transmitting the frame, but can't tell you where in the frame the error was.

Now, that frame is part of a packet being sent somewhere. Because it gets dropped, the packet it belongs to is going to be broken and TCP is going to be patiently waiting for a packet with a particular sequence number to arrive. Part of the packet will arrive but the networking stack on the destination can't do anything with a part packet so will send a request to the source host asking for the whole packet to be resent.

In reality you could have some freak error in the part of the frame that holds the Frame Check Sequence. In this case the real data might be intact but the frame is dropped because it'd be checked with an incorrect FCS.

The destination knows which packet to request because it's kept a record of where it's gotten to in the sequence. If it receives packets 1,2,3 and 5, it'll know something went wrong with packet 'number' 4.

The different modes you talk of are Store and Forward, Cut Through and Fragment Free, which offer different levels of checking a frame before passing it onto the next device.

A hub would be oblivious to all the above since it's only concerned with bits - a hub literally just repeats everything it receives. In one ear and out the others, if you will.

2
  • Thank you. To make it clear : I was thinking about situation where destination address is wrong ( I wrote about check sum, because I think it is calculated there) and what will do each device. Hub sends it to all ports except one. Switch can work in Store and forward, Fragment Free ( in both it rejects) and Cut Through it move forward right , because check sum isn't calculated yet ( but where ? ). Computer get this frame and see that it is wrong address so it will reject. I am not familiar with upper layers. I am learning data link layer now.
    – Yetyw
    Nov 27 '14 at 18:29
  • 1
    So are you asking what each type of device would do if it receives a frame with a destination address that isn't its own mac address? If so, a hub doesn't look at the MAC, because it doesn't care. A switch will check the mac address table for the address and will either forward it out the port it is known on or to all ports other than the inbound port if the MAC was previously unknown. A computer will normally discard all frames with any destination address that isn't its own, while a network card in promiscuous mode will listen and possibly store frames destined to any and all MAC addresses. Nov 27 '14 at 19:35
0

Yes the switch will drop the frame. But switches don't work like end hosts, so it's not quite right to say they operate in promiscuous mode.

2
  • thank you, but could you also write what computers and hub will do ? So, computers can only work in promiscuous mode ( is that matter for wrong frame ) ?
    – Yetyw
    Nov 27 '14 at 17:28
  • I'm not certain what you're getting at. All devices will drop the frame if the checksum is bad. There's no point to do any other processing on a bad frame. The device can't tell what part of the frame is bad, like the destination address. All it needs to know is that it is corrupted and should be discarded.
    – Ron Trunk
    Nov 28 '14 at 14:17

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.