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 describes the Cisco NX-OS virtual port channel (vPC) commands that begin with C.
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.
command argument
no command argument
command |
Command supported in a port profile. |
argument |
Argument for the supported command. |
None
Port profile configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
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.
This example shows how to add the interface commands to the port profile named ppEth that is configured for Ethernet interfaces:
switch# configure terminal
switch(config)# port-profile ppEth
switch(config-port-prof)# switchport mode trunk
switch(config-port-prof)# switchport trunk allowed vlan 300-400
switch(config-port-prof)# flowcontrol receive on
switch(config-port-prof)# speed 10000
switch(config-port-prof)#
This example shows how to remove commands from the port profile named ppEth that is configured for Ethernet interfaces:
switch# configure terminal
switch(config)# port-profile ppEth
switch(config-port-prof)# switchport mode trunk
switch(config-port-prof)# switchport trunk allowed vlan 300-400
switch(config-port-prof)# flowcontrol receive on
switch(config-port-prof)# no speed 10000
switch(config-port-prof)#
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.
command argument
no command argument
command |
Command supported in a switch profile. |
argument |
Arguments for the supported command. |
None
Switch profile configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
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.
This example shows how to add the interface commands to a switch profile named s5010 on switch 1 of the peer:
Peer A
switch# config sync
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-sync)# switch-profile s5010
switch(config-sync-sp)# interface ethernet 1/1
switch(config-sync-sp-if)# switchport mode trunk
switch(config-sync-sp-if)# speed 1000
switch(config-sync-sp-if)# exit
switch(config-sync-sp)#
This example shows how to add commands to the switch profile named s5010 on switch 2 of the peer:
Peer B
switch# config sync
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-sync)# switch-profile s5010
Switch-Profile started, Profile ID is 1
switch(config-sync-sp)# interface ethernet 1/1
switch(config-sync-sp-if)# switchport mode trunk
switch(config-sync-sp-if)# speed 1000
switch(config-sync-sp-if)# interface port-channel 102
switch(config-sync-sp-if)# vpc 1
switch(config-sync-sp-if)# switchport mode trunk
switch(config-sync-sp-if)# exit
switch(config-sync-sp)#
This example shows how to remove commands from the switch profile named s5010 on switch 2 of the peer:
Peer B
switch# config sync
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-sync)# switch-profile s5010
Switch-Profile started, Profile ID is 1
switch(config-sync-sp)# interface ethernet 1/1
switch(config-sync-sp-if)# switchport mode trunk
switch(config-sync-sp-if)# speed 1000
switch(config-sync-sp-if)# interface port-channel 102
switch(config-sync-sp-if)# vpc 1
switch(config-sync-sp-if)# no switchport mode trunk <-- command removed from configuration
switch(config-sync-sp-if)# exit
switch(config-sync-sp)#
To commit the commands in the switch profile buffer and save the configuration in the switch, use the commit command.
commit
This command has no arguments or keywords.
None
Switch profile configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
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.
•Deletes the checkpoint.
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.
This example shows how to apply the changes made to the switch profile named s5010 on switch 1 of the peer:
switch# config sync
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-sync)# switch-profile s5010
Switch-Profile started, Profile ID is 1
switch(config-sync-sp)# interface ethernet 1/1
switch(config-sync-sp-if)# switchport mode trunk
switch(config-sync-sp-if)# speed 1000
switch(config-sync-sp-if)# exit
switch(config-sync-sp)# commit
switch(config-sync-sp)#
To enter the configuration synchronization mode to create switch profiles, use the config sync command.
config sync
This command has no arguments or keywords.
None
EXEC mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
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.
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:
switch# configure terminal
switch(config)# cfs ipv4 distribute
switch(config)# exit
switch# config sync
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-sync)#
|
|
---|---|
cfs ipv4 distribute |
Enables CFS distribution over IPv4 on the switch. |
switch-profile |
Creates or configures switch profiles. |
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
This command has no arguments or keywords.
None
EXEC mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
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.
This example shows how to save the running configuration to the startup configuration:
switch# copy running-config startup-config
[########################################] 100%
switch#
|
|
---|---|
show running-config |
Displays the currently running configuration. |
show startup-config |
Displays the startup configuration file. |