Real short one today. This post is about Nexus port profiles. Port profiles are great for ensuring consistency across port configurations. They allow us to configure a template which is inherited by a group of ports. There are three types of port-profiles: Ethernet, Interface-VLAN (SVI) and Port-Channel. In my example, we’ll be configuring several ports as “VM Server” ports. Some may be asking why one would choose these over the simple “interface range” command. In my opinion, port profiles are more strict. The range command configures any range of ports where a port profile configures ALL ports which inherit it. Any new configuration added to the profile is pushed to the inheriting ports as well.

Here’s an example:

n5k-1(config)# port-profile type ethernet VM
n5k-1(config-port-prof)# switchport access vlan 225
n5k-1(config-port-prof)# spanning-tree port type edge
n5k-1(config-port-prof)# spanning-tree bpduguard enable
n5k-1(config-port-prof)# state enabled

Pretty basic. We create an “ethernet” port profile named VM and assign some config to it. The command “state enabled” makes this profile usable, without this command we wouldn’t be able to inherit the profile on a port.