static-mac
Syntax
static-mac vlan< vlan id >port 没有static-mac vlan< vlan id >port
描述
添加一个静态的米AC address to the MAC address table and associates it with a port or existing VLAN. Static MAC addresses can only be assigned to layer 2 (non-routed) interfaces. Static MAC addresses are not affected by the MAC address aging time.
The没有
form of this command deletes a static MAC address.
Command context
config
Parameters
-
-
Specifies a MAC address (
xx:xx:xx:xx:xx:xx
), wherex
is a hexadecimal number from 0 to F. -
vlan< vlan id >
-
Specifies number of an existing VLAN.
-
port
-
Specifies a physical port on the switch. Format:
member/slot/port
.
权威
Administrators or local user group members with execution rights for this command.
Examples
switch(config)# static-mac 00:00:00:00:00:01 vlan 1 port 1/1/1 switch(config)# no static-mac 00:00:00:00:00:01 vlan 1 port 1/1/1 switch(config)# static-mac 00:00:00:00:00:01 vlan 1 port 1/1/2 1/1/2 is not an L2 port switch(config)# static-mac 00:00:00:00:00:01 vlan 2 port 1/1/1 VLAN 2 not found