Uddhav's Space

Blogging | Solutions | Stories

How to Configure a Static MAC Address on cisco switch?

You can configure MAC addresses for the switch. These addresses are static MAC addresses.


Note

You can also configure a static MAC address in interface configuration mode or VLAN configuration mode.

SUMMARY STEPS

1. switch# configure terminal

2. switch(config-)# mac-address-table static mac_address vlan vlan-id {drop | interface {type slot/port} | port-channel number} [auto-learn]

3. (Optional) switch(config-)# no mac-address-table static mac_address vlan vlan-id


DETAILED STEPS

Command or ActionPurpose
Step 1switch# configure terminalEnters configuration mode.
Step 2switch(config-)# mac-address-table static mac_address vlan vlan-id {drop | interface {type slot/port} | port-channel number} [auto-learn]Specifies a static address to add to the MAC address table.If you enable the auto-learn option, the switch will update the entry if the same MAC address is seen on a different port.
Step 3switch(config-)# no mac-address-table static mac_address vlan vlan-id(Optional)Deletes the static entry from the MAC address table.

This example shows how to put a static entry in the MAC address table:

switch# configure terminal
switch(config)# mac-address-table static 12ab.47dd.ff89 vlan 3 interface ethernet 2/1
 

You can use the mac-address-table static command to assign a static MAC address to a virtual interface.

One response to “How to Configure a Static MAC Address on cisco switch?”

  1. Rohit Avatar
    Rohit

    Hey, good Explanation.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Uddhav's Space

Subscribe now to keep reading and get access to the full archive.

Continue reading