1.1.2 copy configuration
【命令】
copy configuration source { interface-type interface-number | aggregation-group source-agg-id } destination { interface-list [ aggregation-group destination-agg-id ] | aggregation-group destination-agg-id }
【视图】
系统视图
【参数】
interface-type:端口类型。
interface-number:端口编号。
source-agg-id:源汇聚组号,取值范围为1~28。系统将以该汇聚组中端口号最小的端口作为源端口。
destination-agg-id:目的汇聚组号,取值范围为1~28。
interface-list:目的端口列表。interface-list = interface-type interface-number [ to interface-type interface-number ] &<1-10>。&<1-10>表示前面的参数最多可以重复输10次。
【描述】
copy configuration命令用来将指定端口的配置拷贝到其它端口,以实现端口配置的一致。
如果将拷贝的配置源(source)指定为汇聚组,系统将以该汇聚组中端口号最小的端口为配置源进行拷贝。
如果将拷贝的目的地(destination)指定为汇聚组,则该汇聚组内所有端口的配置都将改变为与配置源一致。
可以拷贝的配置包括VLAN配置、基于协议的VLAN配置、LACP配置、QoS配置、GARP配置、STP配置和端口基本配置,其中:
VLAN配置包括:端口上允许通过的VLAN、端口缺省的VLAN ID;
基于协议的VLAN配置包括:协议VLAN的ID、索引号;
LACP(Link Aggregation Control Protocol,链路汇聚控制协议)配置包括:LACP的使能/关闭状态;
copy命令只能拷贝LACP的使能状态,而对于手工聚合组或静态聚合组的配置命令是无法进行拷贝的,即不能通过copy命令将端口加入聚合组中。
QoS配置包括:流量监管、报文优先级标记、端口优先级、流量统计、流重定向、端口限速、优先级信任模式、QoS Profile(qos-profile port-based配置不能拷贝)等;
STP配置包括:端口的STP使能/关闭、与端口相连的链路属性(如点对点或非点对点)、STP优先级、路径开销、报文发送速率限制、是否环路保护、是否根保护、是否为边缘端口;
GARP(Generic Attribute Registration Protocol,通用属性注册协议)配置包括:GVRP的使能/关闭、定时器的设置、注册模式;
端口基本配置包括:端口的链路类型、端口速率、双工模式。
目的端口中不能有汇聚组端口,否则系统会将该汇聚组端口从目的端口列表中移除,copy命令也不会对该端口生效。如果用户需要在该端口上同步源端口的配置,则需要将该端口所在的汇聚组配置为目的参数(即配置destination-agg-id)。
目的端口中不能有使能了Voice VLAN特性的端口,否则系统会将该端口从目的端口列表中删除。
【举例】
# 将端口Ethernet1/0/1的配置拷贝到端口Ethernet1/0/2、Ethernet1/0/3(Ethernet1/0/3为聚合端口)。
System View: return to User View with Ctrl+Z.
[Sysname] copy configuration source ethernet 1/0/1 destination ethernet 1/0/2 ethernet 1/0/3
Note: The following will be removed from destination port list:
Aggregation port(s),Voice vlan port(s).
Copying VLAN configuration...
Copying Protocol based VLAN configuration...
Copying LACP configuration...
Copying QOS configuration...
Copying GARP configuration...
Copying STP configuration...
Copying speed/duplex configuration...





