To enable the port security extension, edit the ML2 configuration file on the controller01 node at /etc/neutron/plugins/ml2/ml2_conf.ini and add the following to the [ml2] section:
[ml2]
...
extension_drivers = port_security
Restart the neutron-server service for the changes to take effect:
# systemctl restart neutron-server
You can verify that the port security extension is enabled by verifying its name in the extension list that's provided by the openstack extension list command, as shown here: