Switch ports can use different speeds and in some switch types you can even configure what type of communicating channel is using (full/half duplex). If you want to configure a switch connection type, you can select one of the following options: full - select full-duplex connection, half - select half duplex connection and auto - the switch selects automatically what type of connection it will use. You already know that switch-to-switch connections usually use crossover cables. Some switches have the mdix auto function which can enable them to automatically use what type of cable is connected (it can be a straight-through and a crossover cable).
Switches use three types of communication messages, unicast, broadcast and multicast. You already know about these messages from a previous post. The functionality of a switch can be easily described. As the name says, a switch receives a message from a port and then chooses the exit port. Communications between switches are made using MAC addresses. Switches use mac address tables to keep in track of devices that communicate throughout a network. Upon startup, a switch will have it's mac table empty. When a message is received from a device, the switch adds it's MAC address in the mac address table. Because there are no other entries in the table, the switch floods the message on all ports, except the port that the message came through. The destination device will respond with a unicast replay message. The switch will add the mac address of the host. Remember that switches divide collision domains but do not segment broadcast domains. Only a layer 3 device such as a router can segment collision and broadcast domains. Each device in a switched network adds latency to the overall transfer process (each device must process data).
Based on the port speeds, a switched network can be either asymmetric or symmetric. If all ports in the network have the same speed, the network is a symmetric one, if the ports have different speed, then the network is called a asymmetric network.
I've told you that switches are mainly used to forward packets inside a network. There are two main forwarding mechanisms used: store-and forward switching and cut-through switching. In the store-and forward switching mechanism, a switch will wait until it receives the entire packet. It will then calculate the CRC and then it will compare this value with the frame's length. If everything is in order, the switch will forward the packet to the corresponding port. The cut-through switching method is a little faster because the switch will not wait for the entire packet to be received. Once it reads the destination address, the switch will start transmitting the packet. Switches store packets, for processing, using one of the following types of memory buffers:
port-based memory - each port has it's own dedicated memory used to store packets in queues.
shared memory - all switch ports share the same memory
When configuring a switch, we will use almost the same commands as with routers. There are four configuration modes: user mode, privileged more, global configuration mode and special configuration mode (the same as with routers). The following image will display something that we are already familiar with, how the prompt changes when you enter in different configuration modes: