You can apply the configuration from an existing port profile as the default configuration for another port profile. This is called inheritance. The configuration of the parent port profile is copied to and stored in the child port profile. You can also override the inheritance by configuring the attributes explicitly in the child port profile.
Table 1 Port Profile Inheritance Settings
Can it be inherited?
Port Profile Setting
Yes
No
acl
X
capability iscsi-multipath
X
capability l3 control
X
channel group
X
default (resets characteristic to its default)
X
description
X
inherit
X
interface state (shut/no shut)
X
mtu
X
name
X
netflow
X
pinning
X
port security
X
private vlan configuration
X
qos policy
X
service-port
X
state (enabled or disabled)
X
switchport mode (access or trunk)
X
system vlan vlan list
X
virtual-service-domain
X
vlan configuration
X
vmware max-ports
X
vmware port-group name
X
Guidelines and Limitations for Configuring Port Profile Inheritance
Inherited port profiles cannot be changed or removed from an interface using the Cisco Nexus 1000V CLI. This can only be done through the vCenter Server.
Inherited port profiles are automatically configured by the Cisco Nexus 1000V when the ports are attached on the hosts. This is done by matching up the VMware port group assigned by the system administrator with the port profile that created it.
You can change a setting directly on a port profile to override the inherited settings.
You can also explicitly remove port profile inheritance, so that a port profile returns to the default settings, except where there has been a direct configuration. For more information, see Removing Inherited Policies from a Port Profile.
The Cisco Nexus 1000V software must be initially configured. For information, see the Cisco Nexus 1000V Installation and Upgrade Guide.
The Cisco Nexus 1000V must be connected to the vCenter Server.
Once a port profile is created, you cannot change its type (Ethernet or vEthernet).
Inheriting a Configuration from a Port Profile
You can use this procedure to apply the configuration from an existing port profile as the default configuration for another port profile.
You are familiar with the port profile characteristics shown in Table 1 and whether they can be inherited.
Tip
The port profile type cannot be inherited from another port profile.
Before You Begin
You are logged in to the CLI in EXEC mode.
To identify the port profile with a configuration you want to use, use the show port profiles command to view your existing port profiles.
Procedure
Command or Action
Purpose
Step 1
switch# configure terminal
Enters global configuration mode.
Step 2
switch(config)# port-profile [type {ethernet | vethernet}] name
Enters port profile configuration mode for the named port profile. If the port profile does not already exist, it is created using the following characteristics:
name—The port profile name can be up to 80 characters and must be unique for each port profile on the Cisco Nexus 1000V.
type—(Optional) The port profile type can be Ethernet or vEthernet. Once configured, the type cannot be changed. The default is the vEthernet type.
Defining a port profile type as Ethernet allows the port profile to be used for physical (Ethernet) ports. In the vCenter Server, the corresponding port group can be selected and assigned to physical ports (PNICs).
Note
If a port profile is configured as an Ethernet type, then it cannot be used to configure VMware virtual ports.
Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.
This example shows how to inherit the port profile configuration of another port profile:
switch# configure terminal
switch(config)# port-profile AllAccess2
switch(config-port-prof)# inherit port-profile AllAccess1
switch(config-port-prof)# show port-profile name AllAccess2
port-profile AllAccess2
description:
type: vethernet
status: disabled
capability l3control: no
pinning control-vlan: -
pinning packet-vlan: -
system vlans: none
port-group:
max ports: 32
inherit: port-profile AllAccess1
config attributes:
evaluated config attributes:
assigned interfaces:
switch(config-port-prof)#
Removing Inherited Policies from a Port Profile
If you have configured policies independently of inheritance, then they will not be removed when you remove the inheritance. Only the policies that are configured solely through the inheritance are removed.
Before You Begin
You are logged in to the CLI in configuration mode.
Procedure
Command or Action
Purpose
Step 1
switch# configure terminal
Enters global configuration mode.
Step 2
switch(config)# show port-profile virtual usage nameprofile_name
(Optional)
Displays the policies inherited in the named port profile.
Step 3
switch(config)# port-profilename
Enters port profile configuration mode for the named port profile.
Step 4
switch(config-port-prof)# no inherit port-profileprofile_name
Removes the inherited policies from the named port-profile.
The port profile settings are returned to the defaults, except for the port profile type and any settings that were explicitly configured independent of those inherited.
Step 5
switch(config-port-prof)# show port-profile virtual usage nameprofile_name
(Optional)
Displays the policies inherited for verification of the removal.