The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter contains the following sections:
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.
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 |
|
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 |
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. |
1. switch# configure terminal
2. switch(config)# port-profile [type {ethernet | vethernet}] name
3. switch(config-port-prof)# inherit port-profile name
4. (Optional) switch(config-port-prof)# show port-profile [brief | expand-interface | usage] [name profile-name]
5. (Optional) switch(config-port-prof)# copy running-config startup-config
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)#
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.
You are logged in to the CLI in configuration mode.
1. switch# configure terminal
2. (Optional) switch(config)# show port-profile virtual usage name profile_name
3. switch(config)# port-profile name
4. switch(config-port-prof)# no inherit port-profile profile_name
5. (Optional) switch(config-port-prof)# show port-profile virtual usage name profile_name
6. (Optional) switch(config-port-prof)# copy running-config startup-config
Command or Action | Purpose | |
---|---|---|
Step 1 | switch# configure terminal | Enters global configuration mode. |
Step 2 | switch(config)# show port-profile virtual usage name profile_name | (Optional) Displays the policies inherited in the named port profile. |
Step 3 | switch(config)# port-profile name | Enters port profile configuration mode for the named port profile. |
Step 4 | switch(config-port-prof)# no inherit port-profile profile_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 name profile_name | (Optional) Displays the policies inherited for verification of the removal. |
Step 6 | switch(config-port-prof)# copy running-config startup-config | (Optional) Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration. |
This example shows how to remove inherited policies from a port profile:
switch# configure terminal switch(config)# show port-profile virtual usage name AccessProf switch(config)# port-profile Access4 switch(config-port-prof)# no inherit port-profile AccessProf switch(config-port-prof)# show port-profile virtual usage name AccessProf switch(config-port-prof)# copy running-config startup-config