C Commands
This chapter describes the Cisco NX-OS virtual port channel (vPC) commands that begin with C.
command (port profile)
To add or modify commands in a port profile, use any command that is supported in the port profile. To remove a command from the switch profile, use the no form of the supported command.
Syntax Description
Command Default
Command Modes
Port profile configuration mode
Command History
|
|
---|---|
Usage Guidelines
Use this command to configure interface commands (in batch mode) for Ethernet, VLAN, or EtherChannel interfaces.
A command that is included in a port profile can be configured outside of the port profile. If the new configuration in the port profile conflicts with the configurations that exist outside the port profile, the commands configured for an interface in the configuration terminal mode have higher priority than the commands in the port profile. If any changes are made to the interface configuration after a port profile is attached to it, and the configuration conflicts with the configuration in the port profile, the configurations in the interface are given priority.
You can remove commands from a port profile using the no form of the command. When you remove a command from the port profile, the corresponding command is removed from the interface that is atached to the port profile.
The following scenarios explain what happens when commands are removed from a port profile that is attached to an interface.
Example 1 Effect of Removing Commands from a Port Profile
Consider the following configuration:
In this configuration, the MTU value 3000 is removed from the port profile configuration and the interface configuration.
Example 2 Effect of Removing Conflicting Commands from a Port Profile
Consider the following configuration:
In this configuration, the interface speed value 3000 is removed only from the port profile configuration. This will not affect the speed value configured in the interface, as configurations made directly to an interface have higher priority than a port profile.
Example 3 Effect of Removing Conflicting Commands from the Interface
Consider the following configuration.
In this configuration, the no mtu 2000 command will remove the command from the interface configuration, and the MTU value of 3000 in the port profile will be applied to the interface configuration.
Example 4 Effect of Removing Commands That Affect Port Profile Configurations
Consider the following configuration.
In this configuration, when the EtherChannel interface is removed, the channel group configuration is also removed from the port profile irrespective of whether the port profile is attached to an interface.
Now, consider the following configuration.
In this configuration, the operation to remove the policy map fails because the policy is attached to an interface. The operation to remove the policy map will fail even if the port profile is not attached to the interface.
Examples
This example shows how to add the interface commands to the port profile named ppEth that is configured for Ethernet interfaces:
This example shows how to remove commands from the port profile named ppEth that is configured for Ethernet interfaces:
Related Commands
|
|
---|---|
Copies the running configuration to the startup configuration. |
|
command (switch profile)
To add or modify commands in a switch profile, use any command that is supported in the switch profile. To remove a command from the switch profile, use the no form of the supported command.
Syntax Description
Command Default
Command Modes
Switch profile configuration mode
Command History
|
|
---|---|
Usage Guidelines
After you configure a switch profile on each peer, you can add the interface configuration, quality of service (QoS), and virtual port channel (vPC) commands to the switch profile.
Note In this release of Cisco NX-OS, FCoE commands are not supported on a switch profile.
The commands that you add or modify are stored in the switch profile buffer until you apply them to the switch configuration using the commit command. Alternatively, you may verify the commands in the buffer (using the verify command) before applying them to the switch configuration. After you commit the configuration, you can continue to add commands to, or remove commands from, a switch profile configuration. When you commit the configuration again, the updated commands are verified and applied to the switch profile configuration, and the configuration is synchronized between the peers.
Commands are executed in the same order in which they are buffered. You can delete commands from the switch profile buffer using the buffer-delete command, or change their order of precedence in the switch profile buffer using the buffer-move command.
Examples
This example shows how to add the interface commands to a switch profile named s5600 on switch 1 of the peer:
This example shows how to add commands to the switch profile named s5600 on switch 2 of the peer:
This example shows how to remove commands from the switch profile named s5600 on switch 2 of the peer:
Related Commands
|
|
---|---|
Corrects the order of commands in the switch profile buffer. |
|
Copies the running configuration to the startup configuration. |
|
commit (switch profile)
To commit the commands in the switch profile buffer and save the configuration in the switch, use the commit command.
Syntax Description
Command Default
Command Modes
Switch profile configuration mode
Command History
|
|
---|---|
Usage Guidelines
Use this command to save the switch profile configuration and synchronize the configuration with the peer switch. If the commit fails, you must manually correct the configuration commands and then commit the configuration again.
When you commit a configuration, the following operations are performed to ensure that the configuration is applied uniformly on the peer switch:
- Verifies the commands for mutual exclusion checks (mutex-check) on both switches if the peer switch is reachable; otherwise, the mutex-check is performed locally.
Note A command that is included in a switch profile cannot be configured outside of the switch profile or on a peer switch. Ensure that the new configuration in the switch profile does not conflict with the configurations that may exist outside the switch profile or inside another switch profile. This feature is called mutual exclusion (mutex) check.
- Creates a checkpoint with a rollback infrastructure.
- Applies the configuration on the local switch and the peer switch.
If there is a commit failure on any of the switches, the configuration is rolled back on both switches.
For example, consider the following order of configuration of a switch profile:
In the above configuration, the mutual exclusion check fails because the switchport mode access command in the switch profile conflicts with the switchport mode trunk command configured in the configuration terminal mode for Ethernet interface 1/1. You must replace the switchport mode access command with an appropriate command.
During commit, the configuration revision of the switch profile is used to determine the synchronization of the configuration in the peer switch as follows:
- If the revision number of the local switch profile is the same as the peer, and there is a locally applied configuration that needs to be synchronized, the configuration is synchronized in the peer.
- If the revision number is the same in both switches, and there is no locally applied configuration that needs to be synchronized with the peer, the synchronization session is terminated immediately.
- If the revision number in the local switch does not match that of the peer switch, the configuration is synchronized in the peer.
After you commit a switch profile configuration, you can continue to add or remove commands from the switch profile. When you commit the configuration again, only the updated commands are used for verification and the configuration is then applied to the switch profile and synchronized with the peer switch.
For example, consider the following configuration of a switch profile:
When you commit the updated configuration, only the following configuration will be verified and committed:
If the commit fails, you will see the following error message:
Examples
This example shows how to apply the changes made to the switch profile named s5600 on switch 1 of the peer:
Related Commands
|
|
---|---|
Copies the running configuration to the startup configuration. |
|
Displays information about the switch profile and the configuration revision. |
|
config sync
To enter the configuration synchronization mode to create switch profiles, use the config sync command.
Syntax Description
Command Default
Command Modes
Command History
|
|
---|---|
Usage Guidelines
Use the config sync command on the local and the peer switch that you want to synchronize.
Before you synchronize the configuration on the switches, you must ensure the following:
- Identify the peer switches.
- Enable Cisco Fabric Services (CFS) distribution over IPv4 on the management interface (mgmt0) of the peer switches.
When you use the configuration synchronization feature, the configurations made on one switch is synchronized and made available on the peer switch.
After using the config sync command, you can create or configure switch profiles on the peer switches.
Examples
This example shows how to enable CFS over IPv4 on a switch in peer configuration, and then enter the configuration synchronization mode on the switch:
Related Commands
|
|
---|---|
copy running-config startup-config
To save the running configuration to the startup configuration file so that all current configuration details are available after a reboot, use the copy running-config startup-config command.
copy running-config startup-config
Syntax Description
Command Default
Command Modes
Command History
|
|
---|---|
Usage Guidelines
To view the changes to the configuration that you have made, use the show startup-config command.
Note Once you enter the copy running-config startup-config command, the running and the startup copies of the configuration are identical.
Examples
This example shows how to save the running configuration to the startup configuration:
Related Commands
|
|
---|---|