1

When it comes to switches I learned that the first time packets are sent from one node to another, the packets are sent to all nodes on that network. The switch then remembers where, for example, Computer A is trying to send the packets to (Computer D for example) and when it learns that, it will then only send the packets to Computer D and ignore all the others, and thus reducing traffic and save bandwidth.

Question 1: Am I spot on with that or am I missing something?

Question 2: What do the other computers do with the packets they received the first time that the packets were sent out? Are they ignored?

Flimzy
  • 2,375
  • 17
  • 26
Space Ghost
  • 123
  • 1
  • 4
  • Your question needs some improvement from you. In it's current state it seems to be [off-topic](http://serverfault.com/help/on-topic) – MichelZ Apr 28 '14 at 06:47

2 Answers2

2

Am I spot on with that or am I missing something?

Yes. Switches learn on which ports a computer is reachable, and store that information and use it in the future.

What do the other computers do with the packets they received the first time that the packets were sent out? Are they ignored?

Yes, other hosts ignore the ARP request.

MichelZ
  • 11,008
  • 4
  • 30
  • 58
2

Am I spot on with that or am I missing something?

Yes, you got that correct. Once a packet has been sent, the switch remembers were the sending computer is. This entry stays until either:

  • The computer sends no more packets for some duration (defined by the switch).
  • The computer is moved to a different switch port, from which the switch will then see packets arriving.
  • The switch runs out of memory for remembering MAC addresses and removes some.

The switch need ultrafast access to this information, so it cannot be stored in a normal RAM chip. Instead a CAM is used. That means content addressed memory, which is fast for the kind of operations a switch or a router need to do, but has very small capacity. Typically low-end switches can remember a few thousand computers at most.

What do the other computers do with the packets they received the first time that the packets were sent out?

Usually the operating system will tell the network interface to only hand over packets destined for its own MAC address. So the hardware will ignore those packets, and the operating system will never see them. In special situations, that may not be sufficient, so the operating system can tell the network interface to hand over all the packets, and then the operating system must decide which to ignore. This is for example used if you run a virtual machine with a different MAC address attached to the same network segment.

kasperd
  • 29,894
  • 16
  • 72
  • 122