Feature #5: Update VLAN ID
Explore how to update VLAN IDs in a network topology modeled as a 2D array of switches. Learn to apply depth-first search to propagate VLAN ID changes to neighboring switches with matching IDs, understanding the constraints and ensuring efficient network update processes.
We'll cover the following...
Description
We have a network topology in which several network switches are interconnected in a rectangular grid fashion. The switches are configured with VLAN IDs that are stored in a 2D array. Periodically, VLAN IDs need to be changed. At a specific switch, we will initiate a VLAN ID change request. This request will be propagated to its neighbors with the same VLAN ID, which will then forward it to their neighbors, and so on, until all switches in the topology are covered. The security is configured so that a switch will accept a VLAN ID change request only if the request is sent from a switch with the same VLAN ID and is above, below, to its right or left, or in the array. A VLAN ID change request is started at a switch in row r and column c, with a new VLAN ID specified. All the switches’ VLAN IDs need to be updated under the given constraints.
We’ll be provided with a 2D matrix ...