Cisco Certified Network Associate Exam: Command for Saving Learned MAC Addresses in Network Switch Configuration

Command for Saving Learned MAC Addresses

Prev Question Next Question

Question

Which command can you enter in a network switch configuration so that learned mac addresses are saved in configuration as they connect?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B

The correct answer is B. Switch(config-if)#Switch port-security Mac-address sticky.

Explanation:

Switch port-security is a feature that is used to restrict unauthorized access to a switch port by limiting the number of MAC addresses that are allowed to connect to the port. The Mac-address sticky command is used to enable the switch to learn the MAC addresses of devices that are connected to the switch port and then to save these addresses in the configuration file. This helps to ensure that the switch only allows these specific MAC addresses to connect to the port in the future.

Let's break down the other answer options to understand why they are not the correct answer:

A. Switch(config-if)#Switch port-security - This command enables the port security feature on the switch port, but it does not save the learned MAC addresses in the configuration file.

C. Switch(config-if)#Switch port-security maximum 10 - This command sets the maximum number of MAC addresses that are allowed to connect to the switch port. However, it does not save the learned MAC addresses in the configuration file.

D. Switch(config-if)#Switch mode access - This command sets the switch port to access mode, which is used to connect end devices to the switch port. However, it does not enable the port security feature or save learned MAC addresses in the configuration file.

Therefore, the correct answer is B. Switch(config-if)#Switch port-security Mac-address sticky, which enables the switch to learn and save the MAC addresses of connected devices in the configuration file.