To create a port profile and enter the port-profile configuration mode or to enter into the port-profile configuration mode
of a previously created port profile, use the port-profile command. To remove the port profile, use the no form of this command.
port-profile [type {ethernet | interface-vlan | port-channel}] name
no port-profile [type {ethernet | interface-vlan | port-channel}] name
Syntax Description
type
|
(Optional) Specifies the type of interfaces.
|
ethernet
|
Specifies Layer 2 or Layer 3 interfaces.
|
interface-vlan
|
Specifies VLAN network interfaces.
|
port-channel
|
Specifies port-channel interfaces.
|
name
|
Name of the port profile.
|
Command Modes
Interface configuration mode
Port-profile configuration mode
Command History
Release
|
Modification
|
4.2(1)
|
This command was introduced.
|
Usage Guidelines
Use the port-profile command to group configuration commands and apply them to several interfaces simultaneously. All interfaces in the range
must be the same type. The maximum number of interfaces that can inherit a single port profile is 512.
The port-profile name must be globally unique across types and networks.
Each port profile can be applied only to a specific type of interface; the choices are as follows:
-
Ethernet
-
VLAN network interface
-
Port channel
 Note |
When you choose ethernet as the interface type, the port profile is in the default mode which is Layer 3. Enter the switchport command to change the port profile to Layer 2 mode.
|
A subset of commands are available under the port-profile configuration mode, depending on which interface type you specify.
Layer 3 and CTS commands are not supported by port profiles.
You can configure the following port-profile operations:
-
Create port profiles
-
Delete port profiles
-
Add commands to and delete commands from port profiles
-
Inherit port profiles at interfaces
-
Enable and disable port profiles
-
Inherit between port profiles
-
Configure maximum number of ports that a profile can inherit
You inherit the port profile when you attach the port profile to an interface or range of interfaces. The maximum number of
interfaces that can inherit a single profile is 512. When you attach, or inherit, a port profile to an interface or range
of interfaces, the system applies all the commands in that port profile to the interfaces.
Additionally, you can have one port profile inherit another port profile, which allows the initial port profile to assume
all of the commands of the second, inherited port profile that do not conflict with the initial port profile. Four levels
of inheritance are supported except for the switchport private-vlan mapping and private-vlan mapping commands, which support only one level of inheritance. See the inherit port-profile command for information about inheriting an additional port profile and assigning port profiles to specified interfaces.
The system applies the commands inherited by the interface or range of interfaces according to the following guidelines:
-
Commands that you enter under the interface mode take precedence over the port profile’s commands if there is a conflict.
However, the port profile retains that command in the port profile.
-
The port profile’s commands take precedence over default commands on the interface, unless it is explicitly overridden by
the default command.
-
When a range of interfaces inherits a second port profile, the commands of the initial port profile override those commands
of the second port profile if there is a conflict.
-
After you inherit a port profile onto an interface or range of interfaces, you can override individual configuration values
by entering the new value at the interface configuration level. If you then remove the individual configuration values at
the interface configuration level, the interface again uses the values in the port profile again.
-
There are no default configurations associated with a port profile.
 Note |
You cannot use port profiles with Session Manager.
|
If you delete a specific configuration for a specified range of interfaces using the interface configuration mode, that configuration
is also deleted from the port profile for that range of interfaces only. For example, if you have a channel group inside a
port profile and you are in the interface configuration mode and you delete that port channel, the specified port channel
is also deleted from the port profile as well.
Just as in the device, you can enter a configuration for an object in port profiles without that object being applied to interfaces.
For example, you can configure a VRF instance without it being applied to the system. If you then delete that VRF and its
configurations from the port profile, the system is unaffected.
After you inherit a port profile on an interface or range of interfaces and you delete a specific configuration value, that
port-profile configuration does not operate on the specified interfaces.
You must enable each specific port profile using the state-enabled command.
This command does not require a license.
Examples
This example shows how to configure, name a port profile, and enter the port-profile configuration mode:
switch(config)# port-profile type ethernet test
switch(config-ppm)#