Which set of commands is recommended to prevent the use of a hub in the access layer?
Click on the arrows to vote for the correct answer
A. B. C. D.C
The correct answer is C. switch(config-if)#switchport mode access switch(config-if)#switchport port-security maximum 1
Explanation:
A hub is a layer 1 device that operates at the physical layer of the OSI model. It broadcasts all data that it receives out of all its ports, which makes it a security risk in a network. In contrast, switches operate at layer 2 and use MAC addresses to forward data only to the intended recipient.
To prevent the use of a hub in the access layer, we need to configure the switch port to accept only one MAC address, which is the MAC address of the connected device. This can be accomplished with the following set of commands:
switch(config-if)# switchport mode access This command sets the interface to access mode, which means that the switch port will not send or receive VLAN information.
switch(config-if)# switchport port-security maximum 1 This command sets the maximum number of secure MAC addresses for the port to 1. This means that only one MAC address can be learned and used on the port.
By using these commands, any attempt to connect a hub to the port will result in the port being disabled because the hub will send multiple MAC addresses, which will be detected as a violation of the port security policy. This will prevent the hub from being used and maintain the integrity of the network.
Option A is incorrect because it configures the port to trunk mode, which is used to carry VLAN information between switches, and allows multiple VLANs to be transmitted over the port. It also sets the maximum number of secure MAC addresses to 1, but this is not sufficient to prevent the use of a hub.
Option B is incorrect because it configures the port to trunk mode and sets the maximum number of secure MAC addresses to 1, but it uses a specific MAC address for port security, which is not recommended. Using a specific MAC address can cause problems if the connected device is replaced or if the MAC address is changed.
Option D is incorrect because it configures the port to access mode, but it uses a specific MAC address for port security, which is not recommended.