Configuring Port Profile Inheritance
This chapter describes how to configure port profile inheritance, including the following:
•Information About Port Profile Inheritance
•Inheriting a Configuration from a Port Profile
•Removing Inherited Policies from a Port Profile
Information About Port Profile Inheritance
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 3-1 lists the port profile settings and shows whether they can be inherited.
Table 3-1 Port Profile Settings Inheritance
|
|
|
|
acl |
X |
|
capability (iscsi-multipath, l3control) |
|
X |
channel group |
X |
|
default (resets characteristic to its default) |
X |
|
description |
|
X |
inherit |
X |
|
interface state (shut/no shut) |
X |
|
name |
X |
|
netflow |
X |
|
port security |
X |
|
private vlan configuration |
X |
|
qos policy |
X |
|
state (enabled or disabled) |
|
X |
switchport mode (access or trunk) |
X |
|
system vlan vlan list |
|
X |
vlan configuration |
X |
|
vmware max-ports |
|
X |
vmware port-group name |
|
X |
Guidelines and Limitations
Follow these guidelines and limitations when 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 the "Removing Inherited Policies from a Port Profile" procedure.
•The Cisco Nexus 1000V software must be initially configured. For information, see the Cisco Nexus 1000V Getting Started Guide, Release 4.0(4)SV1(2).
•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).
•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.
Before You Begin
Before beginning this procedure, you must know or do the following:
•You are logged in to the CLI in EXEC mode.
•To identify the port profile with a configuration you want to use, use the following command to view your existing port profiles:
–show port profiles
•You are familiar with the port profile characteristics shown in Table 3-1, and whether they can be inherited.
•The port profile type cannot be inherited from another port profile.
SUMMARY STEPS
1. config t
2. port-profile [type {ethernet | vethernet}] name
3. inherit port-profile name
4. show port-profile [brief | expand-interface | usage] [name profile-name]
5. copy running-config startup-config
DETAILED STEPS
|
|
|
Step 1 |
config t
Example: n1000v# config t n1000v(config)# |
Enters global configuration mode. |
Step 2 |
port-profile [type {ethernet | vethernet}] name
Example: n1000v(config)# port-profile type vethernet AllAccess2 n1000v(config-port-prof)# |
Enters port profile configuration mode for the named port profile. •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. The type cannot be inherited. 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. |
Step 1 |
inherit port-profile name
Example: n1000v(config-port-prof)# inherit port-profile AllAccess1 n1000v(config-port-prof)# |
Adds the inherited configuration of the named profile as a default configuration. |
Step 2 |
show port-profile [brief | expand-interface | usage] [name profile-name]
n1000v(config-port-prof)# show port-profile
AllAccess2
|
(Optional) Displays the configuration for verification. |
Step 3 |
copy running-config startup-config
Example: n1000v(config-port-prof)# copy running-config startup-config |
(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration. |
EXAMPLES
This example shows how to inherit the port profile configuration of another port profile:
n1000v(config)# port-profile AllAccess2
n1000v(config-port-prof)# inherit port-profile AllAccess1
n1000v(config-port-prof)# show port-profile name AllAccess2
inherit: port-profile AllAccess1
evaluated config attributes:
n1000v(config-port-prof)#
Removing Inherited Policies from a Port Profile
You can use this procedure to remove the inherited policies from a port profile.
BEFORE YOU BEGIN
Before beginning this procedure, you must know or do the following:
•You are logged in to the CLI in configuration mode.
•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.
SUMMARY STEPS
1. config t
2. (Optional) show port-profile usage name profile_name
3. no port-profile inherit
4. show port-profile name profile_name
5. copy running-config startup-config
DETAILED STEPS
|
|
|
Step 1 |
config t
Example: n1000v# config t n1000v(config)# |
Enters global configuration mode. |
Step 1 |
port-profile name
Example:
(config)# port-profile Access4
|
Enters port profile configuration mode for the named port profile. |
Step 2 |
no port-profile inherit
Example:
(config-port-prof)# no port-profile map
|
Removes the inherited policies. 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 3 |
show port-profile name profile_name
Example:
n1000v(config)# show port-profile name
AccessProf
|
(Optional) Displays the configuration for verification. |
Step 4 |
copy running-config startup-config
Example: n1000v(config-port-prof)# copy running-config startup-config |
(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration. |