How simplify the configuration on your Cisco Nexus 5K

Port profiles can reduce errors and apply the same configurations.

You create a port-profile and inherit it on your interface. Don’t forget the max-port  on your port-profile if you apply on a lot interface.

port-profile type ethernet FREE
max-port 1024
state enable
port-profile type ethernet ACCESS_PORT
max-port 1024
switchport mode access
spanning-tree port type edge
no cdp enable
no shutdown
state enable

After you can use your port-profile and add you Vlan ID for example. You reduce the number of line and use each time your interface with the same commands.

interface eth101/1/1
inherit port-profile ACCESS_PORT
switchport access vlan 100

You can use this command to display the complete configuration :

sh run int eth101/1/1 expand-port-profile