This is an article excerpt: Original address, http://www.doc88.com/p-183734270405.html
How the Ethernet switch works: It detects the source and destination Mac (media access Layer) address of the packet from the Ethernet, and compares it to the dynamic lookup table inside the system, if the packet's MAC layer address is not in the lookup table, adds the address to the lookup table, and packets the data to the appropriate destination port. The switch uses a virtual connection technology to connect the two sides of the communication. The so-called virtual connection refers to the communication between the two parties to establish a logical private connection, the connection until the end of the transfer to the destination node. The virtual connection is implemented through the Port-Address table of the switch: the switch continuously establishes and maintains an address table of its own in the course of its work, which indicates the corresponding relationship between the MAC address of the node and the switch port. When the switch receives a packet, it goes back to its own address table to identify exactly which port the destination MAC address in the packet corresponds to. Once the verification is complete, the sending node is established with a dedicated connection to the port, and the sender's data is sent only to the switch port corresponding to the destination MAC address.
Definition of crossover network cable and direct connected network cable:
How the Switch works