Ethernet Switch - A switch, also known as a bridge, is a complex device with built-in intelligence and memory to connect Ethernet nodes. A switch operates at the data link layer (layer 2 of the OSI model). The switch learns the MAC address of each connected device and routes the unicast packets (frames) accordingly. Broadcast packets are flooded and Multicast packet handling depends on the type of switch used. Switches also eliminate collisions that typically make Ethernet non-deterministic.
Local Area Network (LAN) - A local area network is a group of computers and associated devices (PLC’s, HMI’s, PC’s, etc), commonly referred to as nodes, that share a common communications line or wireless link. Individual users can share data or files on a LAN as if the data or files residing on their respective computers.
Media Access Control (MAC) Address - A hardware address that uniquely identifies each device, or node, on a local area network.
Address Resolution Logic (ARL) - A table, internal to a switch, of forwarding rules based upon which MAC addresses exist on which ports of the switch. Switches use these tables to pass frames, which are destined for an address that’s connected to another port on the switch.
Aging Time - The length of time that a MAC address entry can remain in the ARL forwarding table. When an entry reaches its aging time, it “ages out” and is purged from the table, effectively canceling frame forwarding to that specific port. In other words, if the switch doesn’t hear from a device after a specified period of time, the MAC entry in the ARL table is deleted.
Unicast Frame - Sent to a specific host. One to one communication.
Multicast Frame - Sent to one or more interested hosts. A host registers its interest in a particular multicast group via the Internet Group Management Protocol (IGMP). One to many Communication.
Broadcast Frame - Sent to all hosts in the local network. One to all communication.
Learning from the frames they receive, switches dynamically create tables that associate the ports with the MAC addresses of the hosts that can be reached. The port that a frame is forwarded to is based on an internal Address Resolution Logic (ARL) table that maps MAC addresses to the individual ports connected. The switch then forwards unicast frames received on any given port to the appropriate port(s), helping reduce the overall traffic in a local area network (LAN) and providing more effective use of bandwidth with its filtering abilities. Unlike unicast frames, switches will forward all broadcasts, multicasts, and/or packets destined to unknown MAC addresses to all ports in the local area network, other than the port in which it was received.
The following figures will show the process a switch goes through in order to learn and build ARL tables, as well as delete “aged out” entries. Keep in mind that if a switch doesn’t hear from a device after the specified period of time, the MAC entry in the ARL table is deleted. In Figure 1A, the switch is adding an entry to its ARL table. The switch records the MAC address from the source address field of a frame and records which port it came in on.
When connecting switches in a ring or mesh topology, some kind of loop avoidance mechanism is needed in order to avoid an illegal loop and the broadcast storm that follows. The following example explains why using Rapid Spanning Tree Protocol (RSTP) can be beneficial in limiting the time it takes for the network to converge and heal after a fault or break occurs on the local area network.
In the network shown in figure 2A, switch B1 is blocking its link to switch B4, per RSTP specifications. Traffic from device A to device B goes through switches B1, B2, B3, and then B4.
If the link between B2 and B3 faulters, as seen in figure 2B, communication between A and B is interrupted at least until B1 places its port to B4 in forwarding mode. However, when A wants to send a frame to B, B1 still has an entry that leads to B2 and the frame is dropped. The same applies when B wants to reach A. Communication would be lost for 20 seconds, until the URL entries for devices A and B age out, but once RSTP places the port into forwarding mode, the ARL table is automatically updated and traffic flows properly.
The dynamic ARL tables in switches are very efficient in a stable network. However, there are many situations where even a 20 second aging time is problematic after the topology of the network has changed. All fully managed N-Tron switches are 802.1d, 802.1w, 802.1D RSTP compliant and can take advantage of spanning-tree’s advanced algorithm and convergence times.
A much simpler example of how aging works can be seen in the following example.
Default aging times vary from 20 seconds to 300 seconds and are programmable from 10 seconds to 300 seconds in select N-Tron switches, as seen below in Table 1.
300 Seconds, changes to 20 seconds for any detected or configured N-ring or RSTP ports.
Note: To manually reset the ARL entries in a switch, you can cycle power to the device. This will enable the switch to re-learn/re-build the Address Resolution Logic (ARL) table.
In the web browser of N-Tron fully managed switches (700, 7000, 9000), the Aging Time tab under the Bridging category will display the currently configured Aging Time. This page allows users to modify this variable to meet their needs.
After selecting the Modify button, the user will be presented with a page that allows the number to be entered into and updated. The default aging time is 20 seconds.
Note: If the switch is an active participant of an N-Ring, then the N-Ring Aging Time will be used instead of the Bridging Aging Time. The N-Ring Aging Time has a default of 20 seconds and is separate from the Bridging Aging Time. N-Ring Aging Time is used when the switch is an N-Ring Manager or becomes an active N-Ring Member.
When enabled, the Aging Time for dynamically learned addresses can be set from 10 to 300 seconds. The default is 300 seconds, except it is 20 seconds for 508FX2 and 526FX2. Cycling power clears the learned addresses.
Note: The configuration console is only available with –A models.
Displays the current Aging settings.
Default is 300 seconds, except it is 20 seconds for 508FX2 and 526FX.
The aging process is Enabled.
Aging time is now 20 seconds.
Aging time is now 15 seconds.
Note: Setting too short an aging time can cause addresses to be prematurely removed from the table. Then when the switch receives a packet for an unknown destination, it floods the packet to all ports in the same LAN as the receiving port. This unnecessary flooding can impact performance. Setting too long an aging time can cause the address table to be filled with unused addresses, which prevents new addresses from being learned.