Configure Static Mac Address on Switch

 


Configuring a static MAC address entry on a Cisco switch can be useful when you want to explicitly bind a MAC address to a specific switch port. This is often done to enhance security or to ensure that a specific device always connects to the same port, regardless of the order in which devices are connected. Here are the steps to configure a static MAC address entry on a Cisco switch:

1. Access Configuration Mode:

  • Access the switch's command-line interface (CLI) and enter configuration mode.
bash
Switch> enable Switch# configure terminal

2. Configure a Static MAC Address Entry:

  • Use the following command to configure a static MAC address entry on a specific switch port:
bash
Switch(config)# mac address-table static mac_address vlan vlan_id interface interface_type interface_number
  • Replace the placeholders with the appropriate values:

    • mac_address: The MAC address you want to configure.
    • vlan_id: The VLAN to which the MAC address belongs.
    • interface_type: The type of interface (e.g., GigabitEthernet, FastEthernet, TenGigabitEthernet).
    • interface_number: The number of the switch port.
  • For example, to configure a static MAC address entry for a device with MAC address 00:1A:2B:3C:4D:5E in VLAN 10 on GigabitEthernet 0/1:

bash
Switch(config)# mac address-table static 00:1A:2B:3C:4D:5E vlan 10 interface GigabitEthernet0/1

3. Verify the Configuration:

  • To verify the static MAC address entry configuration, you can use the following command:
bash
Switch# show mac address-table static
  • This command displays a list of statically configured MAC addresses and their associated switch ports.

4. Save the Configuration:

  • After configuring the static MAC address entry, save the configuration to the startup configuration to ensure that it persists after a reboot.
bash
Switch# write memory

By configuring a static MAC address entry on a Cisco switch, you can ensure that a specific MAC address is always associated with a particular switch port

Comments

Popular posts from this blog

CCNA Router and Catalyst Switch IOS Command Reference

Network Technologies

About myself