To add a MAC-layer
station source address to the MAC address table for a Gigabit Ethernet or port
channel interface, use the
mac
address-table static command in switch configuration mode. To delete
the MAC address, use the
no form of
this command.
mac address-table static mac-address vlan vlan-id interface { gigabitEthernet | port-channel} interface-id { permanent | delete-on-reset | delete-on-timeout}
no mac address-table static mac-address vlan vlan-id
Syntax Description
mac-address
|
Specify a
valid MAC address.
|
vlan
vlan-id
|
Specify the
VLAN ID.
|
interface
|
Specifies
the interface type.
|
gigabitEthernet
|
Specifies
Gigabit Ethernet as the interface type.
|
port-channel
|
Specifies
port channel as the interface type.
|
interface-id
|
Specify an
interface ID.
|
permanent
|
Specifies
the permanent static MAC address. The keyword is applied by the default.
|
delete-on-reset
|
Specifies
the delete-on-reset static MAC address.
|
delete-on-timeout
|
Specifies
the delete-on-timeout static MAC address.
|
Command Default
No static
addresses are defined. The default mode for an added address is permanent.
Command Modes
Switch configuration (config-switch)
Command History
Release
|
Modification
|
3.6.1
|
The
port-channel parameter was added.
|
3.5.1
|
This command
was introduced.
|
Usage Guidelines
Use the command to
add a static MAC address with a given time-to-live.
Each MAC address
in the MAC address table is assigned two attributes:
type and
time-to-live .
The following
value of time-to-live is supported:
-
permanent :
MAC address is saved until it is removed manually.
-
delete-on-reset : MAC address is saved until the
next reboot.
-
delete-on-timeout : MAC address may be removed by
the aging timer.
The following
types are supported:
-
static : a MAC
address manually added by the command with the following keywords that specify
its time-to-live:
permanent,
delete-on-reset,
delete-on-timeout .
A static MAC
address may be added in any port mode.
-
dynamic : a
MAC address learned by the switch in a non-secure mode. The value of its
time-to-live
attribute is
delete-on-timeout .
Examples
The following
example adds a permanent static MAC address:
nfvis(config-switch)# mac address-table static 00:3f:bd:45:5a:b1 vlan 1 interface gigabitEthernet 1/1 permanent
nfvis(config-switch)# commit
nfvis(config-switch)# end
Examples
The following
example adds a deleted-on-reset static MAC address:
nfvis(config-switch)# mac address-table static 00:3f:bd:45:5a:b1 vlan 1 interface gigabitEthernet 1/1 delete-on-reset
nfvis(config-switch)# commit
nfvis(config-switch)# end