> # Configuring Port Security with Auto-Learning and CFS Distribution

> ## Detailed Steps

> To configure port security, using auto-learning and CFS distribution, follow these steps:

> 1. Enable port security. See the "Enabling Port Security" topic.
> 2. Enable CFS distribution. See the "Enabling Distribution" topic.
> 3. Activate port security on each VSAN. This turns on auto-learning by default. See the "Activating Port Security" topic.
> 4. Issue a CFS commit to copy this configuration to all switches in the fabric. See the "Committing the Changes" topic. At this point, all switches are activated, and auto-learning.
> 5. Wait until all switches and all hosts are automatically learned.
> 6. Disable auto-learn on each VSAN. See the"Disabling Auto-learning" topic.
> 7. Issue a CFS commit to copy this configuration to all switches in the fabric. See the "Committing the Changes" topic. At this point, the auto-learned entries from every switch are combined into a static active database that is distributed to all switches.
> 8. Copy the active database to the configure database on each VSAN. See the "Copying the Port Security Database" topic.
> 9. Issue a CFS commit to copy this configuration to all switches in the fabric. See the "Committing the Changes" topic. This ensures that the configure database is the same on all switches in the fabric.
> 10. Copy the running configuration to the startup configuration, using the fabric option. This saves the port security configure database to the startup configuration on all switches in the fabric.

> Copyright 2010-2015, Cisco Systems, Inc. All rights reserved.