inherit port-profile
To assign a port profile to an interface or range of interfaces and to inherit an additional port profile onto an existing port profile, use the inherit port-profile command. To remove an inherited port profile or to remove a port profile from specified interfaces, use the no form of this command.
inherit port-profile name
no inherit port-profile name
Syntax Description
name |
Port profile that you want to assign to interfaces or to inherit onto the existing port profile. |
Command Default
None
Command Modes
Interface configuration modePort-profile configuration mode
Command History
Release |
Modification |
---|---|
4.2(1) |
This command was introduced. |
Usage Guidelines
Use the inherit port-profile command to do the following:
-
Assign the port profile to a specified interface or range of specified interfaces. You do this action in the interface configuration mode. The maximum number of interfaces that can inherit a single profile is 512.
-
Inherit configuration parameters from another port profile onto an existing port profile. You do this action in the port-profile mode, using the name of the port profile that you want to inherit configurations into. Only port profiles of the same type can be inherited by another port profile. The device supports four levels of inheritance except for the switchport private-vlan mapping and the private-vlan mapping commands, which support only one inheritance level. The same port profile can be inherited by any number of port profiles. In a port-profile inheritance hierarchy, all the profiles must have the same switchport configuration.
See the port-profile command and the state-enabled command for information about creating, configuring, and enabling port profiles.
If you attempt to inherit a port profile to the wrong type of interface, the system returns an error.
When you remove a port profile from a range of interfaces, the system undoes the configuration from the interfaces first and then removes the port-profile link. Also, when you remove a port profile, the system checks the interface configuration and either skips port-profile commands that have been overridden by directly entered interface commands or returns the command to the default value.
You can also choose a subset of interfaces from which to remove a port profile from those interfaces to which you originally applied the profile. For example, if you configured a port profile and configured 10 interfaces to inherit that port profile, you can remove the port profile from just some of the specified 10 interfaces. The port profile continues to operate on the remaining interfaces to which it is applied.
You use the port-profile configuration mode to remove an inherited port profile from an original port profile.
This command does not require a license.
Examples
This example shows how to assign a specified port profile to a range of interfaces:
switch(config)# interface ethernet 2/1-10
switch(config-if)# port-profile test
This example shows how to inherit the configuration parameters from the port profile named switch onto the port profile named test:
switch(config)# test
switch(config-ppm)# inherit port-profile switch