import interface

To import an interface configuration to a switch profile, use the import interface command.

import interface { ethernet slot / port | port-channel channel-no }

Syntax Description

ethernet
Specifies the Ethernet interface configuration to import to the switch profile.
slot / port
Chassis or slot number and the port or slot number. The slot can be from 1 to 255 and the port can be from 1 to 128.
port-channel
Specifies the EtherChannel interface configuration to import to the switch profile.
channel-no
EtherChannel number. The range is from 1 to 4096.

Command Default

None

Command Modes

Switch profile configuration mode

Command History

Release
Modification
5.0(2)N1(1)
This command was introduced.

Usage Guidelines

When no option is specified with the import command, an empty switch profile is created. You can then selectively add the configuration that is needed to be synchronized with the peer switch.

You can import a switch profile based on the set of commands that you want to import. The following three ways can be used to import commands that were added using the configuration terminal mode:

  1. Add selected commands to the switch profile.
  2. Add supported commands that were specified for an interface.
  3. Add supported system-level commands.

When you import commands to a switch profile, the switch profile buffer must be empty.

Use the commit command to complete the import process and move the configuration into the switch profile. Because configuration changes are not supported during the import process, if new commands are added before entering the commit command, the switch profile remains unsaved and the switch remains in the switch profile import mode (config-sync-sp-import). You can remove the added commands or use the abort command to stop the import. Unsaved configurations are lost if the process is aborted. New commands can be added to the switch profile after the import is complete.

Examples

This example shows how to import the Ethernet interface configuration to a 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)# show switch-profile s5010 buffer
 
switch-profile : s5010
----------------------------------------------------------
Seq-no Command
----------------------------------------------------------
 
switch(config-sync-sp)# import interface ethernet 1/1
switch(config-sync-sp)# show switch-profile buffer
 
switch-profile : s5010
----------------------------------------------------------
Seq-no Command
----------------------------------------------------------
1 interface Ethernet1/1
 
switch(config-sync-sp-import)# commit
Verification successful...
Proceeding to apply configuration. This might take a while depending on amount o
f configuration in buffer.
Please avoid other configuration changes during this time.
Commit Successful
switch(config-sync)#

 

This example shows how to create an empty switch profile named sp100 on switch 1 of the peer and then add the configuration commands:

switch# config sync
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-sync)# switch-profile sp100
Switch-Profile started, Profile ID is 1
switch(config-sync-sp)# show switch-profile sp100 buffer
 
switch-profile : sp100
----------------------------------------------------------
Seq-no Command
----------------------------------------------------------
 
switch(config-sync-sp)# import
switch(config-sync-sp-import)# interface port-channel 100
switch(config-sync-sp-import-if)# switchport mode trunk
switch(config-sync-sp-import-if)# vpc peer-link
switch(config-sync-sp-import-if)# exit
switch(config-sync-sp-import)# commit
Verification successful...
Proceeding to apply configuration. This might take a while depending on amount o
f configuration in buffer.
Please avoid other configuration changes during this time.
Commit Successful
switch(config-sync)#

 

Related Commands

Command
Description
abort
Discards the current switch profile configuration.
commit
Commits a switch profile configuration.
copy running-config startup-config
Copies the running configuration to the startup configuration.
show switch-profile buffer
Displays information about the switch profile buffer.
show running-config switch-profile
Displays the running configuration for a switch profile.